Sie sind auf Seite 1von 8
Home
Menu

Menu

Home Menu CV Nice R code blog Subscribe « Back RSS Search
CV

CV

Home Menu CV Nice R code blog Subscribe « Back RSS Search
Nice R code blog
Home Menu CV Nice R code blog Subscribe « Back RSS Search
Subscribe

« BackHome Menu CV Nice R code blog Subscribe RSS Search

RSS RSS

Search

Search

A Nice Title Page for Beamer Presentations

by Daniel Falster - June 18, 2013 - posted in speaking, tools,

Falster - June 18, 2013 - posted in speaking , tools, I use beamer for making

I use beamer for making slide presentations, a scripted system based on the latex markup language. Overall, I really like it. But a persistent problem for me has been getting a pretty title page for my talks. Recently I managed to solve this.

Previously I have either used the default beamer settings, which give something very plain, like this:

Or I edited an image in Photoshop, exported it, then loaded it into my talk

Or I edited an image in Photoshop, exported it, then loaded it into my talk as a background. This was annoying for several reasons, but most of all the hassle of having to fire up Photoshop every time I wanted to make a new title page, or change my title.

I have now discovered how to make a nice title page with - a pretty image as backgorund - a semi-transparent text with title and author details - clickable links to my twitter account, email address and website, using icons from FontAwesome.

Here’s how. Set background image First you need to set the background image, over-riding the

Here’s how.

Set background image

First you need to set the background image, over-riding the default beamer background, and dropping the beamer title and navigation symbols.

1 {

2 \usebackgroundtemplate{\includegraphics[width=1.0\paperwidth]{images/Background.jpg}}

3 \begin{frame}[plain]

4 \end{frame}

5 }

Overlay a text box

3 \begin{frame}[plain] 4 \end{frame} 5 } Overlay a text box
Daniel Falster Follow @adaptive_plant #beamer #latex Anyone know how to overlay a transparent text box
Daniel Falster
Follow
@adaptive_plant
#beamer #latex Anyone know how to overlay a transparent text
box on a photo for a nice title page in beamer? e.g.
4:11 PM - Jun 4, 2013
1

This seems like it should be relatively simple, but my first search only uncovered large slabs of code. And my plea for help on twitter did not get any response.

A

bit more searching yielded some answers.

This talk by Vesa Linja-aho outlines several options for making framed text boxes. This alerted This talk by Vesa Linja-aho outlines several options for making framed text boxes. This alerted me to the framed and mdframed packages.

Here’s a solution using tikz , although was a bit more complicated than I would Here’s a solution using tikz, although was a bit more complicated than I would like.

In

the end, my preferred option was to use the mdframed package, as the code is relatively concise and the package comes

pre-packaged with my latex installation. The user guide for mdframed is quite good, but did not explain how to make the box transparent. That trick is achieved using the tikz settings, as explained here on stackexchange.

The eventual code is quite simple. Of course you need to include the mdframed package:

1

\usepackage[framemethod=tikz]{mdframed}

2

3

\begin{mdframed}[tikzsetting={draw=black,fill=white,fill opacity=0.7,

4

line width=4pt},backgroundcolor=none,leftmargin=0,

5

rightmargin=40,innertopmargin=4pt]

6

Text in my text box

7

\end{mdframed}

or, if you prefer, you can define a new md environment

1 \newmdenv[tikzsetting={draw=black,fill=white,fill opacity=0.7, line width=4pt},

2 backgroundcolor=none,leftmargin=0,rightmargin=40,innertopmargin=4pt]

3 {titleBox}

and call it

1

\begin{titleBox}

2 A transparent box

3 \end{titleBox}

The above example uses the tikz options for formatting, which enables the transparent background, but if you want a filled background, you can also use the formatting options in mdframed:

1 \begin{mdframed}[outerlinewidth=3,leftmargin=0,%

2 rightmargin=20,backgroundcolor=white,%

3 outerlinecolor=black,innertopmargin=2pt,%

4 splittopskip=\topskip,skipbelow=\baselineskip,%

5 skipabove=\baselineskip]

6 Text in my text box

7 \end{mdframed}

Adding text

Beamer has a built-in command for creating title pages. If you have defined your title, author, data and/or institution, you can use these by calling:

1 \begin{frame}

2 \maketitle

3 \end{frame}

But that’s pretty ugly. Alternatively you can

access the elements used by \maketitle directly, using the commands \insertdate , \insertauthor , \maketitle directly, using the commands \insertdate, \insertauthor,

\insertinstitute, or \insertshortinstitute, or

write the text yourself, \insertinstitute , or \insertshortinstitute , or Linking to my twitter account, email and website In

Linking to my twitter account, email and website

In addition to a text box, I also want handles to my twitter, web and email accounts on the title page. As Hilary Mason,

chief research scientist at bitly, explains it is helpful to include your twitter handle so that

1. People can post you questions they didn’t get to ask during the talk

2. Everyone knows you’ll be watching what they say about your talk!

It turns out that it is incredibly easy to make a web link in latex :

1 \href{http://twitter.com/adaptive_plant}{@adaptive\_plant}

It’s also relatively easy to add pretty icons, using FontAwesome. On a mac, you can get fontawesome working by following these instructions. There’s a couple of restrictions.

1. FontAwsome must be be installed in the system fontbook

2. You need to include the fontspec package, and use xelatek to compile your talk.

A cheatsheet of symbols available here

Tweaking the location

Finally, you can move the text boxes up and down by adding some `vspace’

1 \vspace{15em}

Conclusion

We’re done. You can find code to make this example here, as well as compiled pdf.

to make this example here , as well as compiled pdf . Acknowledgements Thanks to Rich

Acknowledgements

Thanks to Rich FitzJohn for valuable discussions, showing me how to generate make files, and reassuring me that there was no easy way to overlay text boxes (that he knew of). Also, thanks to all the coders who posted at links listed in this page, including of course developers of Latex and Beamer, which despite their troublesome nature, still remain best option (IMO) for making presentations.

« PREVIOUS discuss this article NEXT »

0 Comments

1

Login

Recommend

Share

Sort by Best

L O G I N W I T H OR SIGN UP WITH DISQUS ?
L O G I N W I T H OR SIGN UP WITH DISQUS ?

LOG IN WITH

OR SIGN UP WITH DISQUS

?
?

Name

Be the first to comment.

Copyright © 2017 - Daniel Falster - Powered by Octopress, Theme by Never Stop Building

Credentials Contact details Copyright © 2017 - Daniel Falster - Powered by Octopress , Theme by