Math & ScienceTypesetting 'argmin' with Constraints

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
ggyyree
Posts: 21
Joined: Mon Sep 15, 2008 6:32 pm

Typesetting 'argmin' with Constraints

Post by ggyyree »

Hi smart guys,

I would like to type a line of math like this.

Code: Select all

\begin{align}
\arg &\min ABC \\
s.t. A &= 1 \\
B &= 2
\end{align}
  1. I want to make the font size of these two lines

    Code: Select all

    s.t. A &= 1 \\
    B &= 2
    to be smaller than \arg &\min ABC
  2. I want to make the = of the constrains to be aligned with the letter A of \arg &\min ABC
Please advise me how to do these. Thanks very much.

PS: I attached an example and please look at the image.
Attachments
argmin-contraints.png
argmin-contraints.png (4.77 KiB) Viewed 15288 times
Last edited by localghost on Fri Sep 28, 2012 5:05 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Typesetting 'argmin' with Constraints

Post by localghost »

Try something like this.

Code: Select all

\documentclass[11pt]{article}
\usepackage[T1]{fontenc}
\usepackage{mathtools}    % loads »amsmath«

\DeclareMathOperator*{\argmin}{argmin}

\begin{document}
  \begin{equation}
    \argmin_{%
      \substack{%
        \text{s.\,t.}\, A=1 \\
        \phantom{\text{s.\,t.}}\, B=2
      }
    }
    ABC
  \end{equation}
\end{document}
Further reading:

Thorsten
Attachments
The resulting output.
The resulting output.
argmin-limits.png (8.5 KiB) Viewed 15273 times
ggyyree
Posts: 21
Joined: Mon Sep 15, 2008 6:32 pm

Re: Typesetting 'argmin' with Constraints

Post by ggyyree »

Work like a charm! Thanks so much!
Post Reply