Homepage of Raf Vandebril

Homepage of Raf Vandebril

Latex Tips

  • Ordering the citations and changing e.g. [2,3,4,5] to [2--5] automatically.
    Use package cite OR when natbib is loaded as a package (e.g. in elsarticle style) add the options sort&compress (immediately to the documentclass when automatically loaded or to the style file options when using usepackage).
  • When a box is not added to the end of a proof:
    \qquad \hfill $\boxempty$
  • Enable line numbering (pagewise is optional):
    \usepackage[pagewise]{lineno}
    \linenumbers
  • Remove spacing in the bibliography environment:
    \usepackage{natbibspacing}
  • Change margins of the document easily:
    \usepackage[lmargin=2cm,rmargin=2cm,tmargin=3cm,bmargin=2.50cm]{geometry}
  • In math mode an arrow with information on top and below the arrow:
    \xrightarrow[bottom]{top}
    Available in the amsmath package.
  • To change standard column spacing in arrays or tabulars:
    \setlength{\tabcolsep}{1pt}
    \setlength{\arraycolsep}{1pt}
  • Sometimes, one does not want to have hyphenation. E.g. when one needs to copy the text to another file.
    \usepackage[none]{hyphenat}
    and \sloppy in the doc to avoid excessive complaining.
  • Spacing between items and so on (defined inside the itemize)
    \begin{itemize}
    \setlength{\itemsep}{1pt}
    \setlength{\parskip}{0pt}
    \setlength{\parsep}{0pt}
    \item first item
    \item second item
    \end{itemize}
  • With the following commands, you can easily check if there are overfull boxes in your document.
    \hfuzz: the overfull tolerance
    \overfullrule{5pt}: the size of the printed block in case of an overfull rule.
  • Showing references and citations, usefull for finding errors.
    \usepackage{showkeys}
  • Showing what is inserted on specific pages for the index.
    \usepackage{showidx}
  • Showing crop marks on pages.
    \usepackage{crop}
    \crop
  • To create more space in e.g. arrays:
    {\rule[0.1cm]{0cm}{0.3cm} TEXT }
  • To show left equation numbering \documentclas[leqno]. To show them on the right \documentclass[reqno]. The standard setting depends on the style file.
  • Remove all comments from a latex file (shell script)
    sed -e '/^%/d' FILENAME | more
    sed -e '/^%/d' FILENAME > FILENAME2
Statistics - About this site
Generate time: 0.01038 seconds
Page last changed on: (December 07 2010 13:30:35 )