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.

46 Answers46

424

The most common mistake is spending too long on TeX coding and not getting the document written.

David Carlisle
  • 757,742
  • 37
    I was expecting "Not using emacs for coding". :) – Paulo Cereda Oct 21 '13 at 11:41
  • 35
    @PauloCereda I can't believe anyone makes that mistake. – David Carlisle Oct 21 '13 at 12:06
  • 6
    @Paulo an egregious error indeed – Sean Allred Oct 21 '13 at 12:29
  • 3
    @DavidCarlisle Indeed it is unbelievable that some people are not using Eamcs; it is perfectly sensible that you didn't write that. :) – Svend Tveskæg Oct 21 '13 at 17:54
  • It's easy to say when TeX coding does not really takes time for you... :) – masu Oct 21 '13 at 23:43
  • 74
    The most common mistake is spending too long on TeX coding for answering TeX.SX, ignoring families and friends, but not getting their own document written. – kiss my armpit Oct 22 '13 at 08:58
  • 9
    I couldn't begin to enumerate the times I've decided to create a NewDocumentEnvironment as a wrapper for another environment, with potentially special handling. This sucks away at least 70% of my writing time. Many times for me, I look back on it and say 'it just wasn't worth it.' I then proceed to do it again and again and again; it's an addiction. – Sean Allred Oct 22 '13 at 18:30
  • 29
    In my experience, this is not a beginners' mistake at all. Quite the opposite, in fact. – Raphael Oct 23 '13 at 06:22
  • 103 upvotes in a day. A new record? I guess @DavidCarlisle is catching up to @egreg in great strides ;-). – Ingo Oct 23 '13 at 10:19
  • 1
    I think this is true in particular for users of Tex Stack Exchange. For others, perhaps not so much. – gerrit Oct 24 '13 at 13:03
  • 14
    @DavidCarlisle Leslie Lamport gave an interview about 13 years ago, see here: http://research.microsoft.com/en-us/um/people/lamport/pubs/lamport-latex-interview.pdf , and he was asked to name three mistakes that people should stop making. Answer: »1. Worrying too much about formatting and not enough about content. 2. Worrying too much about formatting and not enough about content. 3. Worrying too much about formatting and not enough about content.« Funny interview. – Keks Dose Oct 25 '13 at 12:44
  • 4
    If Leslie Lamport had worried a little less about "protecting" us from the formatting and a little more about helping us control it, LaTeX would be a lot better for it. – alexis Oct 31 '13 at 12:21
  • I wish Leslie did something about multiple volume generation from a TeX document easily with all cross referencing, pagination, table numbering, figure number, acronym used etc.! – Khaaba May 09 '16 at 10:39
  • This article suggests that it is not only a beginner mistake, but that "On most measures, expert LaTeX users performed even worse than novice Word users". – Andreas Storvik Strauman Apr 15 '18 at 13:55
208

Here are some common, non-esoteric mistakes I help people fix on a regular basis:

  1. Ending each and every paragraph in the document with \\ (or even \\[10pt]) instead of a blank line.

  2. Ignoring warnings and errors until there's hundreds of them, and the new material isn't getting typeset at all. "Why can't I format my file? I have to finish chapter 2 by tomorrow."

  3. Using font attribute commands (or old-style font commands) as if they take arguments: This \bfseries{important} message... why is my entire dissertation bold?

  4. Cobbling together a complex series of commands for some text element (a symbol, a way to format headings or tables, etc.), then using it over and over and over instead of defining a macro. Then realizing it needs to be modified.

  5. Carrying along enormous preambles, donated by well-meaning friends, with no idea what they're for. Eventually there's a mysterious incompatibility, I'm asked to help, and I have no idea which packages are actually being used-- and neither does the author.

  6. Relying on \begin{table}[h!] (resp. {figure}), along with ad hoc page breaks etc., to typeset content that must not be floated. (But I hesitate to call this a mistake, because getting proper captions outside a float is not trivial: every package I've tried came with surprises.)

  7. Not using floats when they would be appropriate, given the size (and content) of tables or figures. This definitely seems like a Word holdover...

  8. Not capitalizing content words in BibTeX titles, and not protecting words that should never be lowercased: title = {A grammar of Late Modern English} will come out wrong under both capitalization styles.

  9. Pet peeve: Setting entire words in math mode subscripts, ignoring the fact that they look awful. S_{easy}, S_{difficult}, S_{the worst}. Way too many linguists do this.

  10. This one's not common but I've seen it happen: Formatting section headers by hand, using literal numbers and manual spacing:

    \\[12pt] 
    \textbf{2.3 The importance of semantic mark-up} 
    \\[10pt]
    
alexis
  • 7,961
  • 1
    Point 3. is valid for “new-style” font switches (\bfseries etc.), too. – Qrrbrbirlbel Oct 21 '13 at 14:54
  • 1
    +1: Manual localizations with \renewcommand instead of the use of babel or sg else; +2: using \def without precaution (instead of \newcommand); +3: manual "hyphenation" with the use of - only; You might want to mention an alternative at No9: $S_{\textrm{\scriptsize safe}}-S_{safe}$ – masu Oct 21 '13 at 23:02
  • 3
    +4: and a really annoying one: missing the % from the end of a line where it matters...; and (of course) I've given +1 to your great answer :) – masu Oct 21 '13 at 23:40
  • Pet peeve: Setting entire words in math mode subscripts, ignoring the fact that they look awful. S_{easy}, S_{difficult}, S_{the worst}. Way too many linguists do this.

    What's the correct way to do this?

    – Achal Dave Oct 22 '13 at 05:43
  • 1
    @Achal, use \textsubscript from the fixltx2e.sty package, or see this question for more detail and options. – alexis Oct 22 '13 at 09:45
  • 3
    Can you elaborate on point 8? When/why/how should I capitalise BibTeX titles — doesn't bibtex/biber take care of capitalisation? – gerrit Oct 22 '13 at 10:03
  • 1
    @gerrit: I thought there'd be plenty of tex.sx questions that deal with this, and indeed there are. But to my great surprise, I couldn't find any answers that cover it adequately. So I felt compelled to add my own answer to an old question. – alexis Oct 22 '13 at 11:40
  • @masu, those are good to point out; why don't you expand your comments into another answer? (BTW I'm happy to report that I've never seen the manual "hyphenation" :-)) – alexis Oct 22 '13 at 12:27
  • 1
    @alexis because I'm still trying to believe that they not the most common, just more common than they should be. – masu Oct 22 '13 at 12:31
  • 1
    +1 for point 8 (and your comprehesive answer to an old question) – Daniel Oct 22 '13 at 13:11
  • @alexis looks like \textsubscript also enters math mode according to your linked question. It seems there isn't a method as easy as a_{subscript} :( – Achal Dave Oct 22 '13 at 18:16
  • 1
    @Achal, try it! Stefan probably meant that \textsubscript relies on math mode for its implementation. But it can be invoked from text mode, and its content is formatted in text mode. Put S\textsubscript{not difficult} in a document and you'll see upright (roman) text, ligatures (ffi), and space between the words. – alexis Oct 22 '13 at 18:49
  • 4
    For "text" subscripts on genuinely math mode symbols I find $S_\text{not difficult}$ nicest -- this will use the text style of the context, unlike \mathrm and co. This is my #1 pet peeve, too (but from physicists in my case)! – andybuckley Oct 23 '13 at 09:05
  • I don't get what point 8 means exactly. Do you mean to lowercase only prepositions/articles et similia and capitalize all other words? Also "not protecting words that should never be lowercased" what does it mean? Giving a full complete example versus the incorrect one would clear this points. – Bakuriu Oct 23 '13 at 11:24
  • @Bakuriu, this topic is worth a whole other question and answer; you'll find them here. (See especially the reference to an article on capitalization styles). – alexis Oct 23 '13 at 11:26
  • Would "Writing a bit of code to do the footnote style you want when I'm first learning LaTeX, then copying it to every document, but not understanding why/how it works, and it breaks if I modify it much' count under 5? – Canageek Oct 23 '13 at 19:22
  • @Canageek, not if you still use it and know it's there. Understanding how X works is not a requirement in my book; just knowing that you're using it, and why. – alexis Oct 23 '13 at 19:58
  • 3
    I've also seen people writing $this$ when they meant \emph{this} – Juan A. Navarro Oct 24 '13 at 13:25
  • @Juan, yes, that's even worse because it's pointless! I don't see it much (linguists don't really know math mode exists), but it was mentioned yesterday in Don Kreher's answer. – alexis Oct 24 '13 at 13:44
  • I like how you didn't actually wrote what to do instead in case a beginner reads this thread. – FUZxxl Feb 08 '16 at 09:00
  • @FUZ, actually I took pains to indicate what to do instead. Excepting a couple that you'll find in any 5-page introductory tutorial (e.g. #10: \section), I either say what to do or it's just "don't do that, do the opposite". Is there something you'd like to see clarified? – alexis Feb 08 '16 at 22:01
  • @Alexis The only explanation I see is for no. 1. For example, for no. 9 you could have explained that the font should be changed in such a subscript. – FUZxxl Feb 08 '16 at 22:21
  • Look more carefully: #2, #5: Don't do that. #4: define a macro. #7, 8: Do as mentioned. For #9, don't keep it in math mode but switch to text mode (less obvious, I agree). – alexis Feb 08 '16 at 22:32
  • If I consider myself among novice TeX user, I die laughing now after going through all these mistakes initially... it was a big frustration but then experts here set me right :-D – Khaaba May 09 '16 at 10:33
