Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Undesirable error messages

429 views
Skip to first unread message

Haines Brown

unread,
Dec 28, 2012, 9:16:23 AM12/28/12
to
I have situations in which chktex reports error. Although I can ignore
them, I'd prefer to have error-free runs.

Where I enumerate items in a sentence. For example:

There are several steps: 1) fight, 2) run.

This seems to be a run-way argument, and I have to delete the .aux file
before proceeding. If I try 1\), it produces error: Bad math environment
delimiter.

Another situation is where a sentence begins with a command, such as:

...the end. \cite{Doe2014} argues that...

If I precede the command with "~", I'm forcing the new sentence to be on
the same line, which seems unwise. Is there any less drastic way to
eliminate the error?

A citation can also confuse chktex. For example:

...~\cite[see][5--10]{Doe2014}.

I get the non-fatal error: "22:10 Solo `]' found". I don't understand
why.

Haines Brown

Herbert Schulz

unread,
Dec 28, 2012, 9:44:50 AM12/28/12
to
In article <87mwwyc...@engels.HistoricalMaterialism.info>,
Haines Brown <hai...@histomat.net> wrote:

> Where I enumerate items in a sentence. For example:
>
> There are several steps: 1) fight, 2) run.
>
> This seems to be a run-way argument, and I have to delete the .aux file
> before proceeding. If I try 1\), it produces error: Bad math environment
> delimiter. ...

Howdy,

No problem compiling that here so you really need to give us a minimal
by complete and compilable example that reproduces your problem. What
packages are you using, etc?

Good Luck,
Herb Schulz

Haines Brown

unread,
Dec 28, 2012, 1:58:05 PM12/28/12
to
Herbert Schulz <he...@wideopenwest.com> writes:

> In article <87mwwyc...@engels.HistoricalMaterialism.info>,

> No problem compiling that here so you really need to give us a minimal
> by complete and compilable example that reproduces your problem. What
> packages are you using, etc?

Herb, here it is:

%!TEX TS-program = xetex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}%
\usepackage{xltxtra}%
\usepackage{polyglossia}
\setmainlanguage{english}
\usepackage[backend=biber,style=authoryear,sorting=nyt,hyperref=true,backref=true]{biblatex}
\setmainfont[Ligatures=TeX,Mapping=tex-text]{Garamond 3 LT Std}
\begin{document}
Here are the chktex errors:

% 15:2:Non-breaking space (`~') should have been used
\dots the end. \cite{Smeenk2006} is neither \dots good \dots nor bad.
% When I correct this, no warning, but then second sentence forced on same line
% as prior, which seems problematic.

% "44:10:solo `]' found".
\dots holds this position~\cite[as in][5--1]{Smeenk2006} says \dots.

% "10:10:Solo `)' found".
So either 1) fight or 2) run.

% 1:17:Number of `(' doesn't match the number of `)'!
\end{document}

Dan

unread,
Dec 28, 2012, 3:41:04 PM12/28/12
to
On Dec 28, 12:58 pm, Haines Brown <hai...@histomat.net> wrote:
> Herbert Schulz <he...@wideopenwest.com> writes:
> > In article <87mwwycle0....@engels.HistoricalMaterialism.info>,
> > No problem compiling that here so you really need to give us a minimal
> > by complete and compilable example that reproduces your problem. What
> > packages are you using, etc?
>
> Herb, here it is:
>
> \documentclass[12pt]{article}%

[The document preamble appears to be irrelevant.]

> \begin{document}
> Here are the chktex errors:
>
> % 15:2:Non-breaking space (`~') should have been used
> \dots the end. \cite{Smeenk2006} is neither \dots good \dots nor bad.
> % When I correct this, no warning, but then second sentence forced on same line
> % as prior, which seems problematic.

Chktex is a rather limited program. It cannot find all
TeX errors (only TeX can do that), but it can check for
common typing errors. Normally one uses the command
\cite _after_ a description of something, so there should not
be a break before it. The above warns you about that.

>
> % "44:10:solo `]' found".
> \dots holds this position~\cite[as in][5--1]{Smeenk2006} says \dots.

