198

I want to collect the most common mistakes, misconceptions, pitfalls, etc that (La)TeX and Friends users make. Please one answer for each mistake, misconception, pitfall, etc.

I am only interested in more technical, objective cases rather than psychological, social, subjective cases.

From this complete infinite list of technical and objective cases, we can have a reference how to teach newbies much better directly or indirectly via writing a good book.

The technical and object cases are, for example, as follows.

  • Beginners sometimes use $\huge E=mc^2$ with the hope they will get a huge formula. It actually does not produce the expected result. The correct way is \huge $E=mc^2$.
  • Beginner sometimes use longtable inside table because they assume longtable is the longer version of tabular which is able to be sandwiched in table.
  • etc.
22
  • 111
    Not reading an introduction and package documentation.
    – user10274
    Commented Oct 21, 2013 at 11:36
  • 15
    Aside from answering questions on this site when I don't have a clue what I'm talking about?
    – jub0bs
    Commented Oct 21, 2013 at 12:25
  • 13
    There is a similar Community poll on meta: meta.tex.stackexchange.com/a/1596/2693
    – Alan Munn
    Commented Oct 21, 2013 at 13:21
  • 8
    I don't really see how this can get sensible answers, I voted to close as "too broad". As @AlanMunn says the question on meta is perhaps a more suitable location (although it is not really a meta question about the site either) Commented Oct 21, 2013 at 13:53
  • 7
    Isn't this a sort of "everyone rant here" question?
    – marczellm
    Commented Oct 22, 2013 at 21:28

46 Answers 46

1
2
7

The first error for many TeX newbies is not backslashing figure brackets in formulae, when it should be backslashed. So they get $\min {x, 100 - x}$ or even $min {x, 100 - x}$ instead of $\min \{\, x, 100 - x\,\}$.

7

Attempting to use \ifeven...\else...\fi that actually does not exist. Note that only \ifodd...\else...\fi is available. Probably Knuth likes odd things.

4
  • 1
    Is this really a beginner's mistake? It took me quite a while to get to the point of using conditionals and, even then, I was using the ifthen package rather than TeX-like \if and friends! Until I read your answer, I'd never even heard of \ifodd.
    – cfr
    Commented Sep 21, 2014 at 18:32
  • @cfr: The word "beginner" has a relative meaning, so does the word "relative". :-) Commented Sep 21, 2014 at 18:41
  • 1
    Fair enough. I'm quite happy to admit I'm a pre-beginner who hopes one day to aspire to the status of an actual beginner ;).
    – cfr
    Commented Sep 21, 2014 at 20:33
  • Related: also covered in conditionals - Tikz \ifeven triggering error - TeX - LaTeX Stack Exchange.
    – user202729
    Commented Oct 10, 2022 at 17:51
6

Once I've seen a document template with a comment along the lines

% Tip: Always use eqnarray instead of align

