You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\(New|Renew|Provide)DocumentEnvironment does the existence check for envname without space trimming, while the actual name of environment to be defined (or redefined) is always space trimmed.
When the user-specified envname consists of leading and/or trailing space(s), it may lead to erroneously silent environment declaration.
Minimal example showing the bug
\RequirePackage{latexbug} % <--should be always the first line (see CONTRIBUTING)!\documentclass{article}
\NewDocumentEnvironment {myenv} { } {begin} {end}
\NewDocumentEnvironment {myenv} { } {begin} {end} % errors as expected\NewDocumentEnvironment { myenv } { } {begin} {end} % !! works, which is wrong\begin{document}
\end{document}
Brief outline of the bug
\(New|Renew|Provide)DocumentEnvironment
does the existence check forenvname
without space trimming, while the actual name of environment to be defined (or redefined) is always space trimmed.When the user-specified
envname
consists of leading and/or trailing space(s), it may lead to erroneously silent environment declaration.Minimal example showing the bug
Log file (required) and possibly PDF file
ltcmd-env-exisistence-check.log
Relevant source lines
latex2e/base/ltcmd.dtx
Lines 5030 to 5047 in 066ad1d
latex2e/base/ltcmd.dtx
Lines 629 to 633 in 066ad1d
The text was updated successfully, but these errors were encountered: