Discussion:
[texhax] chktex, are it's reports any good?
g***@mail.com
2017-04-16 00:50:41 UTC
Permalink
A few days ago I found and ran chtex over my source. Though my source
produces correct results when latex runs it over I did get a surprising
amount of warnings. I have been rather through about reading about
latex, so some things are easy to fix but hard to understand why they are
wrong, the opposite is true for others so please land a hand (I have
removed duplicate warnings).

Thanks,
David


% chktex wms.tex
ChkTeX v1.7.1 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with PCRE regex support.


Warning 18 in wms.tex line 36: Use either `` or '' as an alternative to
`"'. Also, several of the WMs advertize "session managment" which should
remember ^

# What is wrong with "?

Warning 13 in wms.tex line 39: Intersentence spacing (`\@') should
perhaps be used.
is managed when restarting the WM. So "session management" means several
things ^

# I'm lost here

Warning 44 in wms.tex line 52: User Regex: -2:Vertical rules in tables
are ugly. \begin{tabular}{l|l|l|l|l|l|l|l|l|l}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

# What is a vertical rule, and how do I avoid it?

Warning 1 in wms.tex line 338: Command terminated with space.
\cleardoublepage
^
# Don't all commands end with a space?

Warning 26 in wms.tex line 348: You ought to remove spaces in front of
punctuation.
Your welcome to test it yourself and submit your findings :)
^
# How do you make a smiley then?

Warning 9 in wms.tex line 348: `}' expected, found `)'.
Your welcome to test it yourself and submit your findings :)
^
Warning 10 in wms.tex line 350: Solo `}' found.
some WMs and not on others.}
^
# If I write something like this (and that too).
# What do I do to not upset chktex?



_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: ***@tug.org
Rolf Turner
2017-04-16 01:31:55 UTC
Permalink
See inline below.
Post by g***@mail.com
A few days ago I found and ran chtex over my source. Though my source
produces correct results when latex runs it over I did get a surprising
amount of warnings. I have been rather through about reading about
latex, so some things are easy to fix but hard to understand why they are
wrong, the opposite is true for others so please land a hand (I have
removed duplicate warnings).
Thanks,
David
% chktex wms.tex
ChkTeX v1.7.1 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with PCRE regex support.
Warning 18 in wms.tex line 36: Use either `` or '' as an alternative to
`"'. Also, several of the WMs advertize "session managment" which should
remember ^
# What is wrong with "?
*Look* at the result for crying out loud! A keyboard double quote mark
is always rendered as two acute accents, which is OK at the end of a
quotation, but you want two acute accents at the beginning.
Post by g***@mail.com
perhaps be used.
is managed when restarting the WM. So "session management" means several
things ^
# I'm lost here
Not sure about this. Perhaps the warning is because the tail of the "g"
in "managed" is sticking down too far into the next line.
Post by g***@mail.com
Warning 44 in wms.tex line 52: User Regex: -2:Vertical rules in tables
are ugly. \begin{tabular}{l|l|l|l|l|l|l|l|l|l}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# What is a vertical rule, and how do I avoid it?
The vertical rules are the vertical rules!!! As in ... l|l|l ...

Avoid them by leaving them out. Use ...lll... .

These days typographers frown on vertical rules for some reason. One is
often exhorted to use the booktabs package which forbids them. I'm not
sure I completely agree with the typographers. Apparently Lamport
didn't, when he wrote "LaTeX: A Document Preparation System", for he
used vertical rules freely.
Post by g***@mail.com
Warning 1 in wms.tex line 338: Command terminated with space.
\cleardoublepage
^
# Don't all commands end with a space?
No. None do, really.
Post by g***@mail.com
Warning 26 in wms.tex line 348: You ought to remove spaces in front of
punctuation.
Your welcome to test it yourself and submit your findings :)
^
# How do you make a smiley then?
Perhaps: ... findings \texttt{ :-) }