87

Not making enough use – or (sadly all too frequently) not making hardly any use – of the opportunities afforded by LaTeX to separate the content of a document from its visual appearance. In particular, too many attempts to engage in visual formatting at early to intermediate stages of writing a working paper, a technical note, or whatever.

Addendum: The answer by @Alexis gives quite a few examples of mistakes that arise when one engages in (too much) visual formatting...

Mico
  • 506,678
  • 2
    Good man Mico. I was the first to plus one you yesterday. Using LaTeX only works if you forget about the visual appearance or if you're a guru. In both cases you need the structure offered by LaTeX. –  Oct 22 '13 at 10:00
  • 1
    @MarcvanDongen - Wow, thanks for the compliment!! – Mico Oct 22 '13 at 11:32
  • I ask then, when should one typeset their document if visual appearance is guaranteed from the commands? What if you have a huge multipage document to be written - would you not typeset it until the very end? – user71207 Aug 11 '21 at 06:12
  • @user71207 - I'm not sure if I've understood the gist of your follow-up questions. For me, the opposite of "separating the content of a document from its visual appearance" is to (a) engage in excessive visual formatting via commands such as \hspace, \vspace, \bigskip, etc. and (b) hard-code numbers of sections, theorems, etc instead of using LaTeX commands and environments intelligently. E.g., instead of \section{Introduction}, one sadly sometimes finds \par\vspace{1cm}\noindent\textbf{\Large 1.\hspace{3mm} Introduction}\par\vspace{0.7cm}\noindent. (Yes, I've come across this!) – Mico Aug 11 '21 at 13:56
  • @user71207 (comment continued) To me, the opposite of "visual formatting" is "high-level formatting". E.g., if a publisher requires you to enlarge the font size used to typeset the argument of \author, high-level formatting would consist of modifying the \maketitle macro suitably. If I've understood your follow-up questions correctly, they may be orthogonal to the point of my answer. My personal view is that once the basic structure of the document and contents of the preamble are set up, it's good practice to recompile the document every few minutes in order to catch input mistakes early. – Mico Aug 11 '21 at 14:04
75

DONT Read tutorials that advise best practices from the stone age.

Especially german LaTeX tutorials advise something like this in the preamble:

\usepackage[latin9]{inputenc}
\usepackage[T1]{fontenc}

Then i see a lot of people that are writing umlauts like this: \"u. Please forget this!

DO In times of UTF8 use \usepackage[utf8]{inputenc} and you're done. No need for magic to write foreign characters!

DO Another good advice is to use xelatex instead of pdflatex to compile your document. The advantage is, that you can change the fonts in your document quite easily, without shooting yourself in the foot!

DO Read and try to understand the build log! Looking for the source of compile errors is quite hard for TeX beginners (sometimes even for more advanced users), thus it's very helpful to get a look for relevant error messages!

UPDATE

DO Use the nag package (\usepackage[l2tabu]{nag}) to get warnings when using bad practices or obsolete TeX-style commands. It is also helpful to read the documentation ( german "Sündenregister", english). After reading this, you can decide if a tutorial is using obsolete commands or other bad practices.

lblb
  • 3,454
klingt.net
  • 1,176
  • 30
    »DONT Read tutorials that advise best practices from the stone age.« -- that's easily said but how should a newbie judge if a recommendation is outdated? – cgnieder Oct 22 '13 at 08:59
  • What's wrong with writing "u, \aa, etc.? Does it produce an incorrect result? – gerrit Oct 22 '13 at 10:06
  • 7
    @gerrit it's unnecessarily complex. To much complexity is always bad ;) – klingt.net Oct 22 '13 at 10:24
  • utf8 encoding never worked well for me. There is always one tool in the chain that doesn't support it. As a German, latin1 serves my needs perfectly while not breaking any tools on the way. – papabravo Oct 22 '13 at 12:06
  • @cgnieder: That is true, it's not easy to judge if something is outdated. I wrote this, because i read at the beginning a lot of tutorials that were outdated, until i found this one http://www.n.ethz.ch/~rephilip/download/Studium%20usw/LaTeX/diplomarbeit_mit_latex_v1.11.pdf Maybe newbies should search here on tex.stackexchange for answers. Because bad practices usually don't get many votes and if they are bad advice, then someone will clearify it with a comment. – klingt.net Oct 22 '13 at 15:02
  • 3
    @gerrit It doesn't interact well with spellcheckers, for instance. Not using a spellchecker, by the way, is another mistake. – Federico Poloni Oct 22 '13 at 22:36
  • 10
    This is the most important post up until now, in my opinion. Way too many tutorials on the internet are outdated, and people learn only stoneage-style LaTeX! As an example, 99% of the tutorials still recommend BibTeX, although BibLaTeX and biber are now very stable, and absolutely ready to use. – Ingo Oct 23 '13 at 10:17
  • I concord. I am back to writing quite long and complex things in LaTeX and I have problem finding the correct tutorials/hints. Keep in mind that I wrote my PhD thesis in 1993 in plain TeX, and started used LaTeX in that period --- so I should know better. But I feel I am outphased and it's very difficult to find a modern, up-to-date place for tutorials and hints. It would indeed be a nice project, a page for "modern approach to writing LaTeX documents"... – Rmano Oct 23 '13 at 14:51
  • 10
    I disagree on "u and such. I don't have such symbols on my keyboard and it is a lot easier for me to type an accent that way instead of googling the character to find a copy I can copy and paste into my document. I use utf8, but don't WRITE it like that, I just want it there in case I do copy that character in. – Canageek Oct 23 '13 at 19:24
  • 1
    @FedericoPoloni -- taking for granted that a spellchecker is always right can lead to significant embarrassment. what is necessary is to understand your tools and use them properly. – barbara beeton Oct 23 '13 at 21:36
  • 1
    @canageek: There is a simple solution, switch your keyboard layout. I'm using a keyboard with US-Layout, because most of the time i write programs. But when i want to write texts, i switch to DE-Layout. – klingt.net Oct 24 '13 at 13:34
  • 3
    @klingt.net Except that I'd have no idea how to write on a German keyboard. I don't speak German. However, there are a lot of German chemists so I need to write their names, and often I'll only have it in an image. Also a lot of Spanish, South American, French, &c. chemists with accents in their names. I'm not switching my keyboard to 7 European languages just to write one document! From my current document: Böhm, V. P. W., Gstöttmayr, C. W. K., Müller, K., Trécourt, F., Quéguiner, G. If I didn't shorten first names the list would be far longer. – Canageek Oct 24 '13 at 20:50
  • @klingt.net Also inputenc is terrible, and doesn't do Greek letters, so if I'm going to be writing \mu and \alpha anyway, why not :o? – Canageek Oct 24 '13 at 20:50
  • 2
    @Canageek: I don't want to discuss this in the comments, there are already 11 comments (including this one) to this post. You don't have to use \inputenc at all, if you are using xelatex to compile your document. xelatex handles utf8 chars, also greek letters, very well. Also it's not my intention to dictate you some workflow that i use. When you say that you won't switch between 7 Layouts, then you're right, that's no solution. But instead of remembering all the hacks to create foreign letters, use something like the character map in linux or the symboltable in windows. – klingt.net Oct 24 '13 at 21:14
  • 7
    @Canageek You may want to check out the US international layout (with AltGr and dead keys). With minimal transitional pain I write German, English, Swedish and the odd French word without switching anything. And, of course, all the programming symbols are where you need them. – Raphael Nov 03 '13 at 01:57
  • 3
    @Raphael I'd still have to learn a new keyboard layout, and mess around with changing layouts, which seems a lot slower and less reliable then the old way. – Canageek Nov 03 '13 at 03:09
  • Using utf8 and typing Erd\H{o}s instead of Erdős. (Not an umlaut.) – Oskar Limka Mar 31 '23 at 08:32
69

Not using version management for your document.

I've introduced some colleagues to LaTeX, and the most common questions I get relate to how suddenly something doesn't compile and how it can be fixed yet, when I ask them about reverting to a previous version, they consequently say they never thought of putting their work into a version management system (funny enough they manage all their other CompSys code related tasks in it). I now mention this even to beginners as one of the major benefits of working in plain text.

  • Yeah, I'm lazy about this. I don't like taking the time to set up a repository for each new project. – Canageek Oct 23 '13 at 19:26
  • 4
    This is so true! But I'd say it's even more of a trouble with Word documents. I have seen people having thesis directories containing files like: thesis-draft-n-date-hour.doc(and Word documents are generally much bigger than LaTeX source code, that's simple plaintext, hence having 100MB of directory wouldn't be so strange for a long thesis.) – Bakuriu Oct 24 '13 at 11:40
  • Then just use one and pack them all in there, but by all means use one. – Max Oct 24 '13 at 11:42
  • 1
    Or use git and register separate projects as submodules. :) – Forkrul Assail Oct 24 '13 at 14:39
  • But versioning and Word documents don't mix well because they are binary so your repo will be huge if your document is 100MB. Whereas LaTeX gets away with 'cheap' copies... – cfr Sep 21 '14 at 02:51
