LaTeX Tips

A general grab-bag of tips for using LaTeX, from the days when I still used it a lot:


\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.


\newenvironment{intro}{\sffamily}
{\vspace*{2ex minus 1.5ex}}