[texhax] Trying to find if a listing is continued with listings package
P.Taylor at Rhul.Ac.Uk
Sun Dec 20 10:50:10 CET 2015
Reinhard Kotucha wrote:
> Adrian is using listings.sty, hence I assume that he's using LaTeX.
> LaTeX users should better use \@ifundefined instead of TeX primitives
> or plain TeX macros.
Adrian may well be using "listings.sty", but there is very little
LaTeX-ish about his code :
> \csname \@lst @SaveFirstNumber\endcsname
> it's a new listing
> it's a continued listing
so suggesting the use of \relax in this context would seem quite
reasonable to me ... And does \@undefined map to \relax in such a
context, as it would need to if his test were to perform as intended ?
More information about the texhax