56

Often beginners are not aware of the different whitespace and possible linebreaks:

Cancelling an "end of sentence" space

A space right after a period following a lowercase letter by default ends a sentence and LaTeX inserts an extra whitespace. There are several occasions where you do not want to have the default behaviour. For example,

Ms. Bean is \ldots\\
Ms.\ Bean is \ldots

enter image description here

To make the Ms.\ Bean unbreakable, use ~ instead of \<space>. \<space> and a ~ differ only in their line-breaking behaviour, the whitespace is the same. See also: When should I use non-breaking space?.

Enforcing an "end of sentence" space

A space right after a period following an uppercase letter by default represents an acronym and LaTeX does not insert an extra whitespace. There are several occasions where you do not want to have the default behaviour. For example,

I left at 12:00 P.M. In \ldots\\
I left at 12:00 P.M\@. In \ldots

produces

enter image description here

Enforcing a space after a control word

Control words eat spaces that follow.

\LaTeX is fun.\\
\LaTeX\ is fun.

enter image description here

The \<space> here is necessary to produce space between LaTeX and "is". An alternative is to use braces to terminate the command. For example, \LaTeX{} is fun. and {\LaTeX} is fun. are equivalent to the above. See also Spaces after Commands.

Hotschke
  • 5,300
  • 5
  • 33
  • 63
50

Using $$ for italics. I find this error so often that I am suprised it has not been already mentioned.

Don Kreher
  • 412
  • 4
  • 12
43

I will hammer home my case for books! This is LaTeX!

Besides not using Emacs, I guess 90% of newcomers don't buy books, but try to learn "LaTeX by Google". What a waste of time.


Edit: OK, borrow books, also possible. Somebody else with such proposals? Maybe I'd betters say that studying a book as a beginner seems the crucial thing.

»Works pretty well«: Sure, but it takes much more time than take the book from the shelf and read. How many users never heard of »texdoc packagename«? And I'm quite convinced that "LaTeX by Google" works for nerds (but it surely costs much more time), but if you are studying the humanities, a book explaining the concept is really helpfull.


Edit 2: »Books are sooo last millenium«: Yess, and probably 99% of the users here as well. Besides that, courtesy of F. Mittelbach we present: The companion as ebook!

