LaTeX Proper Use of LaTeX: Common Typographical Errors

  • Thread starter Thread starter DrClaude
  • Start date Start date
  • Tags Tags
    Errors Latex
Click For Summary
The discussion focuses on common typographical errors in LaTeX documents that hinder readability, particularly for students. Key issues include improper use of italics, incorrect spacing between numbers and units, and the use of symbols inappropriately, such as using relational symbols instead of proper delimiters in mathematical expressions. Participants emphasize the importance of consistent formatting, such as ensuring proper spacing after abbreviations and avoiding line breaks in the middle of expressions. Overall, the conversation highlights the need for a style guide that addresses these common pitfalls to improve the quality of LaTeX documents.
  • #31
Some general pet peeves of mine.
  1. Use \par not \\ outside of some kind of environment that specifically makes use of \\, e.g align. Can also use a blank line in the code.
  2. Use \left \right to scale parentheses
  3. Prepare your preamble, if you need to change how something looks, you can do so in the preamble. Seen so many beginner students manually enumerating their sections, subsections or doing spacings between sections :nb).
 
Physics news on Phys.org
  • #32
Well as I am using it only for legibility in homework help, perfectionism beyond a certain point I cannot justify more investment of time in, though I try up to that point. When you write ln and other function abbreviations you want it italics ##ln##. But I could only get it in certain positions here, but in others I couldn't, got something else, red color.

https://www.physicsforums.com/threa...l-of-1-ln-x-doesnt-exist.866353/#post-6137523
 
  • #33
Orodruin said:
That someone else refuses to abide by standards (even if they are professional publishers or organisations) is not a good excuse not to abide by standards in my opinion. Regardless of how you find it aesthetically (especially if your aesthetics are off as in this case ).

The fact that it's used by professional publishers and organizations makes it a different standard though, not nonstandard :wink:
 
  • #34
cjl said:
The fact that it's used by professional publishers and organizations makes it a different standard though, not nonstandard :wink:
You mean they are like Apple with their phone chargers? Annoy everyone to no end by not conforming to the standard followed by everyone else ... :rolleyes:
 
  • #35
This is kind of a rehash, but I'm not sure how firm the grounds are for some differences. Pure opinion, tradition in your field? I think it is more the former for some of these choices. And I cannot get a grip on why for some of them.

Here is one example:

How about Abramowitz and Stegun - Handbook of Mathematical Functions? Pretty standard resource, IMO. My father's calculus book from 1931 use the same typeface as A&S.

Check out Page X, Sec 3 'Auxillary Functions and Arguments'

One of these gives @DrClaude headaches.
##\int x \, \mathrm{d}x## versus ##\int x \, dx##

... they use very one @DrClaude does not approve of. I cannot copy it very well, you may want to consider verifying what I said directly. I get that paradigms may change, but I think you need to consider that older standard resources may have a different take on what is/was correct. I do not know of an "ANSI standard" for Latex use. Please advise me if one exists. These guys do not know of one, either. See accepted answer:
https://tex.stackexchange.com/questions/275330/is-there-a-language-standard-iso-ansi-for-latex
 
Last edited:
  • #36
For units I suggest the use of siunitx package. It is powerful and complete, sticks with some convention(s). From it I learned that when using a range such as "from 9 to 15 K" is incorrect. The correct way to write it is by using the unit on both values.
 
  • #37
DrClaude said:
I recommend the package siunitx, which makes it easy to get the units right without much effort.
fluidistic said:
For units I suggest the use of siunitx package.
I can also endorse this package.
 
  • #38
Orodruin said:
Typesetting units in math mode: Units are not mathematical symbols. Do not typeset them as such. In running text, do not even enter math mode if you are just writing a number. End math mode after the number if it is part of an equation: ##\ell=2.32## cm.

Are you sure about this? You certainly need math mode if the unit contains fractions or exponents. Why not consistently use it? Also, I think you should never use math mode for only part of an equation, even if it doesn't make a visible difference in this case.

Actually, while it might not make a visible difference in a document, it certainly does in this forum, as the fonts are different.
##\ell=2.32## cm is certainly worse than ##\ell=2.32~\mbox{cm}##.
 
  • #39
I am not saying you should not include the unit in math mode. I am saying you should not typeset it in standard math mode, but use some way of typesetting it in your regular font. There are several ways of doing this that produce acceptable results.

greypilgrim said:
it certainly does in this forum, as the fonts are different.
This thread is not about the forum, but about a typical LaTeX document, as stated by OP.
DrClaude said:
I'm mostly concerned with actual LaTeX documents.
I also disagree with ##\ell = 2.32## cm being worse in forum form than ##\ell = 2.32~{\rm cm}##, but that is more a matter of taste.
 
  • #40
Orodruin said:
I am not saying you should not include the unit in math mode.

Actually you did say (and do) just that:
Orodruin said:
In running text, do not even enter math mode if you are just writing a number. End math mode after the number if it is part of an equation: ##\ell = 2.32## cm.

But alright, in the end it only matters how it looks in the processed document.
 
  • #41
robphy said:
I also prefer non-italicized subscripts for words:
Code:
\VEC F_{\scriptsize{\mbox{net on dog}}} 
\VEC F_{net\ on\ dog}

\VEC F_{\scriptsize{\mbox{net on dog}}}
vs
\VEC F_{net\ on\ dog}
(Maybe I should make a macro for that.)
I usually typeset subscripts like these this way:
Code:
\vec F_\text{net on dog}
\vec F_\text{net on dog}
 
  • Like
Likes Orodruin
  • #43
Greg Bernhardt said:
@DrClaude how did this document end up, any chance to share it with PF?
Not finished yet. I have a bunch of reports to correct, so (1) priorities, (2) I'm collecting more examples of common mistakes :smile:
 
  • Like
Likes Greg Bernhardt
  • #44
Another one, while not ##\LaTeX## per se, is the use of computer notation for powers of ten:
$$
V_0 = 1e-5
$$
instead of
$$
V_0 = 1\times 10^{-5}
$$
or
$$
V_0 = 10^{-5}
$$

I've also seen the inverse in code, something like
C:
hbar = 1.0545718 * pow (10., -34);
:eek:
 
  • Like
Likes vela
  • #45
Adding to the list: not entering accented characters properly.

This doesn't appear to be a problem with MathJax, but in regular ##\LaTeX##, a word such as Schrödinger entered as is will render as
##\text{Schrdinger}##.

One has to use, e.g., \"o or to use the inputenc package to allow for extended ASCII characters:
Code:
\usepackage[utf8]{inputenc}
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
7
Views
9K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K