summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/optidef/optidef.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/optidef/optidef.sty')
-rw-r--r--Master/texmf-dist/tex/latex/optidef/optidef.sty34
1 files changed, 18 insertions, 16 deletions
diff --git a/Master/texmf-dist/tex/latex/optidef/optidef.sty b/Master/texmf-dist/tex/latex/optidef/optidef.sty
index b52ee18762e..6324f2f0523 100644
--- a/Master/texmf-dist/tex/latex/optidef/optidef.sty
+++ b/Master/texmf-dist/tex/latex/optidef/optidef.sty
@@ -1,18 +1,18 @@
-% optidef - Version 2.1
+% optidef - Version 2.2
%
%Copyright 2016 J. Lago Garcia
%
%This work may be distributed and/or modified under the conditions of the LaTeX Project Public License, either version 1.3 of this license or (at your option) any later version.
%The latest version of this license is in http://www.latex-project.org/lppl.txt and version 1.3 or later is part of all distributions of LaTeX version 2005/12/01 or later.
%
-%This work has the LPPL maintenance status 'maintained'. The Current Maintainer of this work is J. Lago Garcia, under the supervision of Prof. Dr. Moritz Diehl and Prof. Dr. Sebastien Gross.
+%This work has the LPPL maintenance status 'maintained'. The Current Maintainer of this work is J. Lago Garcia.
%
%E-mail: jesus.lago.garcia@venus.uni-freiburg.de
%
%This work consists of the file optidef.sty.
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{optidef}[2016/09/25 - version=2.1, Package for defining optimization problems]
+\ProvidesPackage{optidef}[2016/10/22 - version=2.2, Package for defining optimization problems]
\RequirePackage{environ}
\RequirePackage{mathtools}
@@ -462,8 +462,8 @@
%%%%%%%%%%%%%%%%%%%
% SETTING DEFAULT FORMAT
%%%%%%%%%%%%%%%%%%%
+% Originally, \toggletrue{bodyCon} was inside this function, however, spacing issues after environment made me remove it.
\newcommand{\setStandardMini}{
- \toggletrue{bodyCon}
\let\addConstraint\standardAddConstraint
}
@@ -526,6 +526,8 @@
% Specific environments defined with xparse package due to arguments options
%MINIMIZATION ENVIRONMENTS
+% In the below definitions, \toggletrue{bodyCon} has to be added once the definition of the environment is finished. I tried to do inside the environment itself using \setStandardMini, but it produced some ugly text displacemente.
+
% Single reference probems
\DeclareDocumentEnvironment{mini}{D||{\defaultProblemFormat} O{0} m m m m}
{\ifthenelse{\equal{#1}{s}}
@@ -533,7 +535,7 @@
{\setFormatShort{min} \BaseMini{#2}{#3}{#4}{#5}{#6}{min}}
% Long version problem
{\setFormatLong{minimize} \BaseMini{#2}{#3}{#4}{#5}{#6}{minimize}}
-}{\endBaseMini}
+}{\endBaseMini\toggletrue{bodyCon}}
\DeclareDocumentEnvironment{argmini}{D||{\defaultProblemFormat} O{0} m m m m}
{\ifthenelse{\equal{#1}{s}}
@@ -541,7 +543,7 @@
{\setFormatShort{arg~min} \BaseMini{#2}{#3}{#4}{#5}{#6}{arg~min}}
% Long version problem
{\setFormatLong{arg~min} \BaseMini{#2}{#3}{#4}{#5}{#6}{arg~min}}
-}{\endBaseMini}
+}{\endBaseMini\toggletrue{bodyCon}}
% No reference
@@ -551,7 +553,7 @@
{\setFormatShort{min} \BaseMiniStar{#2}{#3}{#4}{#6}{min}}
% Long version problem
{\setFormatLong{minimize} \BaseMiniStar{#2}{#3}{#4}{#6}{minimize}}
-}{\textbf{\endBaseMiniStar}}
+}{\endBaseMiniStar\toggletrue{bodyCon}}
\DeclareDocumentEnvironment{argmini*}{D||{l} O{0} m m m m}
{\ifthenelse{\equal{#1}{s}}
@@ -559,7 +561,7 @@
{\setFormatShort{arg~min}\BaseMiniStar{#2}{#3}{#4}{#6}{arg~min}}
% Long version problem
{\setFormatLong{arg~min} \BaseMiniStar{#2}{#3}{#4}{#6}{arg~min}}
-}{\textbf{\endBaseMiniStar}}
+}{\endBaseMiniStar\toggletrue{bodyCon}}
% Multiple reference
@@ -569,7 +571,7 @@
{\setFormatShort{min} \BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{min}}
% Long version problem
{\setFormatLong{minimize} \BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{minimize}}
-}{\endBaseMiniExclam}
+}{\endBaseMiniExclam\toggletrue{bodyCon}}
\DeclareDocumentEnvironment{argmini!}{D||{\defaultProblemFormat} O{0} m m m m}
{\ifthenelse{\equal{#1}{s}}
@@ -577,7 +579,7 @@
{\setFormatShort{arg~min}\BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{arg~min}}
% Long version problem
{\setFormatLong{arg~min} \BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{arg~min}}
-}{\endBaseMiniExclam}
+}{\endBaseMiniExclam\toggletrue{bodyCon}}
@@ -591,7 +593,7 @@
{\setFormatShort{max} \BaseMini{#2}{#3}{#4}{#5}{#6}{max}}
% Long version problem
{\setFormatLong{maximize} \BaseMini{#2}{#3}{#4}{#5}{#6}{maximize}}
-}{\endBaseMini}
+}{\endBaseMini\toggletrue{bodyCon}}
\DeclareDocumentEnvironment{argmaxi}{D||{\defaultProblemFormat} O{0} m m m m}
{\ifthenelse{\equal{#1}{s}}
@@ -599,7 +601,7 @@
{\setFormatShort{arg~max} \BaseMini{#2}{#3}{#4}{#5}{#6}{arg~max}}
% Long version problem
{\setFormatLong{arg~max} \BaseMini{#2}{#3}{#4}{#5}{#6}{arg~max}}
-}{\endBaseMini}
+}{\endBaseMini\toggletrue{bodyCon}}
% No reference
@@ -609,7 +611,7 @@
{\setFormatShort{max} \BaseMiniStar{#2}{#3}{#4}{#6}{max}}
% Long version problem
{\setFormatLong{maximize} \BaseMiniStar{#2}{#3}{#4}{#6}{maximize}}
-}{\textbf{\endBaseMiniStar}}
+}{\endBaseMiniStar\toggletrue{bodyCon}}
\DeclareDocumentEnvironment{argmaxi*}{D||{l} O{0} m m m m}
{\ifthenelse{\equal{#1}{s}}
@@ -617,7 +619,7 @@
{\setFormatShort{arg~max}\BaseMiniStar{#2}{#3}{#4}{#6}{arg~max}}
% Long version problem
{\setFormatLong{arg~max} \BaseMiniStar{#2}{#3}{#4}{#6}{arg~max}}
-}{\textbf{\endBaseMiniStar}}
+}{\endBaseMiniStar\toggletrue{bodyCon}}
% Multiple reference
@@ -627,7 +629,7 @@
{\setFormatShort{max} \BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{max}}
% Long version problem
{\setFormatLong{maximize} \BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{maximize}}
-}{\endBaseMiniExclam}
+}{\endBaseMiniExclam\toggletrue{bodyCon}}
\DeclareDocumentEnvironment{argmaxi!}{D||{\defaultProblemFormat} O{0} m m m m}
{\ifthenelse{\equal{#1}{s}}
@@ -635,4 +637,4 @@
{\setFormatShort{arg~max}\BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{arg~max}}
% Long version problem
{\setFormatLong{arg~max} \BaseMiniExclam{#2}{#3}{#4}{#5}{#6}{arg~max}}
-}{\endBaseMiniExclam} \ No newline at end of file
+}{\endBaseMiniExclam\toggletrue{bodyCon}} \ No newline at end of file