TeX - LaTeX Asked by Fred Guth on May 22, 2021
I use ChkTex inside VSCode with the Latex-Workshop Extension. I have never used ChkTex before.
Is there a way of setting ChkTex up to ignore a certain file or directory?
I know there is a .chktexrc file and I imagine I should create a .chktexrc in the unwanted directory, but I don’t know the command I should include in it.
I don't know about the LaTeX-Workshop (I don't use VSCode), so there may be some way to configure it to not run ChkTeX for some files/folders.
There isn't (currently) any way to ignore certain files from in the .chktexrc
file. However, depending on how LaTeX-Workshop actually works you might be able to put a .chktexrc
in the same directory as the files. If that directory is the working directory of the ChkTeX
process spawned by VSCode, then it should pick that up as the last .chktexrc
file, and hence the one with ultimate authority.
For a quick way to turn off all warnings, you can set --format
to an empty string in the .chktexrc
:
CmdLine
{
--format ""
}
If that doesn't work for you (it's quite possible that VSCode always spawns the process in the same directory but with the full path to the LaTeX file), then please open a ticket. It may also be that you are wanting to suppress warnings for certain files that you include, which would require code changes as well. To give you fair warning, I haven't been great at getting to open tickets lately because I've been busy with other things, but at least that way it won't get lost.
You can also use file suppressions if the number of files and warnings is small and the files are under your control (though I'm guessing that's not the case). To suppress, for example, warning 12 in the entire file just add a line to the beginning of the file like
% chktex-file 12
Answered by Ivan Andrus on May 22, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP