Proper Use of LaTeX: Common Typographical Errors

  • LaTeX
  • Thread starter DrClaude
  • Start date
  • Tags
    Errors Latex
  • Featured
In summary,There are some things that always scorch my eyes, like improper italics [##sin(x)##] or incorrect typography of units [##128kg##].I wonder those of you who are sticklers for typography have other pet peeves of the kind.Personally, I'm mostly concerned with actual LaTeX documents. I'm spending lots of time right now correcting lab reports and some things keep cropping up.What I do care about is when it is used with improper spacing so that it is not clear at all what is there...$$\int x dx$$Note that the LaTeX code has the required space, but a space
  • #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.
 
Physics news on Phys.org
  • #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}

[itex]\VEC F_{\scriptsize{\mbox{net on dog}}} [/itex]
vs
[itex]\VEC F_{net\ on\ dog} [/itex]
(Maybe I should make a macro for that.)
I usually typeset subscripts like these this way:
Code:
\vec F_\text{net on dog}
[itex]\vec F_\text{net on dog}[/itex]
 
  • 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}
 
  • #46

Similar threads

Back
Top