Keks Dose
  • 30,892
  • 33
    Worked pretty well for me. Just saying. – Sean Allred Oct 21 '13 at 12:31
  • 1
    I use Sublime Text 3 with LaTeXing plugin. I like it much more than Emacs (or Vim). – m0nhawk Oct 21 '13 at 12:33
  • I use Emacs for Lua, Python, Octave, Gnuplot, SQL etc. but for LaTeX I use TeXmaker, why am I wrong? (I'm on Windows, and TeXmaker comes with built in PDF viewer, while Emacs requires me to install a separate viewer, and Adobe Reader which is already installed does not come into consideration because it locks the file.) – marczellm Oct 21 '13 at 12:50
  • 1
    Borrowed books worked just fine for me. :) – Qrrbrbirlbel Oct 21 '13 at 12:50
  • @marczellm: if you're content with TeXmaker then you probably don't make much use of what it is that makes E MAC S so really good. – leftaroundabout Oct 21 '13 at 13:20
  • 8
    Books are so last millennium ;) I don't recommend books for learning any programming-like method anymore. What is needed, however, is a good approach to learn-by-Google; it's not enough to simply snag the first half-working snippet and bend it to your needs. You need to be hunting out the reasons behind the code. – Jack Aidley Oct 21 '13 at 13:39
  • 20
    Googling latex <package name> is by far the quickest way to get to the package's original documentation on CTAN. And once you have it, you can do a full-text search. On the other hand, I've yet to see an online introduction to LaTeX that comes close to the introductory books on sale. Books are best for educating yourself, PDFs for looking up tidbits. – alexis Oct 21 '13 at 15:31
  • 14
    @alexis texdoc <package name> on the command line works pretty good as well :) Also texdoc latex2e, texdoc lshort, ... – cgnieder Oct 21 '13 at 16:44
  • @alexis I disagree :) – Thomas Oct 22 '13 at 06:19
  • @Thomas, with which of my statements do you disagree? On what grounds? – alexis Oct 22 '13 at 09:46
  • 1
    @Keks: Am I right to assume that the bold sentence at the start of your post should be read in Leonida's voice? – Jake Oct 22 '13 at 12:56
  • @Jake If you meant that in the sense of "Well roared, Lion!" -- YES. Besides that, people should buy the books to support the authors. I would be lost without KOMA-script and so I buy each new edition of the manual at least twice (one for home, one for office). – Keks Dose Oct 22 '13 at 13:20
  • @KeksDose: Hehe, I actually meant in the sense of http://www.youtube.com/watch?feature=player_detailpage&v=eZeYVIWz99I#t=6 – Jake Oct 22 '13 at 13:27
  • 9
    @alexis try that with color :). I would generally rather recommend ctan <package> this usually gets rid of chemical, fetish and other unwanted results. – Max Oct 22 '13 at 14:22
  • @Max, I get the joke, but I just googled "latex color" and only LaTeX-related results are coming up! What's the world coming to? (I suppose safe search is on by default...) Anyway, google seems no worse than dropping to the commandline and asking texdoc -- and google will also show me tex.sx answers, and much more. – alexis Oct 22 '13 at 14:50
  • I must agree on this, reading the LaTeX ebook companion this week, showed me so many things I learned by sweat and 'oogling. – Forkrul Assail Oct 22 '13 at 22:13
  • @ForkrulAssail everybody should own a copy of the companion! :) – cgnieder Oct 22 '13 at 22:14
  • @cgnieder, I'm just annoyed I bought it a day before they released the discount codes :/ but love the history and package suggestions. – Forkrul Assail Oct 22 '13 at 22:31
  • @alexis: That's the filter bubble for you! Try Startpage or DuckDuckGo for unfiltered searches. – Raphael Oct 23 '13 at 06:21
  • @Raphael, but I wanted the typesetting-related results! :-) If I develop a latex fetish (the uncapitalized kind), I can always turn off google's "safe search" feature, or whatever they call it now. – alexis Oct 23 '13 at 09:31
  • @alexis That was more to say: in order to see what search results look like for LaTeX-novices (i.e. filters not trained), use a bubble-free search engine. – Raphael Oct 23 '13 at 13:13
  • Do you mean google now customizes results based on my past behavior? I didn't know that! – alexis Oct 23 '13 at 17:39
  • Actually, i don't have a job, so i cannot buy books and ebooks, so i read free pdfs books, 20$ is too much when somebody hasn't got a job – Tobal Oct 24 '13 at 19:27
  • I started with the Wikibook guide, and then just asked questions on here to get to the point I am. Physical books are a pain; I have to carry them around with me, and the one I read (The LaTeX Companion I think? I could be wrong) got down to such a low level it just confused me more. Also you can't copy and paste out of them. – Canageek Oct 25 '13 at 20:44
  • The LaTeX Companion is not an introduction to latex; The LaTeX Guide (in the same series) would have been a far more rewarding experience. Unfortunately, choosing the right print book is a lot harder than surfing google till you find a source that makes sense (or seems to, since it might be "from the stone age"). – alexis Oct 27 '13 at 10:48
  • @alexis Yeah; this was the one sitting around in our office. Also then I'd have to get two copies; One for work, one for home... – Canageek Nov 27 '13 at 01:04
  • @Canageek, Guide to LaTeX (by Kopka & Daly) is available as an ebook :-). What matters, I think, is not the physical form but the nature of the text: A "book" is a long work, carefully written and edited to be a coherent whole. That's what Keks was really on about, I think. – alexis Nov 27 '13 at 14:35
  • \begin{plug}This is why I put Formatting Information online (http://latex.silmaril.ie)\end{plug} – Peter Flynn Mar 14 '16 at 22:25
  • @PeterFlynn Nice website! – Keks Dose Mar 15 '16 at 08:23
43

A very common mistake for LaTeX newbies : they don't ask questions on tex.stackexchange.com.

ppr
  • 8,994
  • 7
    More generally, they don't ask question on forums or mailing lists, even if they are told how and advised to do so. – Denis Bitouzé Oct 23 '13 at 06:00
  • 1
    Luckily I didn't make this mistake! All the questions I posted here where well accepted by other users and I got really good and insightful answers even when the question itself was "stupid" from a TeX point of view. So there is no reason to be scared of asking (at least on this site). – Bakuriu Oct 24 '13 at 11:24
42

Not using LaTeX itself, but rather obsolete TeX. For example, ${\rm text}$ in math mode, or \bigskip {\bf Section} instead of \section. The list goes on. This is a result of learning TeX from copying ancient documents without understanding, following one of the many contradictory guides online, or simply not caring as long as it looks as you expect.

Ryan Reich
  • 37,958
  • 18
    "Obsolete TeX"? Ryan... :-/ – morbusg Oct 21 '13 at 11:39
  • Deprecated, then. Superseded? Primitive would be good if \rm were not a macro. Philosophically obsolete as a paradigm for document construction. The language still works fine, of course, but it is now primarily used for programming and by people who are consciously not adopting LaTeX or ConTeXt. – Ryan Reich Oct 21 '13 at 12:04
  • 3
    I was thinking more in the lines of "obsolete LaTeX", since you use \bf etc. in ConTeXt too. – morbusg Oct 21 '13 at 12:28
  • 1
    Deprecated, but why is it a mistake? Yeah, yeah, don't do it, but I learned it this way from Kopka & Daly 1st edition (before LaTeX2e), and in all the years since then I've never had a reason to abandon it. (Obviously I don't make newby mistakes like \bf{Section}.) – alexis Oct 21 '13 at 13:55
  • 2
    @alexis deprecated for nearly 20 (!) years. New users would certainly be puzzled by {\bf\it I'm not bold} while {\bfseries\itshape works}. – cgnieder Oct 21 '13 at 16:48
  • @alexis besides: the LaTeX2e kernel doesn't even define \bf and \it... (the classes do if their authors want to) – cgnieder Oct 21 '13 at 16:49
  • 2
    @cgnieder, I know all that. But the "standard classes" do define them, I do understand their semantics, and they've worked without any problem for 20 years. Hence my question: why should it be a mistake to use them correctly? (But I should add that I don't use \em or \it: Life's too short for italic corrections by hand!) – alexis Oct 21 '13 at 18:03
  • @alexis: Well, one reason it's a mistake is that, as you point out, using \it requires an italic correction. Of course, \bf does not, but how do you know? This requires a kernel of situational knowledge that you can easily forget, damaging the appearance of your document slightly. The font commands aren't a huge deal (for all the hype over mixing \bf and \it versus \textbf and \textit, one rarely actually does that) but for what they do, skipping something like an italic correction is major. Using versions where such mistakes could be possible is therefore wrong. – Ryan Reich Oct 21 '13 at 20:29
  • This is obviously more important for newbies than for someone who "understands the semantics". I mean, if you (or, say, David Carlisle) want to use a less-structured but perhaps more conveniently named macro, well, you know what you're doing. But I can't advocate teaching \bf to a new LaTeX user, even with all the appropriate provisos. – Ryan Reich Oct 21 '13 at 20:33
  • I agree with that, there's no reason to teach them to anyone; the surprising syntax is reason enough for new converts to avoid them. – alexis Oct 21 '13 at 21:31
39

In my experience, people come from Word and expect a LaTeX editor to work like MS Word, with the exception that they have to click a button to generate the document.

Because of this, many do not understand the concept of compiling properly. They do not understand what happens in the background; That first, pdfLaTeX is run, then BibTeX, then maybe another two runs of pdfLaTeX. They do not even understand what pdfLaTeX or BibTeX are, or the meta concepts of these, namely that there can also be LuaLaTeX, biber, or xindy!

This commonly leads to them being unable to fix problems. In my opinion, such basics of editing a document in the world of TeX should be treated better in existing documents. I think it would actually help if people would start out in NOtepad (or equivalent), and compile through the command line.

Ingo
  • 20,035
  • 3
    That's true, but there is culpability on both sides. If a user has always written your documents in Word and needs to make the switch to LaTeX, the resources that we make available to them are pretty arcane. Google for 'latex for word users' and dig in the links and you pretty quickly become covered in arcana that makes no sense to the typical Word user. Conversely, it is foolish to assume that A works like B just because B has bigger market share. – AlwaysLearning Oct 22 '13 at 15:22
  • I have never compiled any LaTeX document in any other way than by clicking a button. How is that a mistake? – Sverre Oct 22 '13 at 19:26
  • @Sverre It's not about how you compile really. The misunderstanding here is trying to apply the exact same workflow even though latex works completely different. – Max Oct 22 '13 at 21:15
  • 4
    Maybe the problem here is LaTeX having such a complicated and error-prone workflow. Having to compile twice (or rather $N$ times, for $N$ unknown a priori and possibly even infinite) makes little sense to me. – Federico Poloni Oct 22 '13 at 22:39
  • 4
    The workflow is necessary to resolve all the forward, backward, and cross-file dependencies. The problem is that it is insufficiently supported by tools; a few can automatically recompile, but others will only run one stage (TeXShop), or run one instance of each tool (TexCenter). Tool output is prohibitively verbose, and often hidden from the user by the GUI... so how can the user understand what's going on? Yeah, read the manuals. Some of which still assume dvi and commandline compilation (cf. @klingt's answer). – alexis Oct 23 '13 at 09:12
  • The workflow should be: Press a button. Examine compilation messages, then formatted output. Fix any errors. Go back to writing. – alexis Oct 23 '13 at 09:22
  • 3
    Not understanding what is happening can also be adverse to progress. I have seen many cases where people wanted to switch to BibLaTeX, but failed because they did not even understand what biber is, and how they could set it up. Many editors still have only bibtex preconfigured. The problem is that people never see that bibtex is run, and just click on a button to compile, so they are utterly clueless as to how to set up biber (although it is only changing one word in the settings of your editor). – Ingo Oct 23 '13 at 10:15
  • 12
    If beginners to LaTeX are expected to understand the inner workings of the compilation process in order to use it, then the problem lies with LaTeX and not with the users. And "read the manuals"? I'm not exactly computer illiterate, but 90% of LaTeX manuals are more or less completely incomprehensible to me. – Sverre Oct 23 '13 at 11:15
  • 1
    @Sverre I agree 100%, if by "the problem lies with LaTeX" you mean the GUI tools; the (pdf)latex executables do what they're supposed to-- and people who compile from the command line have no trouble understanding what's going on. Not because they're wizards, but because calling three commands is easy and transparent; not so, unfortunately, for many GUI customization panels. – alexis Oct 23 '13 at 17:54
39
  • Not realizing an empty line is a \par and trying anything and everything to work around the spacing problems. This is probably among the top five and I would patch that out if I could.
  • Using inline math instead of display math and screwing up the line spacing in progress. Points for using \displaystyle in an inline math in a normal paragraph.
  • Using random solutions/templates/code pieces from the internet. Yesterday I saw someone actually confused about why using

    \documentstyle{foo}
    \usepackage{bar}
    

    throws an error, after he found the first line on the internet. I wish there were a way to get rid of the old pages that still show up with latex 2.09 code, yes weinelt.de you first. This goes further than @klingt.net. @Keksdose's solution is a remedy to a certain point, because the printed material is usually of better quality, but even there outdated solutions are advertised sometimes.

  • Using babel without the shorthands turned off and then being surprised that it messes up math, ipv6 adresses, listings or any other random thing. This 'feature' is my personal pet peave.

    Examples:

    I've also seen problems with other packages in the past, listings and syntax from mdwtools come to mind immediately, but there are more.

  • Accidentally redefining commands with def.

  • Using incompatible packages or order sensitive packages in the wrong order. To be honest latex should make that harder or prevent that. Bonus points for obscuring the order to scrutiny by including a package multiple times.

  • Including redundant packages. Recently seen preamble:

    \usepackage{lmodern}
    \usepackage{mathptmx}
    \usepackage{ae}
    \usepackage{courier}
    \usepackage{mathptmx}
    \usepackage{fontspec}
    
  • Manually trying to set variables instead of using proper packages. Most common with parskip, setspace and geometry.
  • Declaring one encoding and using another or mixing different encodings.
  • Ignoring Italic corrections.
  • Using the wrong quotes (e.g. "" instead of ``'').
  • Floats where they make no sense at all. Today I saw someone combine a table with Absolutely, definitely, preventing page break just to get a caption and latex was not happy.
  • Not using non breakable spaces, where needed Dr.~Foo
  • Not knowing when to use math and when not. Also not using \text{} in math mode for non math.
  • Not escaping _, #, ^ and friends.
L. F.
  • 796
Max
  • 5,702
  • 3
    A colleague once asked me help because the name of his Turkish coauthor caused errors (something like Şukur); of course he had \def\c{\gamma} in his document. – egreg Oct 22 '13 at 20:26
  • 1
    I'm a bit irritated by having to pay attention to ~ and \`''` – marczellm Oct 22 '13 at 21:34
  • I can't say that babel's shortcuts have caused me much troubles... I actually quite like them! – cgnieder Oct 22 '13 at 21:59
  • @cgnieder, see the examples I listed. The problem is that it's really confusing to users who aren't aware of them and should be an opt-in not an opt-out feature. I now routinely check if babel is the cause for the issue at hand as soon as I see someone using it, because it's so disproportionally often the cause of problems for my users. – Max Oct 23 '13 at 07:54
  • @Max I am well aware of potential problems with babel's shortcuts. I'm just saying that they haven't caused me much troubles the last 10 years... – cgnieder Oct 23 '13 at 07:56
  • TikZ is now coming with babel options in the next version. Not that it disproves anything... – percusse Oct 23 '13 at 15:32
  • 4
    +1 for babel shorthands. I really had no idea when I realized there was a Bad interaction between babel and xypic that there was such a feature on by default(or that it even existed at all...). Regarding incompatibilities between packages and order, I believe sometimes the documentation is not clear enough. Also the whole idea of a single namespace is something I hate. I'd prefer if \usepackage{x} would import only things definied in x or explicitly imported, not things from y used by x. – Bakuriu Oct 24 '13 at 11:35
  • You can add this to the babel crash list – leo Oct 24 '13 at 20:11
  • Thanks, but that appears to be a bug in babel and babelbib but bugs happen, there is nothing particularly heinous about that. I don't think babel per se is bad, it just shows some very bad design decisions. And personally I believe turning the shorthands on by default is the most unintuitive one, that's why it screws over beginners and was fitting this list so well. – Max Oct 25 '13 at 01:43
  • @marczellm I love and '': It is far easier to parse then a contextual " (s\\foo\g) – Canageek Nov 27 '13 at 01:03
30

Fight typesetting with tooth and nail.

Many try to emulate what they know no matter what. Examples include:

  • Switch to Times New Roman. What, you can change the math font?
  • Use \\ liberally to break lines and delimit paragraphs.
  • Ignore the concepts of floating environments.
  • $...$ is the only math environment you know; spacing with \\.
  • Never use -- or ---, let alone .\ and \, in acronyms.
  • All math delimiters have the same size.

Not exactly typesetting, but related in spirit:

  • What are \label and \ref?
  • Instead of using the ones from babel, use wrong or hacked quotes (language dependent).
  • Literature references hardcoded in footnotes.
  • Re-use pixel graphics created with some drawing tool.
  • Write everything in one huge file.
  • Use a *TeX distribution that is older than your PC.

Of course, the most common mistake is to write stuff yourself. In 95% percent of the cases, there's a package that does what you want!

Raphael
  • 5,983
  • When LaTeX gets decent SVG support I'll stop using pixel graphics. I'm not jumping through hoops to make a PDF out of my image.... – Canageek Oct 31 '13 at 18:17
  • @Canageek: I would recommend TikZ, but I realize it has a tough learning curve. So I'll give you this: inkscape -A output.pdf input.svg -- if that's a hoop, it's a large one. (No idea how well this works in general, but it has yielded decent results for me.) – Raphael Nov 01 '13 at 15:36
  • That still involves me using pdf as an image format, which is wrong; it is a document layout format. – Canageek Nov 02 '13 at 21:19
  • 1
    @Canageek I think that is not only a narrow definition of "document", it's also not a useful point of view. The graphics ends up in a PDF (PS + x) so they have to get there somehow. LaTeX engines may be able to hide from you that they convert SVG to PS/PDF but it still has to happen (would you rather control the conversion?). Provided you don't want pixel graphics, which would be really contrary to the "idea" of PS/PDF. (Or, you know, learn TikZ. :)) – Raphael Nov 02 '13 at 22:36
  • The graphics would be output from another program (ChemDraw most likely, or possibly GNUplot or such). If they are PDF I can't use them in any other format (i.e. Web), and the interface to add them to LaTeX is different, and editing them in future is much harder, as PDF adds a bunch of garbage to do with page size and such. There is a nice SVG package, but, I'd need to install inkscape and use \write18 – Canageek Nov 02 '13 at 23:50
  • Who says you can only keep PDFs? Keep SVGs in your CVS and convert them to PDF for direct use with LaTeX (includegraphics provides the same interface for PDF as for PNG). Imagemagick readily converts PDF to pixel formats for web use if SVG is not an option. Depending on your build process, incorporating the conversion SVG->PDF should be less pain than bearing with pixel graphics (and huge file sizes). By the way, Inkscape can export to LaTeX+PDF which allows you to use document fonts in the thus imported graphics. Gnuplot can produce many formats, too, but you might want to use pgfplots. – Raphael Nov 03 '13 at 02:04
  • I guess that might work, I just remember there being a lot of pain the last time I tried to include PDFs with LaTeX, things not resizing right and a whole mess of other issues. – Canageek Nov 03 '13 at 03:11
30

1. Compiling too early and too often. Now you are spending your time working on fixing formatting and such that will change as soon as you add more text anyway and all the floats will move anyway.

2. Using floats when you don't have to. Floats are the devil, yet all tutorials use them. Most of the time I know where I want the image, at least roughly, and didn't know for ages that I could just insert the image without wrapping it in a float, so I'd spend ages trying to get stuff to stop floating down multiple pages, or into the wrong section, etc.

Edit: As this is attracting a lot of debate: When I started every example shows you to insert an image in a float, so I thought you had to use float. Even a couple of months ago I thought you needed to put a table in a table environment; I'd still have to look up how to make a non-floating table. This is a problem as a lot of the time I need an image in a certain place. For example, if I'm typesetting a homework problem (Something I did a lot as an undergrad, and am now doing again when I'm writing questions) I can't have that image floating down into a different question; my TA or prof isn't going to go hunting for it, they are just going to dock me marks (And I don't want to confusing anyone working on my problem set!). Also as the h option is a joke they usually float far away. I don't mind if a figure floats a few paragraphs, but three pages away is bad: Same page as the discussion or facing page only. I should always be able to see both figure and text at the same time, unless there are exceptional circumstances or a very large text (I cut some slack when writing my thesis, as there were so many figures they wouldn't all fit on the same page as the text).