Or put \usepackage{wasysym} in your preamble and use \smiley.
Post by g***@mail.com
Warning 9 in wms.tex line 348: `}' expected, found `)'.
Your welcome to test it yourself and submit your findings :)
^
Warning 10 in wms.tex line 350: Solo `}' found.
some WMs and not on others.}
^
Well, it looks to me like you've got an unbalanced brace, i.e. a right
"}" with no balancing left "{".
Post by g***@mail.com
# If I write something like this (and that too).
# What do I do to not upset chktex?
Do things correctly?

You should also learn some English; it's "you're welcome" not "your welcome"

cheers,

Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: ***@tug.org
David Carlisle
2017-04-16 09:16:47 UTC
Permalink
Post by g***@mail.com
A few days ago I found and ran chtex over my source. Though my source
produces correct results when latex runs it over I did get a surprising
amount of warnings. I have been rather through about reading about
latex, so some things are easy to fix but hard to understand why they are
wrong, the opposite is true for others so please land a hand (I have
removed duplicate warnings).
Thanks,
David
% chktex wms.tex
ChkTeX v1.7.1 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with PCRE regex support.
Warning 18 in wms.tex line 36: Use either `` or '' as an alternative to
`"'. Also, several of the WMs advertize "session managment" which should
remember ^
# What is wrong with "?
" is never correct as an input character. Depending on the font encoding in
use it may, produce a double right quote
but even that is not guaranteed in general. use ` ` ' ' (without the
spaces)
Post by g***@mail.com
perhaps be used.
is managed when restarting the WM. So "session management" means several
things ^
# I'm lost here
after WM. the . is taken to be marking an abbreviation so if, as seems
likely given the capital S following,
Post by g***@mail.com
Warning 44 in wms.tex line 52: User Regex: -2:Vertical rules in tables
are ugly. \begin{tabular}{l|l|l|l|l|l|l|l|l|l}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# What is a vertical rule, and how do I avoid it?
Se the booktabs package for a diatribe on the evils of vertical rules:-)
Unlike the others this is simply suggesting a stylistic choice, that you
avoid
vertical rules in tables (by not using |)
Post by g***@mail.com
Warning 1 in wms.tex line 338: Command terminated with space.
\cleardoublepage
^
# Don't all commands end with a space?
well yes but if it was "\LaTeX is weird" the space intended to be output
would
just be taken as a command termination, and you'd need \LaTeX\ is
Presumably the checking command can not classify commands that produce
text from those like \cleardoublepage that do not. So the warning is
spurious here.
Post by g***@mail.com
Warning 26 in wms.tex line 348: You ought to remove spaces in front of
punctuation.
Your welcome to test it yourself and submit your findings :)
^
# How do you make a smiley then?
Warning 9 in wms.tex line 348: `}' expected, found `)'.
Your welcome to test it yourself and submit your findings :)
again this is implementing a style suggestion based on classical
english punctuation. If you are making smiley's (or if you are French)
this advice is probably not right for your uses.

^
Post by g***@mail.com
Warning 10 in wms.tex line 350: Solo `}' found.
some WMs and not on others.}
^
# If I write something like this (and that too).
# What do I do to not upset chktex?
That looks like a TeX syntax error if it really is an unmatched }

David
Philip Taylor
2017-04-16 09:33:35 UTC
Permalink
Post by David Carlisle
" is never correct as an input character.
I think that the validity of that observation hinges on the interpretation of "an input character".

'"' is not only correct, but actually required, in constructions such as '\char "62' if the '62' is to be interpreted to base-16, and of course in 8-bit systems notations such as 'Schr\"oder' are also needed in order to achieve a diaresis/umlaut. Knuth's own guidance is probably the best here :

'There are four remaining special characters in the standard ASCII set: " | < > ... you don't really want them when you are typesetting text'.

Philip Taylor

_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: ***@tug.org
David Carlisle
2017-04-16 09:36:37 UTC
Permalink
Post by Philip Taylor
I think that the validity of that observation hinges on the
interpretation of "an input character".

Oh yes, that's the distinction I intended (but perhaps didn't state well),
" is legal syntax in lots of constructions but never as a character to be
passed straight through from the input to be typeset.

David
David Niklas
2017-04-19 00:22:45 UTC
Permalink
On Sun, 16 Apr 2017 13:31:55 +1200
Post by Rolf Turner
See inline below.
Post by g***@mail.com
A few days ago I found and ran chtex over my source. Though my source
produces correct results when latex runs it over I did get a
surprising amount of warnings. I have been rather through about
reading about latex, so some things are easy to fix but hard to
understand why they are wrong, the opposite is true for others so
please land a hand (I have removed duplicate warnings).
Thanks,
David
% chktex wms.tex
ChkTeX v1.7.1 - Copyright 1995-96 Jens T. Berger Thielemann.
Compiled with PCRE regex support.
Warning 18 in wms.tex line 36: Use either `` or '' as an alternative
to `"'. Also, several of the WMs advertize "session managment" which
should remember ^
# What is wrong with "?
*Look* at the result for crying out loud! A keyboard double quote mark
is always rendered as two acute accents, which is OK at the end of a
quotation, but you want two acute accents at the beginning.
Actually, I've been using latex2html and viewing the file with lynx.
I see a "
But I understand now, thanks.
Post by Rolf Turner
Post by g***@mail.com
perhaps be used.
is managed when restarting the WM. So "session management" means
several things ^
# I'm lost here
Not sure about this. Perhaps the warning is because the tail of the
"g" in "managed" is sticking down too far into the next line.
Another mail from David Carlisle answered this, thanks David!
Post by Rolf Turner
Post by g***@mail.com
Warning 44 in wms.tex line 52: User Regex: -2:Vertical rules in tables
are ugly. \begin{tabular}{l|l|l|l|l|l|l|l|l|l}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# What is a vertical rule, and how do I avoid it?
The vertical rules are the vertical rules!!! As in ... l|l|l ...
I thought it was a pipe character...
I need to start a series:
"How the Linux command line corrupted me."
Post by Rolf Turner
Avoid them by leaving them out. Use ...lll... .
These days typographers frown on vertical rules for some reason. One
is often exhorted to use the booktabs package which forbids them. I'm
not sure I completely agree with the typographers. Apparently Lamport
didn't, when he wrote "LaTeX: A Document Preparation System", for he
used vertical rules freely.
Post by g***@mail.com
Warning 1 in wms.tex line 338: Command terminated with space.
\cleardoublepage
^
# Don't all commands end with a space?
No. None do, really.
Then how do they end?
Still kinda lost on this one.
I'll add another warning so you and Mr. Carlisle can perhaps better see
what's going on:

