z·eeki·sh

tech log on gentoo, linux, and random stuff

latex-beamer presentation on dual display (laptop + projector)

with 3 comments

The latex-beamer class supports a \note{} macro where one can add notes/slide descriptions that can be hidden from the audience.Combined with the \setbeameroption{show notes on secondscreen} option (and the pgfpages package), each page in the resulting pdf file has the presentation slide and the notes slide placed side by side. Then one can set up a dual-display environment—laptop + projector being the scenario I’m interested in—so that the presentation slide will show up on the projector while the notes slide is on the laptop. The restrictions here are

  1. the two displays better have the same resolution

    There is a way around this, described here, where essentially one sets up the projector to just reproduce part of the laptop screen, but I find the resulting image on the projector a bit too fuzzy.

  2. The pdf viewer must be able to span the two displays in its presentation mode. Surprisingly my day-to-day choice of lightweight viewer, evince, doesn’t support this—instead it just spans a single display in its full screen mode. (I’m using xrandr for dual-display setup. more on that later). Luckily acroread behaves in the desired manner (with some caveat. see below)

Here’s the script I use to add a projector to the right of my laptop screen (i.e., right edge of laptop screen identified with left edge of the projector screen):

xrandr --output LVDS1 --mode 1024x768 --primary
# force use 1024x768 mode of the projector
xrandr --output VGA1 --mode 1024x768 --right-of LVDS1 || (xrandr --addmode VGA1 1024x768 && xrandr --output VGA1 --mode 1024x768 --right-of LVDS1)

Three things to note:

  1. The reason why I put the projector on the right is because the window manager I use (awesome) automatically push all windows onto the left-most screen when a second screen is added, and you don’t want all your stuff to go up onto the projector–I’m sure there is a way to overcome this in awesome but I’m just too lazy.
  2. The --primary is also necessary, this tells xrandr to set the laptop screen (LVDS1) as the primary one. Why? Because when going into full screen mode, acroread aligns the top-left corner of your document to the top-left of the primary screen. If your projector ended up becoming the primary screen, your notes will be displayed on the projector instead of your slides (which is pushed outside the visible range).
  3. With the above layout, your beamer document should have notes frames placed on the left hand side, \setbeameroption{show notes on secondscreen=left}

For completeness, here is the script to shut off the projector output:

xrandr --output VGA1 --off
xrandr --output LVDS1 --auto

Advertisements

Written by zsh

March 18, 2011 at 12:51 am

3 Responses

Subscribe to comments with RSS.

  1. Hey there,
    I was running into the same problem as you, but my acroread would still always display the presentation on one screen only – I fixed this by plainly switching over to impressive at impressive.sourceforge.net .
    If you have set up your XRandR as above, just passing “-g 2048×768” to ./impressive.py will correctly stretch the pdf to both monitors.

    Hope I just saved someone a few hours of trying PDF readers ;)

    ThePadawan

    September 14, 2011 at 4:55 am

    • thanks for the headsup

      zsh

      September 14, 2011 at 7:48 am

  2. Thanks for the post.

    It is sometimes also wished to have
    1/ The PDF in presentation mode on the beamer
    2/ The same PDF on part of the laptop screen, with some space left for a terminal, a clock app, …

    However, if you use –same-as in xrandr, then a full screen window occupies the largest of the two screens (we’ll assume it’s the laptop’s). Thus you’ll have your laptop screen covered and the slide wont fit on the beamer output.

    In order to solve this problem, you can do:
    xrandr –output VGA1 –mode 1024×768 –output LVDS1 –auto –pos 1×0

    Thus you have just 1 pixel offset between the beamer and laptop screen. If your laptop screen is smaller than 1024×768, the beamer screen thus occupies the 1023×768 top left area of laptop screen. They look as is they were the same, some of the laptop’s stuff is not shown on the beamer.

    Now open your PDF viewer, move the window right to the top left of the screen. When you toggle to full screen, X will communicate the 1024×768 size of the beamer output to the window, and you’ll have the presentation running on these 1024×768, fitting the beamer output ; and also on the top left area of your laptop.

    Joce

    October 12, 2011 at 5:03 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: