Nov 102009
 

I jotted this down a year ago when I needed to produce a set of handout notes for a 3rd year physics lecture I took. Just last week, after taking a similar set of lectures, I wanted to find it but couldn’t. Murphy’s Law has come into effect, and my jotted note has turned up now that my need for it has passed.

The Beamer class for LaTeX is a great way to produce very nice presentation slides with useful features such as automatic progress markers and internal hyperlinks. Being LaTeX, it is also possible to completely change the output formatting by simply altering certain document settings. This allows me to produce slides that have black backgrounds for better projection onto a screen, and then change a single line (specifying the colour theme) to get a white-background version optimised for printing on paper.

To make it even more efficient to print, I used the following command to fit 3 slides to an A4 page:

pdfnup --frame false --nup 1x3 --paper a4paper --orient auto --pages all --trim "0 0 0 0" --delta "1cm 1cm" --offset "0 0" --scale 0.91 --turn true --noautoscale false --openright false --column false --columnstrict false --tidy true --outfile main3up.pdf main.pdf

Feb 182009
 

The fonts that LaTeX uses by default (called “Computer Modern”) are very elegant, and are one of the great reasons to use LaTeX for typesetting documents. Frustratingly, I’ve been having difficulty lately with my pdfviewer (epdfview and sometimes xpdf) not displaying these fonts well in pdfs I’ve created using LaTeX.

Adobe acroread has been able to do a better job, but who wants to use such a slow and bloated piece of software just to quickly view a pdf? At least the pdfs have printed properly, so up till now I haven’t been too worried.

The solution, which I found at a page encouragingly called “High quality PDF output from LaTeX and TeX”, is profoundly simple. It simply involves telling LaTeX to use the scalable font rather than the older bitmap version. Add these two lines to the preamble:

\usepackage[T1]{fontenc}
\usepackage{ae,aecompl}

and you’re done.

Sep 042007
 

One of the things that frustrated me last year as I edited my honours thesis was text elements in inserted graphs. Axis and tick labels were unavoidable, but making them look consistent with the document text was not easy. I wish that I had found this article about making plots using Octave, gnuplot, and LaTeX, because the psfrag package provides a perfect solution.

It replaces text in an eps file with its own LaTeX formatted text. This allows, for instance, elaborate mathematical formulae to be displayed anywhere on the graph. It also allows axis and tick labels to be replaced with text that exactly matches the font and size used throughout the document – even if document wide settings are changed after the graph has been created. Continue reading »

Jun 062007
 

In LyX it is easy to make a theorem with multiple parts. It involves using the enumerate environment nested in a Theorem environment. But the resulting parts are numbered (1), (2), et c. To get alphabetically numbered parts, use the following LaTeX inserted code.
\begin{itemize}
\item[(a)] < PART ONE >
\item[(b)] < PART TWO >
\end{itemize}

Roman numerals can be used also, by replacing the “a”, “b” and so on.