Open cdesaintguilhem opened 3 weeks ago
This is a known problem. See for example this discussion. Let me dive a bit into lineno
and check if we can fix this.
$$ is a plain TeX primitive for display mathematics and should be replaced by \[...\]
in LaTeX to delimit display mathematics. The LaTeX user's guide mentions this in the very last section under "Miscellaneous"
@kmccurley I'm aware of this, and I personally use \[...\]
, but I was reviewing a paper and noticed this behaviour, so I tried to reproduce it and opened the issue here. I doubt that iacrcc.cls
can enforce the choice of LaTeX primitives over TeX ones, so it would be ideal if lineno
could handle this. But I'm happy to close this issue here since the issue is with lineno
and not with iacrcc.cls
strictly speaking.
There is no need to close the issue - it's certainly a problem worth fixing if we can.
This is related to another thing that I encountered, namely whether to flag violations of certain "best practices" in LaTeX. I don't want to be too restrictive to authors, but some have developed really bad habits and it doesn't help to provide warnings to "nudge" them toward better practices. An example is the use of eqnarray
because it's so error-prone. I had created a modification to iacrcc.cls
that issues a warning about this but I never sent it for review. You might count the use of $$
as another violation of "best practices". We already have some of these built into the system (like when a title is too long). We might be able to hook into \everydisplay
to issue a warning when someone uses $$
but it sounds like a nightmare to operate at this token level. It might be easier to catch it in the python that performs other tasks like parsing the bibtex. Since lineno
is only used for copy editing it's probably not worth all the trouble.
There are other things like the use of \footnote
in tables, or including "alt text" for images to make PDFs more accessible to sight-impaired users, e.g.,
\includegraphics[alt={Image showing the a four-round Feistel network}]{fig1}
This issue is probably not the place to capture a list of "LaTeX best practices" though.
The following minimal code:
produces a PDF where some line numbers are missing.
I did a quick search for issues and PRs related to line numbering but couldn't find anything; my apologies if this is a duplicate.