Omar Wasow


Macros for quickly creating image slides in Latex + Beamer

Scott Cunningham recently tweeted about the hassle of resizing slides in Beamer:

One place where PPT>Beamer is when you have 650 slides and have to keep adjusting the scale of an image. Compile, check, compile, wait 20 seconds, repeat 5 times, give up.

This always bugged me, too, until I found some basic `macros’ to generate image slides in Latex with one line of code. I tweeted back:

A simple solution is to define some macros at the top of the document that create an image slide. I have three image sizes (full page, large & medium) and a few variations with/without titles and/or a source at the bottom. Images are always proportional & take one line of code.

And, in case it’s of interest, here’s a sample Beamer file with those macros.

Zip file with sample Beamer slides and macros to create image-heavy slides using one line of code.


That said, I’m currently migrating slides from Latex / Beamer to R Markdown / Xaringan and digging 1/ speed 2/ ease of braiding together code/output/highlights for teaching 3/ ease of integrating web media (youtube, polls). See

Category: Random


Leave a Reply


I am an Assistant Professor in the Department of Politics at Princeton. I received a PhD in African American Studies, an MA in Government and an MA in Statistics from Harvard University. Previously, I co-founded and the Brooklyn Excelsior Charter School. I can be reached at owasow -at- gmail -dot- com.

My Recent Tweets: