LaCheck(1)
π LaCheck β the LaTeX consistency checker (manual page, bestie edition)
okay so you opened LaCheck(1) from the General Commands Manual and honestly? this little tool is giving your-LaTeX-document's-hypercritical-bestie and I'm obsessed. it reads your .tex file, finds the cursed sequences, and yells at you about them. let's get into it π
β¨ NAME β¨
lacheck β a consistency checker for LaTeX documents. that's it, that's the job, and it does it with main character energy π
β¨ SYNOPSIS β¨
lacheck filename[.tex]
β¨ DESCRIPTION β¨
LaCheck is a general purpose consistency checker for LaTeX documents, fr fr. it reads a LaTeX document and shows you warning messages whenever it spots bad sequences. lowkey important disclaimer: "badness" here is very subjective β it's a vibe check, not a law. LaCheck exists to help you find the common mistakes, especially the ones beginners make. we've all been there π
here's everything it checks:
- Mismatched groups (braces), environments and math mode delimiters. when it finds a mismatch, it gives you line numbers for both the start and the end of the mismatch. the error messages come in pairs β one for the end match and one for the beginning, marked with
`<-Β΄and`->Β΄respectively. so cute of it to show both sides π«Ά - Bad spacing, which includes: a missing
`\ Β΄after an abbreviation; a missing`\@Β΄before a punctuation mark in a paragraph that ends with a capital letter; double spaces like` Β΄; bad usage of ellipsis (like using...instead of\ldots, or using\ldotswhere\cdotsshould be used); a missing something before a\citeor\refcommand (the man page literally leaves that blank and honestly same, bestie π); space before footnotes; italic corrections before comma, point, or italic text; italic correction after normal text; a missing italic correction when switching from italic to normal text; and double italic correction. - Badly placed punctuation marks around end of math mode delimiters. that means punctuation sitting right after display math end, or punctuation sitting right before text math end. sequences of whitespace followed by punctuation marks get caught too.
- Bad use of quotation characters, i.e. constructs like
"Β΄word"or"word"get warned about. tabs inside verbatim environments are caught. certain TeX primitives are <red>frowned upon</red>. attempts to give font specifiers arguments such as\em{text}are noted. and any use of@` in LaTeX macros is reported. periodt β¨ - LaCheck will also read files that you pull in using
\inputor\include. but heads up: files with the suffix`.styΒ΄`are omitted, because they'd probably make LaCheck crash. we're protecting it π₯Ί
and ooh, you can invoke LaCheck from inside emacs(1) using M-x compile. to run it:
M-x compile RET lacheck RET
and then C-x `` to parse the messages. iconic workflow, no notes π
β¨ OUTPUT β¨
the output is UNIX-error like, so it can be parsed with Emacs(1) compile mode. here's a sample, look at it go:
lacheck compiler
"/usr/mef/compiler.tex", line 34: missing `\\\\ Β΄ after "etc."
"/usr/mef/compiler.tex", line 179: double space at " ~"
"/usr/mef/compiler.tex", line 186: <- unmatched "}"
"/usr/mef/compiler.tex", line 181: -> unmatched "$$"
so what's happening here: a control space `\ Β΄ should be inserted at line 34, to prevent an end-of-sentence space. and at line 179, the first space of the sequence " ~" should probably be deleted. the last two lines are an example where the user mistyped and probably dropped an extra "}" in there somewhere. it happens to the best of us, no cap π«
β¨ DIAGNOSTICS β¨
a few special cases, bestie, listen up:
- In cases where a sentence ends with something LaCheck thinks is an abbreviation, a missing
`\ Β΄error may also occur β but only if the following sentence begins with a lowercase letter. sneaky. - A mismatch error may cause more errors to follow, because the error recovery is... not great. in those cases just correct the first error and run LaCheck again. one at a time, babe π§
- Braces, environments and math mode must be balanced within a file. non-negotiable.
- LaCheck may get confused by unmatched stuff placed inside verbatim-like environments that are called something other than exactly
`verbatimΒ΄.
β¨ SEE ALSO β¨
tex(1), emacs(1), latex(1) β the whole friend group π
β¨ BUGS β¨
okay let's be real for a second π LaCheck:
- gets confused by advanced macros,
- is fooled by simple macros,
- can't figure out if you use a non-standard way to switch italic on or off,
- does not like TeX at all,
- does not provide any options to turn off specific warnings,
- and is at best a crude approximation.
it's giving chaotic-but-trying and we love it anyway.
ideas for improvements and bug reports are very welcome. such should be directed to the maintainers; please email tex-live@tug.org. they want to hear from you fr fr π«Ά
β¨ AUTHOR β¨
Kresten Krab Thorup with modifications by Per Abrahamsen. currently maintained as part of TeX Live (<https://tug.org/texlive>). wait, no links allowed β it's written as https://tug.org/texlive in the original, so there you go, bestie π
and that's the whole page!! Release 1.30 (TeX Live), dated 2019-07-09 β go forth and let the consistency checker roast your .tex files, you've got this ππ
β¨
π¦ where this page comes from
- alpine 3.24: texlive-doc 2026.0-r0 Β· GPL-2.0-or-later AND GPL-3.0-or-later
- arch rolling: texlive-doc 2026.1-1 Β· GPL
- epel 10: texlive-lacheck 13:20240311-10.el10_3 Β· GPL-1.0-or-later
- fedora 43: texlive-lacheck 11:svn66186-93.fc43 Β· GPL-1.0-or-later
- fedora 43: texlive-lacheck 11:svn66186-95.fc43.1 Β· GPL-1.0-or-later
- fedora 44: texlive-lacheck 12:svn75712-105.fc44 Β· GPL-1.0-or-later
- fedora 44: texlive-lacheck 12:svn75712-111.fc44 Β· GPL-1.0-or-later
- opensuse-leap 16.0: texlive-lacheck 2025.221.svn66186-160000.3.1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms