welcome: please sign in
location: Diff for "Computer/Latex/OptimizationX"
Differences between revisions 1 and 3 (spanning 2 versions)
Revision 1 as of 2018-03-17 12:44:22
Size: 58
Editor: leif
Comment:
Revision 3 as of 2018-03-17 16:04:56
Size: 570
Editor: leif
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
Describe LeifAndersson/Computer/Latex/Optimization here. == Formatting Optimization Problems ==


Put the following lines in the head of your document, i.e. between `\documentclass{xxx}` and `\begin{document}`
{{{
\newcommand*{\optMinMax}[2]{\underset{\vphantom{A}\displaystyle\mathclap{#1}}%
                    {\text{#2}}\quad}
\newcommand{\optmin}[1]{\optMinMax{#1}{minimize}}
\newcommand{\optmax}[1]{\optMinMax{#1}{maximize}}
\newcommand*{\subject}{\text{subject to}\quad}
\newcommand*{\tagthis}{\stepcounter{equation}\tag{\theequation}}
}}}

{{attachment:imagefile.png|text describing image|height=100}}
 

Formatting Optimization Problems

Put the following lines in the head of your document, i.e. between \documentclass{xxx} and \begin{document}

\newcommand*{\optMinMax}[2]{\underset{\vphantom{A}\displaystyle\mathclap{#1}}%
                           {\text{#2}}\quad}
\newcommand{\optmin}[1]{\optMinMax{#1}{minimize}}
\newcommand{\optmax}[1]{\optMinMax{#1}{maximize}}
\newcommand*{\subject}{\text{subject to}\quad}
\newcommand*{\tagthis}{\stepcounter{equation}\tag{\theequation}}

[ATTACH]

Computer/Latex/OptimizationX (last edited 2018-07-13 11:09:47 by leif)