texlive[45945] Master/texmf-dist: optidef (29nov17)

commits+karl at tug.org commits+karl at tug.org
Wed Nov 29 23:08:27 CET 2017


Revision: 45945
          http://tug.org/svn/texlive?view=revision&revision=45945
Author:   karl
Date:     2017-11-29 23:08:27 +0100 (Wed, 29 Nov 2017)
Log Message:
-----------
optidef (29nov17)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/optidef/README.md
    trunk/Master/texmf-dist/doc/latex/optidef/optidef.pdf
    trunk/Master/texmf-dist/doc/latex/optidef/optidef.tex
    trunk/Master/texmf-dist/tex/latex/optidef/optidef.sty

Modified: trunk/Master/texmf-dist/doc/latex/optidef/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/optidef/README.md	2017-11-29 22:08:15 UTC (rev 45944)
+++ trunk/Master/texmf-dist/doc/latex/optidef/README.md	2017-11-29 22:08:27 UTC (rev 45945)
@@ -66,17 +66,17 @@
 
 Github: https://github.com/jeslago/optidef
 
-## Latest stable version: Optidef 2.5
+## Latest stable version: Optidef 2.6
 
 CTAN: https://www.ctan.org/pkg/optidef
 
 ## Licensing
 
-Copyright 2017 Jesus Lago Garcia
+Copyright 2017 Jesus Lago
 
 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.
+This work has the LPPL maintenance status 'maintained'. The Current Maintainer of this work is Jesus Lago.
 
 This work consists of the file optidef.sty.
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/optidef/optidef.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/optidef/optidef.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/optidef/optidef.tex	2017-11-29 22:08:15 UTC (rev 45944)
+++ trunk/Master/texmf-dist/doc/latex/optidef/optidef.tex	2017-11-29 22:08:27 UTC (rev 45945)
@@ -7,9 +7,9 @@
 
 \lstset{basicstyle=\ttfamily,breaklines=true}
 % Title Page
-\title{\textit{\textbf{Optidef}} \\ A Latex library for optimization problems\\ \textnormal{Version - 2.5}}
+\title{\textit{\textbf{Optidef}} \\ A Latex library for optimization problems\\ \textnormal{Version - 2.6}}
 
-\author{Jesus Lago Garcia}
+\author{Jesus Lago}
 
 \makeatletter
 \renewcommand \thesection {\@arabic\c at section}
@@ -714,17 +714,19 @@
 \end{verbatim}
 
 	
-	
+\section{Reporting bugs and feature requests}
+To report any bug or request some feature please use the issue section in the github repository: \url{https://github.com/jeslago/optidef/issues}. 
+
 \section{Code definition}
 \begin{lstlisting}
-% optidef - Version 2.5
+% optidef - Version 2.6
 %
-%Copyright 2017 J. Lago Garcia
+%Copyright 2017 Jesus Lago
 %
 %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.
+%This work has the LPPL maintenance status 'maintained'. The Current Maintainer of this work is J. Lago.
 %
 %E-mail: J.LagoGarcia at tudelft.nl
 %
@@ -731,7 +733,7 @@
 %This work consists of the file optidef.sty.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{optidef}[2017/06/21 - version=2.5,  Package for defining optimization problems]
+\ProvidesPackage{optidef}[2017/11/29 - version=2.6,  Package for defining optimization problems]
 
 \RequirePackage{environ}
 \RequirePackage{mathtools}	
@@ -761,6 +763,11 @@
 
 \ProcessOptions\relax
 
+% This command is required to avoid breakdown of the \equal fragile command. In particular, before I had \equal{#2}{} tp check if argumetn #2 was empty. However, if the argument was a bmatrix object the command was breaking. Now this command is robust.
+\newcommand{\equalsNothing}[3]{%
+\ifthenelse{\equal{\unexpanded{#1}}{}}{#2}{#3}%
+}
+
 %%%%%%%%%%%%%%%%%%%%%%%
 % VARIABLES DEFINITION
 %%%%%%%%%%%%%%%%%%%%%%%
@@ -836,7 +843,7 @@
 
 % Main command. Dynamically redefined at every new problem definition.
 \DeclareDocumentCommand{\bodyconst}{m G{}}
-{	\ifthenelse{\equal{#2}{}}{
+{	\equalsNothing{#2}{
 \\ &\underset{\displaystyle \phantom{\localOptimalVariable}}{\mathrm{subject~to}} \quad &&#1 #2 
 }{
 \\ &\underset{\displaystyle \phantom{\localOptimalVariable}}{\mathrm{subject~to}}  \quad &#1 & #2
@@ -859,8 +866,8 @@
 {%%%
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"
-\ifthenelse{\equal{#3}{}}{%%
-\ifthenelse{\equal{#2}{}}{%
+\equalsNothing{#3}{%%
+\equalsNothing{#2}{%
 \\ & \bodySubjectTo \quad &&#1 #2 	
 }{%
 \\ &\bodySubjectTo \quad &#1 & #2
@@ -867,7 +874,7 @@
 }%
 \togglefalse{previousThird}
 }{%%
-\ifthenelse{\equal{#2}{}}{%
+\equalsNothing{#2}{%
 \\ &\bodySubjectTo \quad &&#1 #2 &&#3
 }{%
 \\ &\bodySubjectTo \quad &#1 & #2 &&#3
@@ -882,7 +889,7 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#3}{
 \\ &\bodySubjectTo\quad &&#1 #2 	\togglefalse{previousThird}
 }{
 \\ &\bodySubjectTo\quad &&#1 #2 &&#3
@@ -895,7 +902,7 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#3}{
 \\ &\bodySubjectTo \span\span\span\span \\
 &&&#1 #2 \togglefalse{previousThird}
 }{
@@ -910,8 +917,8 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-\ifthenelse{\equal{#3}{}}{
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#3}{
+\equalsNothing{#2}{
 \\ &\bodySubjectTo\span\span\span\span \\
 &&&#1 #2 
 }{
@@ -920,7 +927,7 @@
 }
 \togglefalse{previousThird}
 }{
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#2}{
 \\ &\bodySubjectTo \span\span\span\span \\
 &&&#1 #2 &&#3
 }{
@@ -936,8 +943,8 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-\ifthenelse{\equal{#3}{}}{
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#3}{
+\equalsNothing{#2}{
 \\ &\bodySubjectTo\span\span\span\span \nonumber \\
 &&&#1 #2	
 }{
@@ -946,7 +953,7 @@
 }
 \togglefalse{previousThird}
 }{
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#2}{
 \\ &\bodySubjectTo\span\span\span\span \nonumber \\
 &&&#1 #2	&&#3
 }{
@@ -962,7 +969,7 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#3}{
 \\ &\bodySubjectTo\span\span\span\span \nonumber \\
 &&&#1 #2		\togglefalse{previousThird}
 }{
@@ -981,9 +988,9 @@
 % Main command. Dynamically redefined at every problem definiton.
 \DeclareDocumentCommand{\addConstraint}{m G{} G{}}{
 % "If clause" selecting whether a third parameter (#3) defining extra constraint information is used
-\ifthenelse{\equal{#3}{}}{	
+\equalsNothing{#3}{	
 % Second "If clause" selecting whether two or 1 elements for the constraints are used
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#2}{
 \iftoggle{bodyCon}{
 \bodyconst{#1}
 \togglefalse{bodyCon}
@@ -1006,7 +1013,7 @@
 \bodyconst{#1}{#2}{#3}
 \togglefalse{bodyCon}
 }{
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#2}{
 \defaultOCPConstraint\\&\quad &&#1 #2 && #3
 }{
 \defaultOCPConstraint\\&\quad &#1 & #2 && #3
@@ -1018,17 +1025,23 @@
 }
 
 % Standard version of adding constraints
+% The toggle previousThird indicates if the previous constraint had three arguments or two. According to that it adjust the required spans at the end of the previous contraint. It is needed because the line jump after a constraint it is done at the beginning of the next constraint, not after the constraint itself. That avoid the last jump of the last constraint.
+% The toggle bodyCon indicate that it is the first contraint. The first contraint is different that the rest because it contains "subject to"
+% The commands \equalsNothing checks if the optional arguments exists
 \DeclareDocumentCommand{\standardAddConstraint}{m G{} G{}}{
 \iftoggle{previousThird}
-{\renewcommand{\spanit}{}}
-{\renewcommand{\spanit}{\span\span}}
+{
+\renewcommand{\spanit}{}
+}{
+\renewcommand{\spanit}{\span\span}
+}
 \iftoggle{bodyCon}{
 \bodyconstRight{#1}{#2}{#3}
 \togglefalse{bodyCon}
 }{
-\ifthenelse{\equal{#2}{}}{
-\ifthenelse{\equal{#3}{}}{
-\defaultOCPConstraint\spanit\\&\quad &&#1 #2 
+\equalsNothing{#2}{
+\equalsNothing{#3}{
+\defaultOCPConstraint\spanit\\&\quad &&#1 #2
 \togglefalse{previousThird}
 }{
 \defaultOCPConstraint\spanit\\&\quad &&#1 #2 && #3
@@ -1035,8 +1048,8 @@
 \toggletrue{previousThird}
 }
 }{
-\ifthenelse{\equal{#3}{}}{
-\defaultOCPConstraint\spanit\\&\quad &#1 & #2 
+\equalsNothing{#3}{
+\defaultOCPConstraint\spanit\\&\quad &#1 & #2
 \togglefalse{previousThird}
 }{
 \defaultOCPConstraint\spanit\\&\quad &#1 & #2 && #3
@@ -1047,6 +1060,7 @@
 }
 }
 
+
 % Adding constraints below subject to
 \DeclareDocumentCommand{\BelowAddConstraint}{m G{} G{}}{
 \iftoggle{bodyCon}{
@@ -1053,8 +1067,8 @@
 \bodyconstBelow{#1}{#2}{#3}
 \togglefalse{bodyCon}
 }{
-\ifthenelse{\equal{#2}{}}{
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#2}{
+\equalsNothing{#3}{
 \defaultOCPConstraint\spanit\\&&&#1  #2 		\togglefalse{previousThird}
 }{
 \defaultOCPConstraint\spanit\\&&&#1  #2 && #3
@@ -1061,7 +1075,7 @@
 \toggletrue{previousThird}		
 }
 }{
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#3}{
 \defaultOCPConstraint\spanit\\ &&#1  &#2 \togglefalse{previousThird}
 }{
 \defaultOCPConstraint\spanit\\ &&#1  &#2 && #3
@@ -1078,7 +1092,7 @@
 \bodyconstOneAlign{#1}{#2}{#3}
 \togglefalse{bodyCon}
 }{
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#3}{
 \defaultOCPConstraint\spanit\\&\quad &&#1  #2 \togglefalse{previousThird}
 }{
 \defaultOCPConstraint\spanit\\&\quad &&#1  #2 && #3
@@ -1094,7 +1108,7 @@
 \bodyconstOneAlignBelow{#1}{#2}{#3}
 \togglefalse{bodyCon}
 }{
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#3}{
 \defaultOCPConstraint\spanit\\& &&#1  #2\togglefalse{previousThird}
 }{
 \defaultOCPConstraint\spanit\\& &&#1  #2 && #3
@@ -1110,8 +1124,8 @@
 \bodyconstBelowMult{#1}{#2}{#3}
 \togglefalse{bodyCon}
 }{
-\ifthenelse{\equal{#3}{}}{
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#3}{
+\equalsNothing{#2}{
 \defaultOCPConstraint\spanit\\&&&#1  #2
 }{
 \defaultOCPConstraint\spanit\\ &&#1  &#2
@@ -1118,7 +1132,7 @@
 }
 \togglefalse{previousThird}
 }{
-\ifthenelse{\equal{#2}{}}{
+\equalsNothing{#2}{
 \defaultOCPConstraint\spanit\\&&&#1  #2 && #3
 }{
 \defaultOCPConstraint\spanit\\ &&#1  &#2&& #3}
@@ -1134,7 +1148,7 @@
 \bodyconstOneAlignBelowMult{#1}{#2}{#3}
 \togglefalse{bodyCon}
 }{
-\ifthenelse{\equal{#3}{}}{
+\equalsNothing{#3}{
 \defaultOCPConstraint\spanit\\& &&#1  #2 \togglefalse{previousThird}
 }{
 \defaultOCPConstraint\spanit\\& &&#1  #2 && #3

Modified: trunk/Master/texmf-dist/tex/latex/optidef/optidef.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/optidef/optidef.sty	2017-11-29 22:08:15 UTC (rev 45944)
+++ trunk/Master/texmf-dist/tex/latex/optidef/optidef.sty	2017-11-29 22:08:27 UTC (rev 45945)
@@ -1,11 +1,11 @@
-% optidef - Version 2.5
+% optidef - Version 2.6
 %
-%Copyright 2017 J. Lago Garcia
+%Copyright 2017 Jesus Lago 
 %
 %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.
+%This work has the LPPL maintenance status 'maintained'. The Current Maintainer of this work is J. Lago .
 %
 %E-mail: J.LagoGarcia at tudelft.nl
 %
@@ -12,7 +12,7 @@
 %This work consists of the file optidef.sty.
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{optidef}[2017/06/21 - version=2.5,  Package for defining optimization problems]
+\ProvidesPackage{optidef}[2017/11/29 - version=2.6,  Package for defining optimization problems]
 
 \RequirePackage{environ}
 \RequirePackage{mathtools}	
@@ -42,6 +42,11 @@
 
 \ProcessOptions\relax
 
+% This command is required to avoid breakdown of the \equal fragile command. In particular, before I had \equal{#2}{} tp check if argumetn #2 was empty. However, if the argument was a bmatrix object the command was breaking. Now this command is robust.
+\newcommand{\equalsNothing}[3]{%
+	\ifthenelse{\equal{\unexpanded{#1}}{}}{#2}{#3}%
+}
+
 %%%%%%%%%%%%%%%%%%%%%%%
 % VARIABLES DEFINITION
 %%%%%%%%%%%%%%%%%%%%%%%
@@ -117,7 +122,7 @@
 
 % Main command. Dynamically redefined at every new problem definition.
 \DeclareDocumentCommand{\bodyconst}{m G{}}
-{	\ifthenelse{\equal{#2}{}}{
+{	\equalsNothing{#2}{
 	\\ &\underset{\displaystyle \phantom{\localOptimalVariable}}{\mathrm{subject~to}} \quad &&#1 #2 
 	}{
 	\\ &\underset{\displaystyle \phantom{\localOptimalVariable}}{\mathrm{subject~to}}  \quad &#1 & #2
@@ -140,8 +145,8 @@
 {%%%
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"
-\ifthenelse{\equal{#3}{}}{%%
-		\ifthenelse{\equal{#2}{}}{%
+\equalsNothing{#3}{%%
+		\equalsNothing{#2}{%
 		\\ & \bodySubjectTo \quad &&#1 #2 	
 	}{%
 	\\ &\bodySubjectTo \quad &#1 & #2
@@ -148,7 +153,7 @@
 	}%
 	\togglefalse{previousThird}
 }{%%
-	\ifthenelse{\equal{#2}{}}{%
+	\equalsNothing{#2}{%
 		\\ &\bodySubjectTo \quad &&#1 #2 &&#3
 	}{%
 	\\ &\bodySubjectTo \quad &#1 & #2 &&#3
@@ -163,7 +168,7 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-	\ifthenelse{\equal{#3}{}}{
+	\equalsNothing{#3}{
 		\\ &\bodySubjectTo\quad &&#1 #2 	\togglefalse{previousThird}
 	}{
 		\\ &\bodySubjectTo\quad &&#1 #2 &&#3
@@ -176,7 +181,7 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-	\ifthenelse{\equal{#3}{}}{
+	\equalsNothing{#3}{
 		\\ &\bodySubjectTo \span\span\span\span \\
 		&&&#1 #2 \togglefalse{previousThird}
 	}{
@@ -191,8 +196,8 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-	\ifthenelse{\equal{#3}{}}{
-		\ifthenelse{\equal{#2}{}}{
+	\equalsNothing{#3}{
+		\equalsNothing{#2}{
 			\\ &\bodySubjectTo\span\span\span\span \\
 			&&&#1 #2 
 		}{
@@ -201,7 +206,7 @@
 		}
 		\togglefalse{previousThird}
 	}{
-		\ifthenelse{\equal{#2}{}}{
+		\equalsNothing{#2}{
 			\\ &\bodySubjectTo \span\span\span\span \\
 			&&&#1 #2 &&#3
 		}{
@@ -217,8 +222,8 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-	\ifthenelse{\equal{#3}{}}{
-		\ifthenelse{\equal{#2}{}}{
+	\equalsNothing{#3}{
+		\equalsNothing{#2}{
 			\\ &\bodySubjectTo\span\span\span\span \nonumber \\
 			&&&#1 #2	
 		}{
@@ -227,7 +232,7 @@
 		}
 		\togglefalse{previousThird}
 	}{
-		\ifthenelse{\equal{#2}{}}{
+		\equalsNothing{#2}{
 			\\ &\bodySubjectTo\span\span\span\span \nonumber \\
 			&&&#1 #2	&&#3
 		}{
@@ -243,7 +248,7 @@
 {
 \bodySubjectToDefinition
 %##  Set the first constraint according to the format used for "subject to"	
-	\ifthenelse{\equal{#3}{}}{
+	\equalsNothing{#3}{
 		\\ &\bodySubjectTo\span\span\span\span \nonumber \\
 		&&&#1 #2		\togglefalse{previousThird}
 	}{
@@ -262,9 +267,9 @@
 % Main command. Dynamically redefined at every problem definiton.
 \DeclareDocumentCommand{\addConstraint}{m G{} G{}}{
 % "If clause" selecting whether a third parameter (#3) defining extra constraint information is used
-\ifthenelse{\equal{#3}{}}{	
+\equalsNothing{#3}{	
 		% Second "If clause" selecting whether two or 1 elements for the constraints are used
-		\ifthenelse{\equal{#2}{}}{
+		\equalsNothing{#2}{
 			\iftoggle{bodyCon}{
 				\bodyconst{#1}
 				\togglefalse{bodyCon}
@@ -287,7 +292,7 @@
 				\bodyconst{#1}{#2}{#3}
 				\togglefalse{bodyCon}
 			}{
-				\ifthenelse{\equal{#2}{}}{
+				\equalsNothing{#2}{
 					\defaultOCPConstraint\\&\quad &&#1 #2 && #3
 				}{
 					\defaultOCPConstraint\\&\quad &#1 & #2 && #3
@@ -299,17 +304,23 @@
 }
 
 % Standard version of adding constraints
+% The toggle previousThird indicates if the previous constraint had three arguments or two. According to that it adjust the required spans at the end of the previous contraint. It is needed because the line jump after a constraint it is done at the beginning of the next constraint, not after the constraint itself. That avoid the last jump of the last constraint.
+% The toggle bodyCon indicate that it is the first contraint. The first contraint is different that the rest because it contains "subject to"
+% The commands \equalsNothing checks if the optional arguments exists
 \DeclareDocumentCommand{\standardAddConstraint}{m G{} G{}}{
 	\iftoggle{previousThird}
-	{\renewcommand{\spanit}{}}
-	{\renewcommand{\spanit}{\span\span}}
+	{
+		\renewcommand{\spanit}{}
+	}{
+		\renewcommand{\spanit}{\span\span}
+	}
 \iftoggle{bodyCon}{
 	\bodyconstRight{#1}{#2}{#3}
 	\togglefalse{bodyCon}
 }{
-	\ifthenelse{\equal{#2}{}}{
-		\ifthenelse{\equal{#3}{}}{
-			\defaultOCPConstraint\spanit\\&\quad &&#1 #2 
+	\equalsNothing{#2}{
+		\equalsNothing{#3}{
+			\defaultOCPConstraint\spanit\\&\quad &&#1 #2
 			\togglefalse{previousThird}
 		}{
 			\defaultOCPConstraint\spanit\\&\quad &&#1 #2 && #3
@@ -316,8 +327,8 @@
 			\toggletrue{previousThird}
 		}
 	}{
-		\ifthenelse{\equal{#3}{}}{
-			\defaultOCPConstraint\spanit\\&\quad &#1 & #2 
+		\equalsNothing{#3}{
+			\defaultOCPConstraint\spanit\\&\quad &#1 & #2
 			\togglefalse{previousThird}
 		}{
 			\defaultOCPConstraint\spanit\\&\quad &#1 & #2 && #3
@@ -328,6 +339,7 @@
 }
 }
 
+
 % Adding constraints below subject to
 \DeclareDocumentCommand{\BelowAddConstraint}{m G{} G{}}{
 	\iftoggle{bodyCon}{
@@ -334,8 +346,8 @@
 		\bodyconstBelow{#1}{#2}{#3}
 		\togglefalse{bodyCon}
 	}{
-		\ifthenelse{\equal{#2}{}}{
-			\ifthenelse{\equal{#3}{}}{
+		\equalsNothing{#2}{
+			\equalsNothing{#3}{
 				\defaultOCPConstraint\spanit\\&&&#1  #2 		\togglefalse{previousThird}
 			}{
 				\defaultOCPConstraint\spanit\\&&&#1  #2 && #3
@@ -342,7 +354,7 @@
 				\toggletrue{previousThird}		
 			}
 		}{
-			\ifthenelse{\equal{#3}{}}{
+			\equalsNothing{#3}{
 				\defaultOCPConstraint\spanit\\ &&#1  &#2 \togglefalse{previousThird}
 			}{
 				\defaultOCPConstraint\spanit\\ &&#1  &#2 && #3
@@ -359,7 +371,7 @@
 			\bodyconstOneAlign{#1}{#2}{#3}
 			\togglefalse{bodyCon}
 		}{
-			\ifthenelse{\equal{#3}{}}{
+			\equalsNothing{#3}{
 				\defaultOCPConstraint\spanit\\&\quad &&#1  #2 \togglefalse{previousThird}
 			}{
 				\defaultOCPConstraint\spanit\\&\quad &&#1  #2 && #3
@@ -375,7 +387,7 @@
 		\bodyconstOneAlignBelow{#1}{#2}{#3}
 		\togglefalse{bodyCon}
 	}{
-		\ifthenelse{\equal{#3}{}}{
+		\equalsNothing{#3}{
 			\defaultOCPConstraint\spanit\\& &&#1  #2\togglefalse{previousThird}
 		}{
 			\defaultOCPConstraint\spanit\\& &&#1  #2 && #3
@@ -391,8 +403,8 @@
 		\bodyconstBelowMult{#1}{#2}{#3}
 		\togglefalse{bodyCon}
 	}{
-		\ifthenelse{\equal{#3}{}}{
-			\ifthenelse{\equal{#2}{}}{
+		\equalsNothing{#3}{
+			\equalsNothing{#2}{
 				\defaultOCPConstraint\spanit\\&&&#1  #2
 			}{
 			\defaultOCPConstraint\spanit\\ &&#1  &#2
@@ -399,7 +411,7 @@
 			}
 			\togglefalse{previousThird}
 		}{
-			\ifthenelse{\equal{#2}{}}{
+			\equalsNothing{#2}{
 				\defaultOCPConstraint\spanit\\&&&#1  #2 && #3
 			}{
 			\defaultOCPConstraint\spanit\\ &&#1  &#2&& #3}
@@ -415,7 +427,7 @@
 		\bodyconstOneAlignBelowMult{#1}{#2}{#3}
 		\togglefalse{bodyCon}
 	}{
-		\ifthenelse{\equal{#3}{}}{
+		\equalsNothing{#3}{
 			\defaultOCPConstraint\spanit\\& &&#1  #2 \togglefalse{previousThird}
 		}{
 			\defaultOCPConstraint\spanit\\& &&#1  #2 && #3



More information about the tex-live-commits mailing list