I would guess chktex doesn't expect \cite to have two
optional arguments and takes the second "[" to be the
argument of \cite and then finds the mismatched "]" in
position 44. Mismatched braces, brackets and parentheses
are common typos that chktex tries to flag. Perhaps
chktex can be configured to allow \cite to have two optional
arguments.

One can also use "chktex -n10 ..." to turn off bracket matching
warnings.

>
> % "10:10:Solo `)' found".
> So either 1) fight or 2) run.

This is self explanatory: chktex has found an unmatched
parenthesis. It is obvious that it can't possibly know
whether this is intentional. Apparently all such mismatched
delimiters are flagged. You could avoid it by defining a
command for lists like this. For example:
\newcommand{\inlineitem}[1]{#1)}
...
\inlineitem{1} fight or \inlineitem{2} run...

Or chose a different system for inline list labels. I almost
always use matching parentheses:
...(1) fight or (2) run...

>
> % 1:17:Number of `(' doesn't match the number of `)'!
> \end{document}

This is a summary of the documentwide matching of parentheses.

From the documentation (ChkTeX.pdf page 2):
"...it is important to realize that the output from ChkTEX is only
intended as a guide to fixing faults. However, it is by no means
always correct. This means that correct LATEX code may
produce errors in ChkTEX, and vice versa".

It is something like a spell- or grammar-checker. There are
always false positives and false negatives. If you find the these
behaviors of chktex not to your liking, then maybe chktex is not
the right tool for you.


Dan

Haines Brown

unread,
Dec 28, 2012, 5:44:47 PM12/28/12
to

Thanks, Dan. You have put my mind at ease about these error messages.

Dan <luec...@uark.edu> writes:

> Normally one uses the command \cite _after_ a description of
> something, so there should not be a break before it. The above warns
> you about that.

OK, so I'll just ignore the error.

>> % "44:10:solo `]' found".
>> \dots holds this position~\cite[as in][5--1]{Smeenk2006} says \dots.
>
> I would guess chktex doesn't expect \cite to have two optional
> arguments

This comes as a surprise, but so be it.

>> % "10:10:Solo `)' found".
>> So either 1) fight or 2) run.
>
> You could avoid it by defining a command for lists like this. For
> example:

> \newcommand{\inlineitem}[1]{#1)}
> ...
> \inlineitem{1} fight or \inlineitem{2} run...

Yes, such a work-around was what I was hoping for. It's not that I
habitually do this, but I was concerned lest there a deeper trouble.

>> % 1:17:Number of `(' doesn't match the number of `)'!
>> \end{document}
>
> This is a summary of the documentwide matching of parentheses.

Aha. But it was a misleading way to say it.

> It is something like a spell- or grammar-checker. There are always
> false positives and false negatives. If you find the these behaviors
> of chktex not to your liking, then maybe chktex is not the right tool
> for you.

I fun chktex under flymake, and in my system, its default reliance on
texify does not work, so forced to use chktex. I find it handy to spot
obvious mistakes, and as you suggest I should not be intimidated by
false positives.

Thanks

Haines


Robin Fairbairns

unread,
Dec 29, 2012, 9:35:36 AM12/29/12
to
Haines Brown <hai...@histomat.net> writes:

> Thanks, Dan. You have put my mind at ease about these error messages.

to first order, you shouldn't expect chktex to understand things that
only appeared after it was written ... unless someone's.

what's more, its README file says

