A blog by Rob J Hyndman 

Twitter Gplus RSS

LaTeX tips

Published on 3 September 2008

While read­ing stu­dents’ the­ses and papers recently, I came across var­i­ous exam­ples of poor latex-​​ing that I thought would be use­ful to catalogue.

  • Don’t set both width and height when using \include­graph­ics. It dis­torts the fig­ure. Instead, I sug­gest using \includegraphics[width=\textwidth]{..}
  • Be con­sis­tent in cap­i­tal­iz­ing sec­tion and sub­sec­tion head­ings, and titles in the bib­li­og­ra­phy. My pref­er­ences is to use sen­tence case throughout.
  • When using func­tions such as max, min, log, exp, sin, cos, etc., use the back­lash ver­sion. e.g., \max rather than max. This puts the func­tion name in roman font rather than math italics.
  • For any­thing else which should appear as text rather than in math ital­ics, use \text{…}. This is part of the ams­math package.
  • Don’t use eqnar­ray. Use the align envi­ron­ment instead. The spac­ing is better.
  • Don’t put blank lines around equa­tions. This cre­ates para­graph breaks. If you really want an extra line in the tex file, use a % sign so there is no inserted para­graph break.
  • For bold sym­bols, use \bm{..} with the bm pack­age. It works bet­ter than the alternatives.
  • Only make the sym­bol bold, not every­thing else. e.g., \bm{x_t} is wrong. \bm{x}_t is correct.
  • Use \dots when­ever you want a series of dots. Never type

Related Posts:


 
Tags:
No Comments  comments