[tex-live] Possible lacheck Bug Report

Karl Berry karl at freefriends.org
Sat Jan 26 00:43:49 CET 2019


Hi,

    I read on the CTAN website that TeXLive is now maintaining lacheck.

Unfortunately true, since no other volunteers have come forward since
the original author(s) stepped down.  If anyone is interested, please
write me.

    \newcommand{\defaultleftmargin}{0.25in}
    ...
    "hw01.tex", line 5: <- unmatched "end of file hw01.tex"
    "hw01.tex", line 2: -> unmatched "{"

It's certainly a bug. 

    when \newcommand is followed by {\def*} (where * is zero or more other
    characters). Removal of the curly brackets around \def* or any term
    other than def causes the issue to go away.

I believe it comes from this line in lacheck.l:

"\\"[exg]?(def|newcommand)[^\n\{]+ 	BEGIN(DEF);

which I believe says a "definition" starts whenever \def followed by
something that is not a newline or left brace, which is clearly not the
case. It seems the \newcommand and \[exg]def cases should be separated
and made more precise.

So, if anyone is interested in playing around with the lex file, let me
know. Else I'll give it a try when I have a chance.

Thanks for the report. -k


More information about the tex-live mailing list