Closed c-a-m-o closed 4 years ago
2 Ideas on how to fix it :
\fi
that would have the variable as a parameter, but this woud probably imply more nested ifs\ifVal
to pass the body of the conditional in a second parameter. This would be similar to \ifthenelse
in the ifthen
packageCorrected with the second option in a12b2eb5834ac237614adca5274dd7c902f6559c
As the syntax for the custom
if
(currently\ifVal{val}
) uses a command that expands to anif
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 nestedifVal
will be considered as the closingif
for the parent conditional, closing it too early and leaving an extrafi
.