Questions tagged [chktex]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
474 views

ChkTeX does not handle lines over 509 bytes correctly

When longer paragraphs have no line breaks in the middle, I get the warning: chktex: WARNING -- ChkTeX does not handle lines over 509 bytes correctly. Some errors and line numbers may be wrong in this ...
user avatar
0 votes
1 answer
82 views

How can I prevent `You should put a space in front of parenthesis. ` message for text in textit

For following text \textit{submitTest()} I am getting a warning message which is: You should put a space in front of parenthesis. [36] This warning message is suppress when I replace it into: \textit{...
user avatar
  • 710
1 vote
2 answers
372 views

ChkTeX: Wrong length of dash may have been used. [8]

For the string: 100K100-873 I am getting the following warning message in my emacs editor from ChkTeX check: Wrong length of dash may have been used. [8] How can I prevent this warning message? Could ...
user avatar
  • 710
0 votes
1 answer
147 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: ...
user avatar
  • 138
0 votes
1 answer
56 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{...
user avatar
0 votes
0 answers
46 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 ...
user avatar
  • 2,365
0 votes
0 answers
77 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 ...
user avatar
1 vote
1 answer
545 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 ...
user avatar
0 votes
0 answers
56 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 ...
user avatar
0 votes
1 answer
523 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 ...
user avatar
  • 156
2 votes
0 answers
78 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 ...
user avatar
  • 313
0 votes
1 answer
100 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 ...
user avatar
1 vote
2 answers
681 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 ...
user avatar
3 votes
2 answers
975 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 ...
user avatar
5 votes
1 answer
1k 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 ...
user avatar
0 votes
1 answer
633 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.
user avatar
1 vote
2 answers
962 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} ...
user avatar
  • 638
6 votes
1 answer
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 ...
user avatar
  • 638
5 votes
2 answers
2k 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 ...
user avatar
  • 638
3 votes
1 answer
838 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 {}...
user avatar
0 votes
1 answer
578 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 ...
user avatar
  • 143
8 votes
2 answers
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 ...
user avatar
  • 183
30 votes
1 answer
9k 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.
user avatar
2 votes
1 answer
211 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: \...
user avatar
7 votes
1 answer
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 ...
user avatar
34 votes
2 answers
5k 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 ...
user avatar
  • 4,873
3 votes
1 answer
479 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 ...
user avatar
  • 3,735
7 votes
2 answers
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.
user avatar
  • 173
2 votes
1 answer
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 ...
user avatar
  • 191
9 votes
1 answer
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?
user avatar