LaTeX Tricks
Latex for drafting
Line numbers
Add line numbers to a document:
\usepackage{lineno}
Start and stop line numbers by
\begin{linenumbers}
...
\end{linenumbers}
Alternatively, switch line numbers on for the whole document with
\linenumbers
Watermark
Some drafting committees like to have a "DRAFT" or "Confidential" watermark included. For this the package draftcopy comes in handy - just add it to the document:
\usepackage{draftcopy}
A useful discussion of implementing watermarks can be found here [1].
TODO notes
The package todonotes provides a convenient way to mark TODO items in a LaTeX document.
Usage:
\usepackage[colorinlistoftodos]{todonotes}
...
This is the document text.\todo{This is the TODO item}
To get a list of TODO items at some place in the document:
\listoftodos
The package is available at CTAN [2], but seems to be usually installed by many LaTeX distributions. Documentation is available here[3](PDF).
Figures
Figures spanning two columns
\begin{figure*}
...
\end{figure*}
will make the figure span the width of the entire page.
Latex wikimedia
If the LaTex compiler <math> your formula </math> gives a not pretty result: Try <math>\left. your formula \right.</math>
- Before: Fehler beim Parsen (Konvertierungsfehler. Der Server („https://wikimedia.org/api/rest_“) hat berichtet: „Cannot get mml. Server problem.“): {\displaystyle E_{\gamma }}
- After: Fehler beim Parsen (Konvertierungsfehler. Der Server („https://wikimedia.org/api/rest_“) hat berichtet: „Cannot get mml. Server problem.“): {\displaystyle \left.E_{\gamma }\right.}
Mixed
Formulas and Equations
- Springer's LaTeX Sandbox
- Springer's LaTeX equation database
- Small online cookbook
Filling LaTex table with PAW kumac
- PAW meets LaTex: Directly filling a LaTex table with your PAW kumac.
Reverse enumerating
- Download revnum.dtx
- Follow the instructions in the header to create revnum.sty
- Add at the beginning of your latex file
\usepackage{revnum}
- In the actual text, do:
\begin{revnumerate}
\item Wednesday: TRM
\item Tuesday: Planning-Meeting
\item Monday: Elke-Meeting
\end{revnumerate}
- Gives:
3. Wednesday: TRM 2. Tuesday: Planning-Meeting 1. Monday: Elke-Meeting
Useful for lists which are updated from time to time!