There are times floats are the right choice; I'm using one in the document I'm working on right now. However, they are just as often the wrong choice, and a lot of new users don't realize this.

3. Using outdated packages that some website gave you My group drives me crazy since they use very outdated packages that have been superseeded. subfigure instead of subfig, stuff like that.

4. Relying on GUI text editors instead of understanding what is happening People at work also drive me crazy with refusing to use anything but the compile button in WinEdt. If that doesn't automatically work, they refuse to use the package (Thus no biber, no biblatex, etc.

5. Using MikTeX That install package on compile thing NEVER works right. Hard drives are large, dammit.

Edit: Ok, not never. But it fails every time I've given my coworkers a new package to use, causing us to have to go into the interface and have it manually install.

6. Limiting yourself to what chemistry journals allow for everything I dream of one day being editor of a big chemistry journal, just so I can go to the AMS or APS and borrow their code. This has things like not using macros, not redefining things, not using excess packages (or in one case, not using packages AT ALL).

7. Not being willing to put in time understanding LaTeX The people I work with just want a solution now. They aren't willing to put in any time into making it work; they want something that works now, since the journal will reformat it anyway, so if it works and gets vaguely close to what they want, good enough.

8. Making DocumentNameV3.tex and forgetting to open the new PDF, then wondering why nothing you do is working Not that I've done this recently, after I was too lazy to set up a new code repository.