It is important to remember that ChkTeX is only intended as a *guide*
to fixing faults. It is by no means always correct. This means that
correct LaTeX code may produce errors in ChkTeX, and vice versa:
incorrect LaTeX code may pass silently through. If you have ideas for
new warnings or ways in which current warnings could be improved,
please report them on the
[bug tracker](https://savannah.nongnu.org/bugs/?group=chktex).

so, if you feel that any of your "non-"errors are worthy of the author's
attention, perhaps you might submit a suggestion.
--
Robin Fairbairns, Cambridge
sorry about all this posting. i'll go back to sleep in a bit.

Herbert Schulz

unread,
Dec 29, 2012, 9:37:57 AM12/29/12
to
In article <87ip7mc...@engels.HistoricalMaterialism.info>,
Howdy,

I don't have `Garamond 3 LT Std' so substituted `Hoefler Text'.

I don't have your bib file so I never ran biber, etc.

I looked in `Guide to LaTeX' as well as `The LaTeX Companion' and found
no reference to have two optional arguments for the \cite command; the
\citep command has two optional arguments. Is that a special feature of
biblatex?

Compiling using xelatex (not xetex as you have in the TS-program line) I
get no mention of mismatched parentheses.

Placing \listfiles at the top of the file gives the following files and
versions:
*File List*
article.cls 2007/10/19 v1.4h Standard LaTeX document class
size12.clo 2007/10/19 v1.4h Standard LaTeX file (size option)
xltxtra.sty 2010/09/20 v0.5e Improvements for the "XeLaTeX" format
ifluatex.sty 2010/03/01 v1.3 Provides the ifluatex switch (HO)
ifxetex.sty 2010/09/12 v0.6 Provides ifxetex conditional
fontspec.sty 2012/05/06 v2.2b Advanced font selection for
XeLaTeX/LuaLaTeX
expl3.sty 2012/12/21 v4390 L3 Experimental code bundle wrapper
l3names.sty 2012/12/07 v4346 L3 Namespace for primitives
l3bootstrap.sty 2012/07/16 v3991 L3 Experimental bootstrap code
etex.sty 1998/03/26 v2.0 eTeX basic definition package (PEB)
l3basics.sty 2012/11/24 v4339 L3 Basic definitions
l3expan.sty 2012/08/28 v4149 L3 Argument expansion
l3tl.sty 2012/11/24 v4339 L3 Token lists
l3seq.sty 2012/11/24 v4339 L3 Sequences and stacks
l3int.sty 2012/09/26 v4237 L3 Integers
l3quark.sty 2012/11/04 v4268 L3 Quarks
l3prg.sty 2012/11/24 v4339 L3 Control structures
l3clist.sty 2012/11/24 v4339 L3 Comma separated lists
l3token.sty 2012/12/20 v4384 L3 Experimental token manipulation
l3prop.sty 2012/09/09 v4212 L3 Property lists
l3msg.sty 2012/09/09 v4212 L3 Messages
l3file.sty 2012/12/20 v4377 L3 File and I/O operations
l3skip.sty 2012/11/04 v4260 L3 Dimensions and skips
l3keys.sty 2012/11/02 v4256 L3 Experimental key-value interfaces
l3fp.sty 2012/11/10 v4305 L3 Floating points
l3box.sty 2012/12/08 v4347 L3 Experimental boxes
l3coffins.sty 2012/09/09 v4212 L3 Coffin code layer
l3color.sty 2012/08/29 v4156 L3 Experimental color support
l3luatex.sty 2012/08/03 v4049 L3 Experimental LuaTeX-specific
functions
l3candidates.sty 2012/12/20 v4383 L3 Experimental additions to
l3kernel
ifpdf.sty 2011/01/30 v2.3 Provides the ifpdf switch (HO)
xparse.sty 2012/12/21 v4390 L3 Experimental document command parser
fontspec-patches.sty 2012/05/06 v2.2b Advanced font selection for
XeLaTeX/Lu
aLaTeX
fixltx2e.sty 2006/09/13 v1.1m fixes to LaTeX
fontspec-xetex.sty 2012/05/06 v2.2b Advanced font selection for
XeLaTeX/LuaL
aTeX
fontenc.sty
eu1enc.def 2010/05/27 v0.1h Experimental Unicode font encodings
eu1lmr.fd 2009/10/30 v1.6 Font defs for Latin Modern
xunicode.sty 2011/09/09 v0.981 provides access to latin accents and
many oth
er characters in Unicode lower plane
eu1lmss.fd 2009/10/30 v1.6 Font defs for Latin Modern
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2010/04/23 v1.9 graphics configuration of TeX Live
xetex.def 2009/11/22 v0.94 LaTeX color/graphics driver for XeTeX
(RRM/JK)

fontspec.cfg
realscripts.sty 2010/09/30 v0.3 Access OpenType subscripts and
superscripts
metalogo.sty 2010/05/29 v0.12 Extended TeX logo macros
polyglossia.sty 2012/04/29 v1.2.1 Babel replacement for XeLaTeX
etoolbox.sty 2011/01/03 v2.1 e-TeX tools for LaTeX
makecmds.sty 2009/09/03 v1.0a extra command making commands
xkeyval.sty 2012/10/14 v2.6b package option processing (HA)
xkeyval.tex 2012/10/14 v2.6b key=value parser (HA)
gloss-english.ldf polyglossia: module for english
biblatex.sty 2012/11/27 v2.4 programmable bibliographies (PK/JW/AB)
biblatex2.sty 2012/11/27 v2.4 programmable bibliographies (biber)
(PK/JW/AB)

kvoptions.sty 2011/06/30 v3.11 Key value format for package options
(HO)
ltxcmds.sty 2011/11/09 v1.22 LaTeX kernel commands for general use
(HO)
kvsetkeys.sty 2012/04/25 v1.16 Key value parser (HO)
infwarerr.sty 2010/04/08 v1.3 Providing info/warning/error messages
(HO)
etexcmds.sty 2011/02/16 v1.5 Avoid name clashes with e-TeX commands
(HO)
logreq.sty 2010/08/04 v1.0 xml request logger
logreq.def 2010/08/04 v1.0 logreq spec v1.0
ifthen.sty 2001/05/26 v1.1c Standard LaTeX ifthen package (DPC)
url.sty 2006/04/12 ver 3.3 Verb mode for urls, etc.
blx-dm.def
authoryear.dbx
biblatex-dm.cfg
blx-compat.def 2012/11/27 v2.4 biblatex compatibility (PK/JW/AB)
biblatex.def
standard.bbx 2012/11/27 v2.4 biblatex bibliography style (PK/JW/AB)
authoryear.bbx 2012/11/27 v2.4 biblatex bibliography style (PK/JW/AB)
authoryear.cbx 2012/11/27 v2.4 biblatex citation style (PK/JW/AB)
biblatex.cfg
english.lbx 2012/11/27 v2.4 biblatex localization (PK/JW/AB)
t3cmr.fd 2001/12/31 TIPA font definitions
***********

This is with a fully up to date TeX Live 2012 as of 2012/12/29.

PS: why not use the paralist package for in-line lists?

Good Luck,
Herb Schulz

Ronnie Marksch

unread,
Dec 29, 2012, 11:09:21 AM12/29/12
to
You (might) want to use the environment inparaenum of the package paralist.

Axel Berger

unread,
Dec 29, 2012, 2:24:41 PM12/29/12
to
Dan wrote:
> You could avoid it by defining a command for lists like this.

Better still, use the package paralist, written for just that purpose
and doing it well.

Lee Rudolph

unread,
Dec 29, 2012, 2:44:09 PM12/29/12
to
I am generally very happy with paralist, which I use extensively.
One thing I wish it (or some cooperating package) could do, that
it doesn't as far as I know, is somehow retain the customized
presentation of an item when it is \ref'd. That is, LaTeXing

For instance, \begin{inparaenum}[1)]
\item\label{here}
the adverb-of-location ``here'' corresponds to
the demonstrative pronoun ``this'',
\item\label{there}
the adverb-of-location ``there'' corresponds to
the demonstrative pronoun ``that'', but
\item\label{yonder}
the obsolescent adverb-of-location ``younder''
seemingly has no corresonding demonstrative pronoun.
\end{inparaenum}
The contrast between \ref{here} and \ref{there},
on the one hand, and \ref{yonder}, on the other,
is regrettable.

produces

For instance, 1) the adverb-of-location ``here''
...
The contrast between 1 and 2, on the one hand,
and 2, on the other, is regrettable.

Similarly for \begin{inparaenum}[\lbrack i \rbrack]
and so on.

This is of course what one ought to expect. Now,
amsmath includes \eqref, which encloses the
\ref'd material in round parentheses (); this is
quite reasonable too, given the AMS's house style.

But it happens to me, often enough to be annoying,
that I decide to change the formatting of the items
in a list; and I do wish that paralist (by preference),
which does after all "know" what non-counter material
it is including in each formatted item, could somehow
be coaxed into using that knowledge to save me the
bother of changing the formatting of references to
list items by hand.

Lee Rudolph

0 new messages