Warning 1 in wms.tex line 54: Command terminated with space.
ctwm & 4.0.0\footnote & 438951 & 7704 .......
^
Post by Rolf Turner
Post by g***@mail.com
Warning 26 in wms.tex line 348: You ought to remove spaces in front of
punctuation.
Your welcome to test it yourself and submit your findings :)
^
# How do you make a smiley then?
Perhaps: ... findings \texttt{ :-) }
Or put \usepackage{wasysym} in your preamble and use \smiley.
Thanks.
Post by Rolf Turner
Post by g***@mail.com
Warning 9 in wms.tex line 348: `}' expected, found `)'.
Your welcome to test it yourself and submit your findings :)
^
Warning 10 in wms.tex line 350: Solo `}' found.
some WMs and not on others.}
^
Well, it looks to me like you've got an unbalanced brace, i.e. a right
"}" with no balancing left "{".
Post by g***@mail.com
# If I write something like this (and that too).
# What do I do to not upset chktex?
Do things correctly?
Siri, define ``correctly''....
It apears that perhaps chktex is getting caught on the ) and then sees
a }. In any case, how do you add parenthesis to Latex? Is the above
contrived example correct?
Post by Rolf Turner
You should also learn some English; it's "you're welcome" not "your
welcome"
I should have caught that. I must really look (be) stupid online
sometimes.

Thanks,
David

_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: ***@tug.org
Susan Dittmar
2017-04-19 10:13:01 UTC
Permalink
Post by David Niklas
On Sun, 16 Apr 2017 13:31:55 +1200
Post by Rolf Turner
Post by g***@mail.com
# Don't all commands end with a space?
No. None do, really.
Then how do they end?
Still kinda lost on this one.
A command ends at the point where anything other than a command starts.
A space is one such possibility and perfectly fine.

The warning has more to do with a common mistake TeX-newbies make. Many
users tend to forget that space after a command is very likely to be
gobbled up. So this warning should perhaps read "in case you expect a
space in output at this point, you forgot to explicitly tell TeX so".

Susan
_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: ***@tug.org
Rolf Turner
2017-04-19 21:51:39 UTC
Permalink
Post by Susan Dittmar
Post by David Niklas
On Sun, 16 Apr 2017 13:31:55 +1200
Post by Rolf Turner
Post by g***@mail.com
# Don't all commands end with a space?
No. None do, really.
Then how do they end?
Still kinda lost on this one.
A command ends at the point where anything other than a command starts.
A space is one such possibility and perfectly fine.
The warning has more to do with a common mistake TeX-newbies make. Many
users tend to forget that space after a command is very likely to be
gobbled up. So this warning should perhaps read "in case you expect a
space in output at this point, you forgot to explicitly tell TeX so".
Beautifully expressed. Wish I'd said that! :-)

cheers,

Rolf Turner
--
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: ***@tug.org
David Niklas
2017-04-22 21:25:15 UTC
Permalink
On Wed, 19 Apr 2017 12:13:01 +0200
Post by Susan Dittmar
Post by David Niklas
On Sun, 16 Apr 2017 13:31:55 +1200
Post by Rolf Turner
Post by g***@mail.com
# Don't all commands end with a space?
No. None do, really.
Then how do they end?
Still kinda lost on this one.
A command ends at the point where anything other than a command starts.
A space is one such possibility and perfectly fine.
The warning has more to do with a common mistake TeX-newbies make. Many
users tend to forget that space after a command is very likely to be
gobbled up. So this warning should perhaps read "in case you expect a
space in output at this point, you forgot to explicitly tell TeX so".
Susan
Thanks! For a while I was wondering if every guide on Latex up to this
point had steered me wrong.
Post by Susan Dittmar
Actually, I've been using latex2html and viewing the file with lynx.
I see a "
But I understand now, thanks.
latex2html only outputs a " when a " is used, when you use a `` and ''
then you get a `` and ''. I think I aught to report this upstream and see
what they say.

Thanks,
David
_______________________________________________
TeX FAQ: http://www.tex.ac.uk/faq
Mailing list archives: http://tug.org/pipermail/texhax/
More links: http://tug.org/begin.html

Automated subscription management: http://tug.org/mailman/listinfo/texhax
Human mailing list managers: ***@tug.org

Loading...