MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have just created a presentation using beamer, and I want the "one" command at the top of the file that creates a printable version. It is true that I can recompile having searched for all the \pause commands and percent them out, but I remember there is an elegant way of doing this.

For the record, I am using the Singapore style, and the talk will not be of much interest to mathematicians.

(This has now been closed as "off-topic" with one of the reasons being the existence of TeX-SX. People interested in this question should therefore consider the question Is there a nice way to compile a beamer presentation without the pauses? on the TeX-SX site.)

share|cite|improve this question

closed as no longer relevant by Mark Meckes, David Roberts, S. Carnahan Jun 6 '13 at 8:47

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

btw -- I removed the "soft-question" tag, which we'll try to reserve in future for particularly squishy questions, not just to indicate "doesn't-contain-hard-maths". – Scott Morrison Nov 18 '09 at 2:55
@Scott: I hadn't noticed the date. I'll remove my comment. – Dan Fox Nov 20 '12 at 11:51
How about we close this question as 'no longer relevant', seeing as now we have TeX.SX? – David Roberts Jun 6 '13 at 2:59
As it's now been closed, I've added a link to the "duplicate" question on TeX-SX so that people coming here can get the best help. – Loop Space Jun 6 '13 at 9:42
up vote 10 down vote accepted

The first answer is the basic correct answer, but there are variants.

  1. Don't change the background colour (waste of ink), rather use pgfpages to put a border around each frame (this isn't one of the standard page-type declarations, but it isn't hard and I can make mine available if anyone wants it).

  2. It's possible to change the type of the output (between beamer, handout, trans, or article) without modifying the file. The trick is to put the main document in one file, say geometry.tex but without the documentclass declaration. Then you create a new file for each type with just the documentclass declaration. For example, geometry.beamer.tex could contain:


    whilst geometry.handout.tex might contain


    and geometry.article.tex might be


    Not only does this make sure that you are always compiling the correct version of the document, it also means that if you use a version control system then it doesn't keep complaining about you modifying the file just because you change the output type.

  3. If you are strong in the ways of beamer and TeX, you can go one step further. I use beamer for lectures which means that one single file contains the beamer versions and the handout versions of nearly 30 lectures. To produce a given version of a given lecture, I need to have a way of telling TeX what I want. I could have 60 separate files all with variations on the above, but I've found a simpler way is to have TeX examine the jobname to determine this. Then I just have to have 60 symlinks to the main file (and I can create all 60 symlinks with a single zsh command). That is, lecture.beamer.2009-11-19.tex is a symlink to lectures.tex and when I run LaTeX on it then I get tomorrow's lecture in beamer format (well, I would if I'd written it yet). Again, I'd be happy to share the code for this if anyone's interested.

Addendum 2012-11-13 Unsurprisingly, an early question on TeX-SX was essentially exactly this one. Also unsurprisingly, I answered there as well and as that place is more suited to TeX answers than this one I incorporated this answer there. That answer can be found at which also contains links to my code for the above.

share|cite|improve this answer
Sorry, to bring back this old answer, but you say here that you'd be happy to share the code to make a border around the frames and to let TeX decide which version to use based on the jobname. I would be glad to make you happy. ;-) – nvcleemp Nov 13 '12 at 8:56
nvcleemp See edit: if you follow the links you'll end up at the code. – Loop Space Nov 13 '12 at 17:20
The idea of the 60 symlinks hurts me a little! :-) Why not simply have a zsh script which invokes latex after defining a command, something like pdflatex \def\printonly{2009-11-19}\input{the-big-file.tex} (and probably munging -jobname so as to get distinct output files) – Mariano Suárez-Alvarez Nov 13 '12 at 19:10
(one could do it all at once, just saying pdflatex -jobname lecture-2009-11-19 lectures.tex and have the file look at the jobname directly to select the lectura, instead of using a separate command.) – Mariano Suárez-Alvarez Nov 13 '12 at 19:15
In an answer A S says this "I know this is old, but generally everything Andrew Stacey has worked on goes smoothly. This one gave me fits today, so I just wanted to comment (and don't know how commenting works) that this answer requires \usepackage{pgfpages} even though that isn't stated anywhere... Might be worth stating?" I thought you might not notice otherwise, thus this comment. – user9072 Jun 5 '13 at 23:59

achieves what you want. I also write

  \setbeamercolor{background canvas}{bg=black!5}
  \pgfpagesuselayout{4 on 1}[letterpaper,landscape,border shrink=2.5mm]

which in particular gives you 4 slides per page, and some nicer formatting (shaded backgrounds, for example).

You can also use


which disables all the uncovering, but otherwise leaves things very much like in usual beamer mode.

share|cite|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.