Canageek
  • 17,935
  • 2
    Major complaint from colleagues I've heard is 7. – Forkrul Assail Oct 23 '13 at 19:58
  • 3
    I disagree (partly) with 2: I think floats are a good thing: often images and tables don't need to be looked at immediately and the readers should have a choice when they do. So it's a good thing if they float to the top or bottom or a separate page. They have a caption and are referred to in the text anyway – cgnieder Oct 23 '13 at 20:00
  • 3
    Floats are great when they're appropriate, but using them when you want your text to stay put is a mistake. Too many people use them but don't want them to ever float. Double mistake. – alexis Oct 23 '13 at 20:03
  • 1
    And I don't agree with 5: MikTeX is awesome, load-on-demand has always worked well for me (if you get erratic behavior, choose another download mirror), and besides they let you install the complete texmf tree if you prefer. – alexis Oct 23 '13 at 20:06
  • 6
    @cgnieder I think what Canageek has in mind are people using figure when all they want to do is insert a graphic. There are many places where this is useful, and new users simply do not understand the difference. Quoting myself from chat: "The prize for the worst name choice in LaTeX surely must go to the figure and table environments. I wonder how many questions here and on the web deal with people not understanding the difference between the container and its contents?" – Alan Munn Oct 23 '13 at 20:06
  • 1
    @AlanMunn true: one can argue about the name choice. But the concept makes perfect sense, typographically speaking. That's why I disagree with »the devil«. (Granted: when I first started using LaTeX I had no idea about typography and misunderstood those environments, too :) ) – cgnieder Oct 23 '13 at 20:16
  • So ... we should not use GUI text editors? What is the benefit of typing various compilation commands n times in the console (good luck trying to get Windows users to use the console)? – Sverre Oct 24 '13 at 19:09
  • 1
    @alexis So far every time I've given them something new to use we've had to go install stuff manually. Better to just have it on the HD; a default, English only, no weird stuff install is only about 2 GB. – Canageek Oct 24 '13 at 20:30
  • @cgnieder I disagree. I should not have to flip 3 pages to find a figure; It should be right beside the text talking about it so I can see both at once. And yes, I didn't know that you could have a figure that didn't use the figure environment. Ditto table. I still have to look that up, since everyone uses figures. – Canageek Oct 24 '13 at 20:31
  • 1
    @Sverre The problem with using the GUI like that is they don't know what it is doing; they just want to hit the button and it works. They don't understand that bibtex and pdflatex are separate programs, or why they get a ton of errors when they try and use my biblatex code with the default compile button. I use latexmk, as I could sick of writing my own compile chains (Ok, pdflatex, then biber, then pdflatex three times...), but people should know what is going on. – Canageek Oct 24 '13 at 20:33
  • 1
    @Canageek well, floats often can be a problem when there are lots of them. Thinking of a book with only a figure every ten pages works perfectly since a {figure} never will be far away. Probably every one of us has had troubles with float placement in the past... all I'm saying is that the idea behind floats is the right one even if it isn't working perfectly :) – cgnieder Oct 24 '13 at 20:45
  • @cgnieder Sure, the idea of them moving to where they want is not a terrible one. But until there is an open where I can say 'do NOT go beyond the end of this [paragraph|section|page|subsection] then they are the wrong tool for image heavy documents, doubly so for newbies who don't know all the tricks. – Canageek Oct 24 '13 at 20:57
  • 3
    @Canageek do you know \FloatBarrier (from the placeins package)? I never used it but it's designed for exactly that purpose... – cgnieder Oct 24 '13 at 21:01
  • 1
    @Canageek -- open = option? There is the placeins package which has \FloatBarrier. (Try loading it as \usepackage[section]{placeins} to put a automatic barrier at the start of each section.) – jon Oct 24 '13 at 21:01
  • @cgnieder -- nice timing! – jon Oct 24 '13 at 21:01
  • No, I hadn't, I'll look into it. Sounds like a great tool. Someone should update the wikibooks examples. Still, tutorials for newbies should explain what a float is, and why you would/would not want to use it. – Canageek Oct 24 '13 at 21:05
  • @Canageek Of course! A LaTeX introduction that doesn't explain the concept isn't a good introduction. IMHO it should also explain how to get non-floating objects of the same kind, too. – cgnieder Oct 24 '13 at 21:15
  • Floats are not "the devil": they should be used when they make typographic sense. But putting figures in floats and then jumping through hoops to stop them from floating is just stupid. The naming confusion that Alan mentioned is just the start: the real problem is that there's no standard way to add figure captions outside a float, and no packages that do it reliably (see errors 6 and 7 in my answer). – alexis Oct 24 '13 at 21:18
  • Incidentally, the way to keep figures from floating too far is to increase \topfraction, \bottomfraction, and several other parameters that control the text-float mix. – alexis Oct 24 '13 at 21:25
  • @alexis I never had problems with either KOMA-Scripts or caption's \captionof macros... – cgnieder Oct 24 '13 at 21:43
  • @cgnieder, I have had problems with caption (I don't use KOMA-Script so no comment there). If I set a small {table}[h] inside a list, it will be nested properly; but the caption package will cause the caption to align all the way on the left text margin. – alexis Oct 24 '13 at 22:08
  • @alexis If I don't a float I don't use a floating environment but rather a minipage or something... worked well in the past – cgnieder Oct 24 '13 at 22:20
  • 1
    There are solutions... but don't you agree it's much more arcane than it ought to be? We can't exactly blame intermediate users for not having it figured out. – alexis Oct 24 '13 at 23:20
  • @alexis I never said it's perfect. My only point was that floating is not the devil and not bad per se... – cgnieder Oct 24 '13 at 23:41
  • 1
    I disagree. I always make typos in my math, which I don't notice until I compile. If I wait until the end to check, I will end up missing too many of them. – asmeurer Oct 25 '13 at 05:32
  • 1
    @Canageek: i totally disagree with point 1. Compiling early and often doesn't imply you're doing formatting stuff. For example, I compile often and early because I prefer to see the pdf to read if a paragraph need adjustments. But I don't care at all if the added text make floats move... – Claudio Fiandrino Oct 25 '13 at 06:56
  • @gnieder, you'll notice I defended floats too. My point was that there's no really good way to avoid overusing them. – alexis Oct 25 '13 at 09:16
  • @alexis yes I've noticed :) – cgnieder Oct 25 '13 at 09:39
  • @ClaudioFiandrino Doing math would be one of the exceptions. However, I'll often go and start fixing formatting when I should just be writing, or making figures look right, or adjusting other things. – Canageek Oct 25 '13 at 20:41
  • @Canageek: that's one reason to use floats. You don't care about the formatting until the document is really finished, but rather you can focus on the content. Floating images and tables go where there's enough space so you're free to add text before them without having to do something on the line: "Oh, if I add two lines before figure 8, it moves elsewhere: let's move figure 8. But now I need more text than two lines and this shifts also table 7. Let's move table 7". If tables and figure float, who cares to add even 1 page of text... – Claudio Fiandrino Oct 26 '13 at 08:30
  • For the number 8: Code editor should be able to open the corresponding PDF automatically after compilation. Even it can also close the corresponding PDF before any other subsequent compilation. – kiss my armpit Nov 03 '13 at 11:15
  • Marienplatz: I compile from the command line, not within the editor. It makes it easier to see where the problems are. – Canageek Nov 03 '13 at 21:04
  • Fully agre with @Canageek on the floats issue. All the other points are also spot on. – Tejas Shetty Apr 17 '22 at 10:54
27

Using \left and \right indiscriminately before all delimiters (parentheses, brackets, braces). Some front-ends to LaTeX do it by default, but this behavior must be disabled.

Spaces around binary operation and relation symbols are flexible (for operations they are both stretchable and shrinkable, for relations only stretchable), so they can participate to the space adjustments made on a line for achieving justification. However, \left and \right create a subformula with the material in between them and, by rule, spaces inside a subformula are “frozen” to their natural width.

Another aspect worthy being mentioned is that a subformula is not breakable across lines; TeX is reluctantly willing to break a line after an operation or relation symbol, but not when this symbol appears between \left and \right.

These two commands do have their proper usage, but too often they are misused.

egreg
  • 1,121,712
  • 10
    I guess people like the aspect "make my delimiters as big as needed!". If you could propose another way to do this, I'm sure you can convert lots of people. – Raphael Oct 23 '13 at 06:17
  • 1
    @Raphael The fact is that it's most commonly not needed to grow delimiters. – egreg Oct 23 '13 at 06:55
  • 6
    I don't know how you mean "most commonly" but I don't think I have written a (work-related) document that did not need larger delimiters. – Raphael Oct 23 '13 at 07:09
  • 2
    Bah. I just wan the equation to work and LaTeX to figure out all the sizes for me. If I wanted to do a lot of extra work, I'd go use MS Equation editor ;) – Canageek Oct 23 '13 at 19:25
  • +1 -- I didn't know why people wrote around to avoid these macros. However I really do like the "automatic resizing" they provide. – Bakuriu Oct 24 '13 at 11:28
  • What is the correct way of typesetting parentheses then? – jnovacho Oct 25 '13 at 07:45
  • @jnovacho Use the normal size whenever possible (don't be afraid of using the slashed form for fractions) and add \left-\right only when really necessary; don't forget \bigl-\bigr and friends. – egreg Oct 25 '13 at 09:32
  • 4
    @egreg: Maybe add an example of what the proper use of \left and \right is (and an example of typical misuse). – Silke Oct 30 '13 at 18:55
  • If it is at all technically possible, someone really should implement delimiters that do grow but only when really needed, and only to the appropriate size. LaTeX does so much magic that people assume the \left-\right is also automagically always correct. IMO it should be. – marczellm Nov 02 '13 at 16:57
24

Forgot to break the paragraph before the closing }

When a paragraph has font size change, the \par must be invoked before }

\documentclass[preview,border=12pt]{standalone}
\def\foo{%
These dummy texts will span more than 2 lines. If you see they do not span more than 2 lines then you have to inform me now!}

\begin{document}
\parindent=5em\relax
\foo

{\huge \foo}

\foo

{\huge \foo\par}

\foo
\end{document}

enter image description here

  • 2
    applies to 1-line paragraphs too – David Carlisle Oct 21 '13 at 16:27
  • @DavidCarlisle: Your useful suggestions are always welcome. I have edited my previous statement. Thanks. – kiss my armpit Oct 21 '13 at 17:58
  • 5
    this is a bit more esoteric, but if the last line of a "larger" paragraph has no descenders, a dummy descender should be added with \strut. avoid any spaces between the end of printable text and the \strut to avoid a possible extra line if the last line fills the full width of the page. – barbara beeton Oct 21 '13 at 23:21
23

Incorrectly choosing the compiler

  • Compiling

    • an input file importing PDF, JPEG, PNG

    with latex->dvips->ps2pdf sequence. The compiler should be either pdflatex or xelatex (among other possibilities).

  • Compiling

    • an input file containing PSTricks code
    • an input file importing EPS

    with pdflatex. The compiler should be either latex->dvips->ps2pdf or xelatex (among other possibilities)

20

My own take on this question is more about the mistakes beginners make because of us. I made too many shameful mistakes (and still do at times), but with my first private beta, I realised that many beginner mistakes were in fact my beginner LaTeX developer mistakes.

They are still beginner mistakes – but I have a feeling of responsibility for a lot of them.

  1. Not teaching users to first read the documentation. Not teaching users to look at the code if the documentation is unhelpful (code does not bite). I have had someone tell me "I didn't dare to modify your package because I didn't know what I was doing"… well, just back it up somewhere and play, code is not sacred).
  2. Not teaching users to send you the log when they want to report a bug or any other issue, even if they do not understand what the error message means. On that matter, I feel like it is helpful to teach all beginners how to read the most basic errors (command already defined, command not defined, underfull and overfull boxes).
  3. Not writing appropriate documentation files for users (we all boast about "literate programming" and we mostly do a good job at writing docs, but not all of them are perfect). We have some beautiful files, and also some barely-commented "implementation" docs with just an introduction and a list of macros that no beginner would ever understand.
  4. Not teaching users the difference between form and content (as mentioned several times before). But I also mean it literally: whether they want to code something for themselves or whether they are requesting a new feature, they need to determine if it is just a stylistic preference or if there is a general purpose behind it (e.g. do we need a simple command or an option for customisation). There is nothing more stupid than creating a whole system that works really well except it is totally impractical in real life.

