LaTeX Tips and Tricks Collection

1 minute read

This post summarizes some common useful tips in LaTeX editing.


% Style: Figure 1(a)




% unsrt, abbrev, last option means use unsrt in \cite[xxx,yyy,ccc]

% add this in preamble

% at the end


  • Graphics path
  • Use other file extensions:
\DeclareGraphicsExtensions{.pdf, .jpg, .png}

Table and Tabular

  • threeparttable: Use footnote in tabular
% inside tabular:

% after tabular
\begin{tablenotes}[para] % do not break line between items
\item [$\dagger$] A foot note. % this reference to the item

Theorem, Definition

  • New definition/theorem
  • Useful packages:
    • ntheorem
    • amsthm



  • csvsimple: can automatically read csv and create tabular.
  • algpseudocode: the most updated algorithm / code environment, need to sit inside with algorithm package.
  • biblatex: provides better control for Bibliography.
  • multirow: provides \multirow and \multicolumn.
  • url: provides \url.
  • xspace: prevent a command eating space.
  • flushend: provides \flushend, balance two columns.

Controlling space

  • reduce space between float and text
\setlength{\textfloatsep}{10pt plus 1.0pt minus 2.0pt}
\setlength{\floatsep}{10pt plus 1.0pt minus 2.0pt}
\setlength{\intextsep}{10pt plus 1.0pt minus 2.0pt}
  • reduce bib item separation in biblatex

Commands and tools:

  • latexmk: automatically compile multiple times to resolve reference.
  • biber: replacement for bibtex for biblatex
  • texdoc: use texdoc <package> to search for a manual.


  • proof: use \IEEEproof
  • multiple equations: use \IEEEeqnarray or array.