Questions tagged [chktex]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
54 views

Why does ChkTeX complain when there is a space after \itshape but not when \bfseries is used?

If I use ChkTeX for the following LaTeX source: \documentclass{article} \begin{document} The quick {\itshape brown fox\/} jumps over the {\bfseries lazy dog}. \end{document} then I get a warning: ...
0
votes
1answer
34 views

Function `\endhead` and `\endfirst` head gets warning for `command terminated with space` in longtable by chktex

This is the code where I got the warning message. However, when I put {} to the command such as \endhead{}, the warning goes away. However I get errors for misplaced noalign. \begin{center} \begin{...
0
votes
0answers
33 views

Suspicious state from syntax checker tex-chktex error

In emacs, I have been compiling a tex file for several months now. It is kind of a template. So, I change details and compile often. I have installed the latest texlive from CTAN. And the binaries ...
0
votes
0answers
33 views

Ignore \verb|| in chktexrc

I'm using chktex to keep my code syntactically coherent, but I ran into a problem that is quite annoying. In my document, I use minted and its \newmintinline to declare shortverb syntax. The problem ...
1
vote
1answer
235 views

Vertical rules in tables are ugly. ChkTex

When I run ChkTeX on \begin{table} \centering \begin{tabular}{c|c|} \tejastable{\kket{2}}{kket{2}} % \tejastable{\}{} % no need of \\ \tejastable{2}{3} % automatically goes to ...
0
votes
0answers
23 views

How to integrate ChkTeX into Texmaker

Inspired by How to integrate chktex into TexStudio I wish to integrate ChkTeX in Texmaker to ensure I write carefully formatted LaTeX code. I would like to run ChkTeX automatically on every build and ...
0
votes
0answers
34 views

Suppress chktex warning about custom capitalized command

Sometimes I define capitalized commands, e.g., \USA. Using this command at the end of a sentence produces a ChkTeX warning about using intersentence spacing. How can I suppress this warning uniformly ...
0
votes
1answer
209 views

Is there a way to disable ChkTex in a specific directory?

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 ...
2
votes
0answers
59 views

ChkTeX fails with nested math mode

MWE: \begin{align} \begin{array} {l} abc \end{array} \\ 3 - 2 = 1 \pi \end{align} ChkTeX detects "Wrong length of dash" in 3 - 2 = 1 and "Command terminated ...
0
votes
1answer
60 views

Silencing chktex NumDash warnings only within certain commands

I use numbers with hyphens in them with certain commands. For example: \newcommand*{\orcid}[1]{\href{https://orcid.org/#1}{#1}} If I use \orcid{0000-0002-1825-0097} on a line, chktex will warn me ...
0
votes
2answers
343 views

Non-breaking space (`~') should have been used in table

I am making a table with \ref{key} as only content in the first column. I am dynamically referring to item numbers in an \enumerate{}. CHKTeX gives me the warning Non-breaking space (`~') should have ...
3
votes
2answers
704 views

Avoid "command terminated with space" warning in \newcommand used in math mode

Consider a command definition Warning 1 in test.tex line 2: Command terminated with space. \newcommand{\ket}[1]{\left \lvert #1 \right \rangle} ^ This command is ...
5
votes
1answer
825 views

How to use chktexrc to control warnings on dashes?

I am trying to configure chktex with a local .chktexrc. Per the chktex manual: You should also take a look at the “chktexrc” file. As it is self-documenting, you should be able to get the meaning ...
0
votes
1answer
479 views

How to integrate chktex into TexStudio

How can I integrate the chktex linting and format checking script into TexStudio? I would like to run chktex automatically on every build and see the output in the messages window.
1
vote
2answers
704 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} ...
6
votes
1answer
1k 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 ...
3
votes
2answers
1k 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 ...
3
votes
1answer
724 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
542 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 ...
8
votes
2answers
1k 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 ...
29
votes
1answer
8k 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
189 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: \...
6
votes
1answer
1k 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 ...
32
votes
2answers
4k 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
450 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 ...
7
votes
2answers
1k 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.
2
votes
1answer
1k 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 ...
9
votes
1answer
2k 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?