Setbeamercolor Bibliography Definition

Contents

Have you ever been to Frankfurt? I’ve had the pleasure of visiting Frankfurt a few times, albeit usually just through the airport. It’s the first city where I stayed in a Doppelzimmer mit Frühstück (double room with breakfast). Frankfurt is also the name of a popular theme in the LaTeX document class Beamer, which is used for making presentations (not coincidentally, Beamer is the German word for projector).

Beamer has a nice selection of themes with different layouts, but one downside is that the themes don’t offer many choices in terms of color. There’s dark blue, light blue … the yellow one … some red. But mostly blue. This can get tiring after watching three talks in a row by presenters who made their slides the night before and went with a default color scheme.

Some institutions are fortunate to have their own (un)official Beamer theme with the institution’s colors. UBC’s ECE department did not, so my quest for color began last year to replace a default Beamer blue with … UBC blue (believe me, it’s a different blue). I didn’t want to tinker too much with the underpinnings of Beamer, but I found that the generally excellent official documentation lacked some direction about what color options I could change (beyond the basics). So, a colleague and I went exploring. This post explains two ways to change Beamer colors by setting up your own custom color scheme. The first method is very quick with . The second method takes a little bit of tinkering with , but ultimately gives you much more control.

Picking Beamer Colors

The first decision is to pick a color(s). I suggest defining two colors for variety, where one is your primary and one is your secondary. However, only one color is needed for the method. There are two ways to pick colors:

  • Choose from the list of known Beamer colors. By default, Beamer uses the package, so you can immediately use any of ‘s pre-defined colors. As of this writing, these colors are listed in Section 2.4 of the official documentation. For example, the list includes blue, red, green, yellow, etc. A list of 68 colors is available if you load with the option when you load Beamer ().
  • Define your own custom colors. Use the command to assign a custom name and then define the parameters for your color (such as RGB values). This is handy if you want to use a very specific color, as I did.

Change Beamer Colors Method 1:

The command can be used to load any of the default Beamer color themes (as displayed here). But this post is about not using the default color themes. You can use with any color you want by applying the color to the of the presentation.

Here is a minimal example. I’ve chosen to use the Madrid theme (sorry Frankfurt) with the outer theme (to add a header) and the inner theme (to replace the shiny default circles).

Here is how the PDF looks:

Pro: One line of LaTeX code and you’re done.

Con: The shading of the color is automatically modified for different parts of the presentation (i.e., lighter or darker), so you don’t have full control over how the color appears. In my case, some elements are dark enough to appear black.

Change Beamer Colors Method 2:

If you just want a break from the default color themes, then is sufficient. If you want to define exactly what colors are used, then a little more work is required (but not much). My goal was to use UBC’s official colors, so a better solution was needed.

A key find was Thierry Masson’s Beamer appearance cheat sheet. This document lists many of the properties that you can manipulate. Page 1 of the sheet lists things that you can color using . You can play around with it, but here is a quick method to color your entire presentation:

  1. Set the background color of ALL FOUR palettes to your primary color. Set the foreground color of each palette to your desired text color (most likely black or white).
  2. Set the color of elements that are not defined by the palettes. You can use your primary or secondary color. This might be the hardest step and could take some trial and error to catch everything. The most important one is (for bullets and numbers in lists). If you have a table of contents, then you will also want to set . Anything you don’t catch will appear in the default colour theme.
  3. (optional) Select some palette elements where you would like to see the secondary color and set the color for just those elements. For example, setting to the secondary color has a nice clean appearance in themes that use a header or footer. Why not set a whole palette to the secondary color? You can, but I’ve found that you can end up with some undesirable results in headers.

Here is the same example as above but now using :

And here is how the PDF looks:

Pro: Much more control over how your colors are used, and can be accomplished with less than 10 added lines of code (depending on how much you want to use your secondary color).

Con: Trial and error to catch elements that still use the default color scheme. One way to speed this up visually is to call  first to set everything to a color that has a strong contrast with the colors you want to use.

Summary

I recommend using these two methods to change Beamer colors as follows:

  • If your presentation starts in 10 minutes and you don’t want to look like you just finished your slides, use .
  • If you want to consistently display a desired color, whether for branding or any other reason, then use .

Postby Stefan Kottwitz » Mon Feb 11, 2013 9:56 am

And there's already a suggestion by Alan Munn, producing a bibliography similar to the standard:



references.png (31.56 KiB) Viewed 10722 times


Stefan
  1. \begin{filecontents}{\jobname.bib}
  2. Author = {Ferdinand de Saussure},
  3. Title = {Cours de Linguistique G{\'e}n{\'e}rale},
  4. Author = {Ivan A Sag and G Gazdar and T Wasow and S Weisler},
  5. Journal = {Natural Language \& Linguistic Theory},
  6. Title = {Coordination and How to Distinguish Categories},
  7. \bibliographystyle{apalike}
  8. % make bibliography entries smaller
  9. \renewcommand\bibfont{\scriptsize}
  10. % If you have more than one page of references, you want to tell beamer
  11. % to put the continuation section label from the second slide onwards
  12. \setbeamertemplate{frametitle continuation}[from second]
  13. % Now get rid of all the colours
  14. \setbeamercolor*{bibliography entry title}{fg=black}
  15. \setbeamercolor*{bibliography entry author}{fg=black}
  16. \setbeamercolor*{bibliography entry location}{fg=black}
  17. \setbeamercolor*{bibliography entry note}{fg=black}
  18. % and kill the abominable icon
  19. \setbeamertemplate{bibliography item}{}
  20. \frametitle{My great slide}
  21. \item\cite{Sag1985,Saussure1995} said some stuff.
  22. \begin{frame}[t,allowframebreaks]

0 thoughts on “Setbeamercolor Bibliography Definition”

    -->

Leave a Comment

Your email address will not be published. Required fields are marked *