In the simple LaTeX file:




I get the following errors with lacheck:

"hw01.tex", line 5: <- unmatched "end of file hw01.tex"
"hw01.tex", line 2: -> unmatched "{"

This is reported by Vim's syntastic running lacheck ver. $Id: lacheck.lex,v 1.26 1998/03/07 07:46:45 abraham Exp $ on MacOS High Seirra. The issue only seems to arise 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 found an old bug report regarding a similar issue. I did not see any talk of a fix. Is this a bug or is there something I am missing?

Edit: The issue appears to not be limited to newcommand. I get the same error for the line:

  • 3
    I get the same. Maybe you should report it to the maintainers of lacheck as a bug
    – DG'
    Jan 24, 2019 at 7:04
  • 3
    use \newcommand\defaultleftmargin{0.25in} then there will be no error. Same for \newlength
    – user2478
    Jan 24, 2019 at 8:37
  • 1
    @Herbert still a strange bug, as the syntax for both is fine.
    – Skillmon
    Jan 24, 2019 at 10:01
  • 1
    @Herbert, I mentioned in the original question removing the curly brackets makes the warning go away. I assume the error is raised for a reason (unless it is a straight bug). If it is a bug, I expect it would have been reported earlier (other than one post on a Debian forum). I will write to TeXlive and update when I hear more.
    – ZaydH
    Jan 25, 2019 at 3:02
  • 1
    Updating mactex (via brew) did not fix the issue. I reported it to the TexLive folks as a bug.
    – ZaydH
    Jan 25, 2019 at 3:20


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.