josephwright / etoolbox

Tool-box for LaTeX programmers using e-TeX
LaTeX Project Public License v1.3c
41 stars 7 forks source link

Rollback prior 2019/10/01 makes environment hooks noop #32

Closed mrpiggi closed 3 years ago

mrpiggi commented 3 years ago

As package etoolbox checks for the existence of \csname begin \endcsname and \csname end \endcsname in order to provide hooks with \AfterEndEnvironment etc. this fails for formats prior to 2019/10/01 as the robust macros are defined regardless of the format. It is questionable whether this is a problem of etoolbox or rather of latexrelease. For the latter case, I can open an issue at https://github.com/latex3/latex2e/issues if necessary.

\RequirePackage[2019/10/00]{latexrelease}
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{etoolbox}
\newenvironment{Foo}{}{}
\AfterEndEnvironment{Foo}{check!}
\begin{document}
\begin{Foo}
Foo
\end{Foo}

\csmeaning{end}

\csmeaning{end }
\end{document}
josephwright commented 3 years ago

I think the conclusion was to fix in the kernel ...

mrpiggi commented 3 years ago

Yep. It was discussed under https://github.com/latex3/latex2e/issues/494