tectonic
tectonic copied to clipboard
Linting/checking capability
One of the nice things about TeXLive is their inclusion of chktex and lacheck, which allow my editor to lint and check my LaTeX files as I write them. Would it be possible to add a similar capability to Tectonic? A flag like --check would not produce any output, but just display warnings, with line numbers.
Um, yes, that should actually be pretty easy to implement, I think. I'd be inclined to add it as another possibility for the --outfmt option to the command line interface.
One possibly tricky part is the (La)TeX engine mixes most of its warnings and errors in with the engine's other chatter without any special/standard demarcation. So the front-end would have to guess a bit about which pieces of output were warnings. But a basic heuristic could get you 90% of the way there, I think.
I'm not familiar with XeTeX (which I believe Tectonic's back-end is based on or uses), but I guess that for anything that is a legitimate warning, XeTeX gives a line number. If so, that could be a good start for a heuristic, especially since any linter needs to indicate at least a line number to assist the user in solving their issue.