LaTeX Tips
A general grab-bag of tips for using LaTeX, from the days when I still used it a lot:
- To add nice headers and footers to each page use the fancyhdr package.
- Use glosstex for most acronym and glossary needs.
- Use the hyphenat package if you need monospace text (such as that set by the \texttt command) to wrap correctly, with hyphenation marks.
- The varioref package provides easy-to-use cross referencing with automatic phrases such as ‘on the following page…’ etc.
- To include EPS easily in both latex and pdflatex documents, use the following magic incantation in the document preamble:
\newif\ifpdf \ifx\pdfoutput\undefined \pdffalse \else \pdfoutput=1 \pdftrue \fi \ifpdf \usepackage{hyperref} \usepackage[pdftex]{graphicx} \DeclareGraphicsExtensions{.pdf,.png,.jpg} \else \usepackage{graphicx} \DeclareGraphicsExtensions{.eps} \fi
Then refer to graphics files, when including them, without an extension. Use epstopdf to convert all EPS files to PDF for inclusion in the pdflatex version of the document.
- Use the custom-bib package to easily create custom BiBTeX style files.
- The following command produces a new environment which gives a nice way of having an introductory paragraph for each new chapter:
\newenvironment{intro}{\sffamily} {\vspace*{2ex minus 1.5ex}}