I hope it is not off-topic… but thinking back, I would think that most of my own beginner mistakes were also often developer (or documentation-writer) mistakes. We are generally good at writing documentations, but we sometimes have a hard time finding the right words for both beginners and experts.

Most of the beginner mistakes mentioned here are not really in the books… or at least they don't show up as sections, tutorials, etc. It is no wonder beginners first look things up on google. We don't write documentations on debugging what we assume will work (it works in the hands of a TeXnician, not in the hands of someone who does things at random).

ienissei
  • 6,223
  • 5
    +1 for mention that makes a difference the documentation written for human beings, err ...average users. Sometimes, each option of each command is explained extensively, but you have to search in Google for an example or how apply these commands without obtain errors. Generally, the average user needs the section "usage" and some examples, not the "implementation" section. Instead, sometimes even is omitted that one must have \usepackage {...} in the preamble. Too obvious? not for a novice! – Fran Jul 30 '14 at 08:56
  • My point exactly… When I put my code in the hands of a novice, I remembered how hard it had been for me to learn how to use these packages and how discouraging my class would be to average users if I did not do a proper job at preventing their beginner mistakes. This is my first (and I hope, worst ever) mistake as a beginner public developer. – ienissei Jul 31 '14 at 20:12
19

Not understanding the compile sequence when using GUI tools like TeXmaker and LyX was something I was personally guilty of. Understanding this better, helped me understand when references, citations and page numbering went wonky. Switching to emacs and using a custom scripted compile helped sort out the kinks.

  • I have this problem a lot with people at work. They refuse to try biber or anything that breaks the compile button in WinEdt sigh – Canageek Oct 23 '13 at 19:27
  • My answer already treated exactly this. – Ingo Oct 23 '13 at 20:32
  • @Ingo, sorry, didn't get past the Windows bit of your answer when posting. What's the usual practice here, I nuke my answer? – Forkrul Assail Oct 23 '13 at 20:36
  • @ForkrulAssail, could you recommend a source if one is interested to better understand the compile sequence? – Eric Fail Nov 06 '13 at 11:13
  • I learnt from the chat room @EricFail. My learning was very incremental, at first I worked with LyX, then went on to TeXMaker. As I added new packages like glossary and index I learnt that I would need an extra run of something or an intermediate run of some tool. It really depends on what you use. You can check JosephWright's answer on my earlier question here: http://tex.stackexchange.com/questions/121383/how-does-the-latex-compile-chain-work-exactly but I would suggest you just ask in the chat room, tell them what packages you have and what is suggested. Rubber and arara are also good – Forkrul Assail Nov 06 '13 at 17:39
  • automation tools (I use rubber as part of my compile sequence and it decides how many runs LaTeX would need etc). As I also use knitr for integrated stats from R, I've had to have a look at quite a few options. Still want to try arara at some point. :) – Forkrul Assail Nov 06 '13 at 17:40
18

The usage of raster graphics (JPG, PNG, ...) instead of vector graphigs (SVG, TikZ pictures, ...) could be a mistake since this increases output PDF file size and slows down rendering in several readers.

aboger
  • 171
  • 1
  • 9
  • 7
    So we have to vectorize all screenshots or photographs? I don't think they become smaller in size. – kiss my armpit Oct 22 '13 at 12:36
  • You're right, the don't. But you may want to redraw them for a better result. Of course, this consumes time. – aboger Oct 22 '13 at 12:41
  • I think rasterizing vector images generated by PSTricks, TikZ, Adobe Illustrator, etc is the wrong step. – kiss my armpit Oct 22 '13 at 12:49
  • You should not use raster graphics at all, including rasterized vector images. I've edited my answer for clarity. – aboger Oct 22 '13 at 12:55
  • 7
    sometimes it's really necessary to incorporate photographs, say for presentation of historical information, and they simply don't come in vector form. rather than disallowing them, it would be better to give a warning and offer a way to compress them in the most nearly lossless manner. – barbara beeton Oct 22 '13 at 21:31
  • 1
    It's also a mistake to use JPG instead of PNG for diagrams and line art-- it makes the lines and letters fuzzy. But it's not specifically a (La)TeX mistake. – alexis Oct 23 '13 at 19:12
  • 4
    @my_greets Getting SVG to work in LaTeX is a pain, and using a PDF for an image is also a pain, and conceptually wrong (it is a document layout format, NOT a graphics format!) – Canageek Oct 23 '13 at 19:28
  • 1
    TiKZ is quicker to compile than including a PNG? Really? – cfr Sep 21 '14 at 02:55
18

Compile early, compile often as with 'test early, test often' is good advice when spending a lot of time working with complex documents and multiple included files. A common mistake is to work too long on a particular section, not noticing a missing } and then having to scour multiple documents for hours, when this could've been fixed by either an automated constant compile, or just ensuring every section or paragraph you work on still leaves a coherent document.

  • 2
    I'd say compiling too often is also a mistake; get the thing written, then worry about the code. Don't try and fix how it look after every few sentence. – Canageek Oct 23 '13 at 19:29
  • 1
    Fully agreed on that with pure LaTeX, however, multiple chapters, multiple files, knitr includes, external references... if you work in a coherent section/chapter- it makes sense (for me) to just write, if you are later in the editing, modification process breaking a brace somewhere to just discover you have to spend a long period just for getting things compilable again is no fun. I guess I've kind of mitigated this by now keeping my master version repo branch the fully compiled one and then I could just use diff melds (and longer writing non-compile periods as you suggest) to get things done – Forkrul Assail Oct 23 '13 at 19:37
  • I mean, updating once an hour or something like that, not every 2 paragraphs (Which I'm sometimes guilty of) – Canageek Oct 23 '13 at 19:50
  • 7
    Compiling to make sure it compiles is a good idea (always compile before commits!) - but that's different than tweaking the output every time you compile. – bombcar Mar 13 '14 at 15:35
15
  • Not understanding the difference between typesetting and word processing. The latter is simply using computer technology to replace a mechanical typewriter, primarily in the production of routine business documents. The former has to do with preparing documents in their final form for publication. TeX and Friends are typesetters, not a word processors.
  • Thinking TeX and Friends are solely for preparation of documents intended for scientific/academic journals, classroom notes or textbooks with lots of formulae and/or footnotes and citations. TeX and Friends certainly excel at these tasks but also excel at typesetting poetry and prose -- in their original form, not just in textbooks or critical analysis (although TeX and Friends do an outstanding job of preparing those as well).
  • Not understanding the difference between logical markup and WYSIWYG then spending inordinate amounts of time trying to make TeX and Friends behave like a WYSIWYG desktop publisher/word processor instead of putting their focus on the content of their document.
  • In a similar vein, not understanding the difference between writing a document and designing a document. Two different disciplines, two different concerns. TeX and Friends allow a clean separation of the functions even if the same person is going to do both.
  • Trying to make TeX and Friends do everything instead of using the right tool. Production of a consumer-oriented magazine is far better done in Adobe InDesign than TeX and Friends. Business presentations are far better done in PowerPoint than Beamer. etcetera, etcetera etcetera.
  • Underestimating the amount of work it takes to produce a "beautiful" document. TeX and Friends will produce more beautiful documents than MS Word but it is not automatic simply because one uses TeX and Friends.
  • Getting caught up in vim vs emacs vs texworks vs tex{studio | maker} vs notepad arguments on SX (or elewhere). :) They all work fine. TeX and Friends don't care which you use and the resulting documents don't either.
  • In my writing I used TeXShop which is tremendously helpful for me as I can fill in references and format the text as I go along. This enables me to see the texts as the reader will see it with \emph given to certain words and the correct references in place, thanks to BibDesk. If I understand your first point correct I am writing my texts in a tool that is intended to be used for preparing documents in their final form for publication. Would you elaborate on what the advantages are of using a word processing tool for writing and maybe explain your workflow? – Eric Fail Nov 21 '13 at 15:31
  • I don't use a word processor unless forced to by some external constraint. I try very, very hard to separate page design from content so all styling goes into the preamble (LaTeX) or environment files (ConTeXt). For the document itself, I simply use a text editor (Emacs is my preference but any will do). Word processors are for office memos, not publications. If someone insists on receiving a MS Word document, I use Pandoc to convert from TeX markup to a docx file. – Bill Meahan Nov 28 '13 at 02:47
14

Doing by hands what LaTeX should handle. Like writing "on page 3" and thinking to learn "complicated things" like \label-\ref "later", i.e. never. On the other hand, it is not bad to use \newpage before \section instead of titlesec package --- this is what David Carlisle already answered about.

Basically this applies to all kind of systems. How many keyboard shortcut in Word to learn, how many packages to remember in LaTeX... It always depend on how much one is going to use some software.

Another one on meta-level: not asking computer support when you have one available. Many have used hours to find out things that I could have tell in a minute.

13

The most common mistake that LaTeX beginners make is that they start with the “stock” article class and enrich it with various packages to suit their needs instead of picking a more specialised class providing all the functionality they need.

