I've just stumbled upon chktex
, the LaTeX lint. While using it, I've noticed that it keeps giving warnings about needing to remove spaces at the beginning of lines containing only \footnote{Some footnote text}
. Nothing in, e.g., this question on spaces at the beginning of lines suggests that this should be problematic, but is it?
Why does chktex complain about spaces at the beginning of a line containing a footnote?
The most minimal of MWEs:
\documentclass{article}
\begin{document}
\footnote{Some footnote text.}
\end{document}
The chktex
warning:
% chktex chktexmwe.tex
ChkTeX v1.7.2 - Copyright 1995-96 Jens T. Berger Thielemann. Compiled with POSIX extended regex support. Warning 42 in chktexmwe.tex line 4: You should remove spaces in front of `\footnote' \footnote{Some footnote text.}
^ chktex: WARNING -- ChkTeX does not handle lines over 1024 bytes correctly. Some errors and line numbers may be wrong in this file. No errors printed; One warning printed; No user suppressed warnings; No line suppressed warnings
chktex
complains about space at the beginning of a line containing only a\footnote
? I would be more inclined to complain about a line containing only one footnote than about space preceding it ....chktex
generates added to the answer.Lorem \footnote{ipsum}
(with a space) gives horrible output. ChkTeX warns you about that, but it does not detect the case at the beginning of a line, where the spaces are ignored. Note though that if you write something likeLorem
<linebreak>\footnote{ipsum}
you will get a space regardless of the indentation of\footnote{ipsum}
, this can only be suppressed with a%
, as inLorem%
<linebreak>\footnote{ipsum}
. Generally I would advise against\footnote
commands at the beginning of lines.Some text\footnote
on one line, and{the footnote text}
indented (using a tab or spaces) on the following line, or lines. I find this easier to read, especially if there are many footnotes interrupting the "flow" of the main text.