Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [chktex]

The tag has no usage guidance.

1
vote
2answers
113 views

chktex warning: You ought to not use primitive TeX in LaTeX code

What is the meaning of the following chktex warning in this example? 41: You ought to not use primitive TeX in LaTeX code. \documentclass{article} \usepackage{amsmath} \begin{document} ...
0
votes
1answer
124 views

\[ChkTeX\] 21: This command might not be intended. [21]

My document contains several math definitions similar to this: some text \(\Gamma\) and the sentence continues when I run chktex, I get a lot of warnings: [ChkTeX] 21: This command might not be ...
0
votes
0answers
121 views

Automatically fixing chktex “Use \( … \) instead of $ … $”

I have a few documents that result in a lot of warnings because I've been using $...$ instead of \(...\) and a few other tiny details. How can I automatically fix these chktex warnings? vscode ...
2
votes
1answer
97 views

Chktex complains about “no italic correction found”, how to fix this?

I use the following code for custom theorems, as I like slanted text in thereoms better than italicized, using amsthm. \newtheoremstyle{thm-sl} {}{} {\slshape} % slanted text instead of italicized {}...
0
votes
1answer
148 views

How to ignore shellcheck when using minted in sublime?

I want to ignore shellcheck when writing a LaTeX document while using minted package. I know, when using shellcheck I can easily ignore warnings or errors globally by placing a line right at the ...
4
votes
2answers
467 views

What is the chktex approved way of writing open intervals?

I am a big fan of the LaTeX linters lacheck and chktex. But in writing my document, I have come across an annoying warning from chktex which shouldn't be one. Consider the following minimal example ...
10
votes
1answer
3k views

Why does chktex lint “command terminated with space”?

Why does chktex lint "command terminated with space"? Applying {} to the command will disable the lint, but this is tedious to do for all commands.
2
votes
1answer
85 views

Using \crefformat with cleveref causes spurious chktex warnings

Cleveref has a useful feature in \crefformat where an equation can be referred to, for instance, an inequality. This adds an extra square-bracket argument to the \label command. For example: \...
3
votes
1answer
587 views

No space with after parenthesis, but needed

While running chktex, I get this error Warning 36 in file.tex line 2062: You should put a space after parenthesis. pen(s) I am writing the word pen but I am adding an s in parentheses as an option ...
25
votes
2answers
2k views

When is leading/opening whitespace of a line in a tex file important?

According to https://en.wikibooks.org/wiki/LaTeX/Basics#Spaces ... opening space is generally ignored. First of all, I don't know what generally refers to. I came across this using chktex a ...
3
votes
1answer
345 views

Should I remove spaces at the beginning of a line containing only a footnote?

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 ...
6
votes
2answers
859 views

How to supress chktex errors in minted environment?

Is there a way to make chktex play nice with the minted package? Right now, it seems to assume that normal checks apply to the content of the minted environments and produces a lot of warnings.
1
vote
1answer
619 views

chktex disable warning about ~ for certain macros when using cleveref with varioref

Is there any way, other than adding per-line suppressions (i.e., %chktex 2) or per warning suppressions to get chktex to stop warning me when \vref and \eqref are preceded by spaces? I am running ...
5
votes
2answers
1k views

Is there a way to make ChkTeX ignore TikZ code

ChkTeX does not like TikZ, and will report a bunch of errors. Is there a way to make ChkTex ignore TikZ code?