diverse-project / varylatex

Varying LaTeX for fitting your requirements
7 stars 2 forks source link

Nested if conditions broken if the surrounding condition is not met #5

Closed c-a-m-o closed 4 years ago

c-a-m-o commented 4 years ago

As the syntax for the custom if (currently \ifVal{val} ) uses a command that expands to an if statement, the LaTeX compiler is not able to recognize it inside the body of a conditional whose condition is false. Thus, the \fi of the nested ifVal will be considered as the closing if for the parent conditional, closing it too early and leaving an extra fi.

c-a-m-o commented 4 years ago

2 Ideas on how to fix it :

c-a-m-o commented 4 years ago

Corrected with the second option in a12b2eb5834ac237614adca5274dd7c902f6559c