It has several drawbacks for the users:

  • They spend a significant time looking for “tabular package XY” that can do “plop plop fizz fizz” instead of using what is provided by the specialised class they did not pick.

  • They spend a significant amount of time making some packages work together and looking for answers to their problem.

  • They spend a significant time trying to customise the class to achieve a pleasant layout, while they neither have the needed programming skills nor (most probably) the design skills.

Is there any LaTeX introduction or tutorial that emphasises the choice of a document class and provides valuable resources (catalogue, comparison of features, application domain) to choose one? It seems to me that most of them pick one (article) and stick to it for the whole tutorial, while it could be more beneficial—once the basics of text and math typesettings have been covered—to drop that generic class in favour of a specialised one.

To put it in one sentence: “unexperienced users confuse the roles of designer and scripter (and tutorials tend to perpetuate this confusion).”

  • 11
    I have never used anything BUT article. What else is there? KOMA-script and memoir seem to be languages in themselves, and half my packages warn that they are incompatible with one or both! – Canageek Oct 24 '13 at 21:01
  • 8
    This answer would be much more useful with some real examples, i.e. packages that are often used but aren't needed when using a specific document class(either because it provides the same output or because the document class can do the thing slightly differently, but in a "better way" from the typesetting point of view). – Bakuriu Oct 25 '13 at 09:41
11

Actually it is not wrong but the output might make your eyes a bit itch. "Wrongly" representing a series of unaligned equations using \[..\] instead of using \begin{gather*}...\end{gather*}.

\documentclass[preview,border=12pt]{standalone}
\usepackage{amsmath}
\begin{document}
\section*{Not recommended}
The solution of $x^2-5x+6=0$ is
\[
(x-3)(x-2)=0
\]
\[
x-3=0 \text{ or } x-2=0
\]
\[
x=3 \text{ or } x=2
\]

\section*{Recommended}
The solution of $x^2-5x+6=0$ is
\begin{gather*}
(x-3)(x-2)=0\\
x-3=0 \text{ or } x-2=0\\
x=3 \text{ or } x=2
\end{gather*}
\end{document}

enter image description here

Moriambar
  • 11,466
11

Judging by questions on this site - which I admit are probably not representative of beginners as a whole but which are, at the very least, of special interest to readers likely to peruse this answer - I would say that one basic mistake, which leads to a number of others, is not stepping back and getting a general sense of the capabilities of TeX & friends. I don't mean the details, but the 'big picture'. For example,

  • TeX & friends are good tools for typesetting text, mathematics and bibliographies;
  • TeX & friends are great for automatically ensuring consistent layout, accurate references and cross-references;
  • TeX & friends are not the best tools to create a database, manage a spreadsheet or draw elaborate 3D scenes with accurate perspective and lighting;
  • TeX & friends are not good replacements for tools such as sed, (g)awk and grep, although many editors provide much of their functionality;
  • neither TeX nor friends are good replacements for a sheepdog;
  • TeX & friends make at best indifferent tea.

In particular, TeX & friends are much better than human beings - and much better than many other programmes - at the things they do well. They are not generally good - and typically much poorer than alternative programmes - at the things they are not intended to do.

One key strategy for getting the most out of TeX & friends is to use the right tool for the right job. Some questions boil down to requests for TeX solutions to the problem of brewing the perfect cuppa. This is a perfectly reasonable aim but the best answer involves advising a non-TeX solution. a perfectly reasonable goal requiring a non-TeX solution

Other questions essentially ask for TeX-based cat-herding solutions. The best answer in this case involves recommending against adopting the goal set out in the question. an entirely unreasonable goal which has no reasonable solution

However, these types of answers are rarely appreciated and frequently interpreted as either lacking in imagination ('I don't believe it is not possible/advisable') or as admissions of TeX's failure to rise to the needs of twenty-first century users ('Super Programme can make tea while simultaneously sheering sheep, sending a letter to my gran and paying the gas bill'). This is a shame since these really are the best answers in these cases and appreciating TeX's limitations, as well as its strengths, is key to using it effectively.

[That is, I am extremely sceptical of solutions of this kind.]

Cup of tea is from openclipart.org.

'Like Juggling While Herding Cats' is by Robin Catesby and available here under this CC licence.

cfr
  • 198,882
10

Cleaning too early

  • Suppose there is an input file importing EPS images and it will be compiled with latex->dvips->ps2pdf. Some users think that the EPS images are no longer needed after running latex so they can be deleted. Actually it is wrong because dvips still needs the EPS. (it must be documented in arara)

  • Suppose there is an input file using cross-referencing with \label. Some users aggressively remove any auxiliary files generated by (pdf)latex compiler before the next invocations. It makes the cross-referencing always end with ??. These auxiliary files must not be deleted until the cross-referencing is properly done. (it must be documented in arara).

  • 3
    I've dealt with a few people who made a satisfactory pdf draft, then "cleaned" their folder of all the auxiliary files... and got rid of the .tex source along the rest! – alexis Oct 25 '13 at 09:59
9

At the very beginning, trying to make a table in this way:

\begin{table}{ccc}
a & b & c \\
\end{table}
ShreevatsaR
  • 45,428
  • 10
  • 117
  • 149
Fran
  • 80,769
  • 1
    Could you explain what is wrong or right? – mafu Jan 05 '14 at 07:38
  • 3
    @mafutrct To make a table in LaTeX you need the less intuitive environment tabular, not table. There is also commonly used the table environment, but is not to make a table, so the confusion is served for the novice. What a table environment does is move (float) a table (or whatever it contain) to the best possible place according to several rules (the top of the page, the bottom, the next page, etc.). – Fran Jan 06 '14 at 09:22
9

Another common misbehavior is reading package or class documentations from TeX mirrors (the worst case, they read from sites with obsolete contents) even though they already installed the complete, up-to-date packages and classes.

I mean that they don't know that texdoc <package-name> invoked in their own machine can launch the documentation in question.

  • 1
    Unfortunately it is not always clear what <package-name> is (like with KOMA-Script). In MiKTeX texdoc <package-name> opens a HTML list of documentation items of the given package, while texdoc --view <package-name> opens the first item of that list. In the case of Beamer this is only the logo, with PGF it's the mindmap example, with NewTX the implementation notes etc. You have to know the filename: texdoc beameruserguide, texdoc scrguien etc. – marczellm Oct 26 '13 at 09:11
  • @marczellm: It should be regarded as the bad design of TeX distro. :-) – kiss my armpit Oct 26 '13 at 09:17
7
  • Closing opening curly brackets with parenthesis (but they are not easily distinguishable with default settings of some editors).
  • Rewriting sort of description lists by hand:

    \textbf{Foo:} description of foo.
    
    \textbf{Bar:} description of bar.
    
    [...]
    
  • Forgetting to load the package providing the macro they are using.
  • Forgetting that a LaTeX text editor is a text editor and being puzzled when they want to search or replace text in their .tex source.
  • Being bitten by the rigor needed by LaTeX and its sensibility to misspelling in macros, packages, files names.
Denis Bitouzé
  • 9,652
  • 4
  • 27
  • 85
  • 4
    I don't get bullet four. – Raphael Oct 23 '13 at 06:16
  • 1
    @Raphael Yesterday, a student of mine replaced by hand numerous commas by periods instead of using the "Search/Replace" tool of the editor. – Denis Bitouzé Oct 23 '13 at 07:39
  • Is it related to siunitx in which users can change the decimal point from period to comma or vice verse? – kiss my armpit Oct 23 '13 at 15:51
  • 1
    @Marienplatz No, for siunitx, I know the locale=FR (for instance) setup. It was in fact related to pgfplots that accept only period as input decimal separator (BTW, I just sent a feature request to Christian Feuersaenger, the pgfplots author, for providing a way to specify the input decimal separator other than period). – Denis Bitouzé Oct 23 '13 at 15:52
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\,\}$.

Smylic
  • 834
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.

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?

  • 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 Oct 24 '13 at 21:00
  • @Canageek: I need a consistent syntax rather than a clear one. – kiss my armpit Oct 24 '13 at 21:03
  • Good point, those are clear, just not consistent. – Canageek Oct 24 '13 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 Oct 25 '13 at 09:44
  • @Bakuriu: PSTricks' packages are some of them. – kiss my armpit Oct 25 '13 at 09:58
  • @Canageek While I agree these aren’t consistent, you can find some help on tex.sx: http://tex.stackexchange.com/questions/516/does-it-matter-if-i-use-textit-or-it-bfseries-or-bf-etc, http://tex.stackexchange.com/questions/15361/will-two-letter-font-style-commands-bf-it-ever-be-resurrected-in-latex, http://tex.stackexchange.com/questions/23650/when-should-we-use-begincenter-instead-of-centering, http://tex.stackexchange.com/questions/2651/should-i-use-center-or-centering-for-figures-and-tables. – doncherry Oct 25 '13 at 10:09
6

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

% Tip: Always use eqnarray instead of align

:-(

leo
  • 1,337
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?"

asmeurer
  • 454
5

Using floating environments (table and figure) in beamer.

  • 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 Mar 27 '14 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.

5

Forgetting to add fontenc package when using accent letters.

\usepackage[T1]{fontenc}
Hunsu
  • 1,721
  • 1
  • 14
  • 29
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.
subham soni
  • 9,673
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.

karlkoeller
  • 124,410
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

Emma
  • 129
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)
Orion
  • 204
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.

math
  • 3,135
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.