Have seen that strange things start to happen as soon as one introduces blank lines between code sections.
For instance, take the synopsis for \NewDocumentEnvironment
\NewDocumentEnvironment{<environment-name>}{<code-at-begin>}{<code-at-end>}
If one introduces a blank line between {<environment-name>} and {<code-at-begin>}. As well as when a blank line is introduced between {<code-at-begin>} and {<code-at-end>}. Why has the latex language been designed to be so difficult to work with.
\NewDocumentEnvironment {<environment-name>}
%% Some description here
{
<code-at-begin>
}
%% Some description here
{
<code-at-end>
}
Is one allowed to introduce comment lines like so
\NewDocumentEnvironment {<environment-name>}
%% Some description here
{
<code-at-begin>
}
%% Some description here
{
<code-at-end>
}
%after braces when organising code on consecutive lines. – Oct 11 '23 at 17:02\NewDocumentEnvironmenttakes four arguments: you're missing the parameters. But if you wrap the definition between\ExplSyntaxOnand\ExplSyntaxOffthen it'll work as you seem to want. – campa Oct 11 '23 at 17:22\ExplSyntaxOnenvironment for programmers where white space is ignored, so you should have no complaints. – David Carlisle Oct 11 '23 at 18:54\par(which is the token latex sees) – David Carlisle Oct 11 '23 at 18:55\ExplSyntaxOnat the beginning of the file but not inside each environment. Something might be going wrong. – Oct 11 '23 at 18:56