:-(

6

Inconsistent syntax causes confusion

As there is a bit inconsistent syntax between length and counter, some users get confused with whether or not they need \.

They often wrongly type \setcounter{\countername}{<value>} rather than \setcounter{countername}{<value>}

and/or

\setlength{lengthname}{<dimen>} rather than \setlength{\lengthname}{<dimen>}.

Who made such an inconsistent syntax?

6
  • I still don't understand \bf vs \textbf{}. When do I use \centering vs \begin{center} \end{center}? LaTeX has many great features; a clear syntax is NOT one of them.
    – Canageek
    Commented Oct 24, 2013 at 21:00
  • @Canageek: I need a consistent syntax rather than a clear one. Commented Oct 24, 2013 at 21:03
  • Good point, those are clear, just not consistent.
    – Canageek
    Commented Oct 24, 2013 at 22:40
  • And it gets worse when considering packages! A lot of packages provide similar features with completely different syntaxes. This is scary, especially for beginners, but even experienced users probably have to look-up the documentation of a package to avoid errors.
    – Bakuriu
    Commented Oct 25, 2013 at 9:44
  • @Bakuriu: PSTricks' packages are some of them. Commented Oct 25, 2013 at 9:58
5

The mistake I always make, even to this day, is forgetting that newlines have syntactic meaning in LaTeX. I'm so used to using empty lines to delimit my text that I do it automatically, and then end up with ugly text (especially when indentation of the first line is enabled).

The other mistake I always make is forgetting when some command requires arguments, like \array, and then it automatically eats up the first thing after it, leading to the "why isn't it rendering the first element of my matrix?"

5

Using floating environments (table and figure) in beamer.

1
  • 2
    The beamer class redefines figure and table to be non-floating, so at least those are not the right examples to use in this case. I personally find it quite convenient to be able to copy and paste tables and figure definitions from my main document when preparing the presentation without having to worry about changing their names.
    – jja
    Commented Mar 27, 2014 at 16:30
5

Several days ago I taught my students how to plot some functions that are either algebraic or transcendental. As usual I introduced them to PSTricks for the sake of its full support for PostScript language.

All functions are expressed in infix form. Some of my students got confused with the algebraic key. They assumed that this key must be enabled via algebraic=true whenever they plot algebraic functions and set it to false whenever they plot transcendental functions. The code they wrote is more and less as follows.

\documentclass[pstricks,border=12pt]{standalone}
\usepackage{pst-plot}
\def\AlgeFunc{x^2-4} % an example of algebraic function
\def\TransFunc{sin(x)} % an example of transcendental function

\begin{document}
\begin{pspicture}(-3,-5)(3,2)
    \psplot[algebraic=true]{-2}{2}{\AlgeFunc}
    \psplot[algebraic=false]{-2}{2}{\TransFunc}
\end{pspicture}
\end{document}

Actually the algebraic key was created by PSTricks maintainers to allow users to switch from postfix expression (the default in PSTricks) to the infix one or vice versa by setting this key to either false (default) or true.

1
  • 1
    I'm a little late to that party, but ho—that's good… Commented Jun 19, 2014 at 12:14
5

Forgetting to add fontenc package when using accent letters.

\usepackage[T1]{fontenc}
5

The newbies don't use enough packages to get their work done. The best example is %, the siunitx package provides sophisticated way to print percentages but new users don't use it.

Another major mistake which they do is, they don't use updated distributions of TeXLive or MikTeX or update the packages atleast.

5

Another common mistake made by LaTeX newbies is to think that the \title command typesets the title and forget to use \maketitle to do that.

4

One mistake newbies can make is that of having text (in math mode) that extents outside then range of the document.

For example when trying to define Abstract Data Types with many sorts and constructors,the whole line would go until some of the text is just spilling over to the outside of the margin.

One solution would be to use the landscape or geometry package and choose margins that accommodate the work

4
  1. Having a LaTeX problem
  2. Googling it
  3. Opening a tex.SE link with an apparently relevant title
  4. Scrolling directly to the top rated answer(s)
  5. Pretending to understand the OP's question itself without even having to bother reading it (especially if it is long)
  6. (Only sometimes) Learn something new from the thread and possibly applying it in own work
  7. Voting the answer(s) that solved his/her problem (and probably the unread question too)
  8. Feeling grateful to tex.SE website and community
  9. Facing another LaTeX problem (Go To 2)
1
  • Is this a mistake? except probably point 5 Commented Apr 17, 2022 at 11:49
2

Personally I think, it is not to care if a given solution is deprecated. So the nag package, as "old habits die hard" and those are too much widespread all over the web.

Last but not least, not to search tex.stackexchange.com which helped me more than a hundred times so far. It helps to distinguish high value answers from bad code snippets in some boards.

I think anything else has been said, already.

2

I have seen people doing

\begin{center}
$\displaystyle ... $
\end{center}

instead of \[...\]

1

Trying to convince people that LateX is the best "program" to make your things done in a stylish way. Resulting in two possible reactions... 1) being called, mailed or texted a lot (and I mean a lot) about "how can I do this, how can I do that, is it possible to ... (so I send them to this site.) 2) I can do the same things in WORD... :-(

I don't know which one is the worst...

0

I (as a beginner typesetter) have corrected more that 10000 lines of LaTeX errors of almost 100 students theses and 10 professors books for free. Here are a short list of their mistakes (There are hundreds of mistakes that I have faced and don't want to remember them at all. They are terrible. very terrible! :( ):

  1. inserting \\ in blank space inside an environment or \\\\ --> Error: There is no line ...

  2. x_2_3 (they think that because x_2^3 is correct so that is also correct!!) and sometimes x_23 instead of x_{23}

  3. Wrong label place:

    %\label{aaa} %sometimes here!!!
    \begin{figure}
    \label{aaa}
    \centering
    \includegraphics[scale=0.9]{image}
    \caption{AAA}
    \end{figure}
    
  4. closing \{ with }!!

  5. closing \left( sometimes by \left) and sometimes by ).

  6. This is not a mistake but is awkward: \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,

  7. breaking an equation that contains \left without closing by \right.

  8. \supA instead of \sup A. Similarly \limA, \minA, \cosx etc.

P.S. Sorry for many answers in one post. they are really simple and small mistakes.

1
2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .