2012年11月8日星期四

Define Your Own Beamer Theme

Following from the last post, this article aims to help you create your own Beamer Themes, in case you are bored of all existing ones (including the two key-note styles I referenced).

After a brief investigation of the Beamer predefined themes directory, I realized that every beamer theme is made up of the four following components:

  1. Color (albatrossbeaverbeetle, ...)
  2. Font (defaultserifstructurebold, ...)
  3. Inner (circlesdefaultinmarginrectangles, ...)
  4. Outer (infolinesshadowsidebarsplit, ...)
Each of the above has a bunch of available options that you can apply. Beamer Theme Gallery contains a dynamic view on all default themes, from which you can almost generate the preview of nearly all combinations of the four components listed above. However, it seems the web site does not support the auto-generation of the theme source code directly, you still need further labour job to create the theme yourself.

The following are some specific tips for editing beamer, you can either put them in the preamble of your ".tex" file, or compact them in your ".sty" file for theme definition:



+ To insert page number:
\setbeamertemplate{footline}[page number] 

+ To delete the navigation bar (those short-cuts functioning forward, backward, etc.)
\setbeamertemplate{navigation symbols}{}

+ To set a shading effect for background
  • \beamertemplateshadingbackground{bottom_color}{top_color}
  • \setbeamertemplate{background canvas}[vertical shading][bottom=bottom_color, middle=middle_colour, top=top_color]
+ To put include the title in a block on the title page
\setbeamercolor*{title}{use=structure,fg=white,bg=structure.fg!10!black}
\setbeamertemplate{title page}[default][colsep=-4bp,rounded=true,shadow=true]

+ To set round and shadow features for block
\setbeamertemplate{blocks}[rounded][shadow]

+ To separate frame title with content (add a sub-frame for title)
\setbeamercolor{frametitle}{bg=black, fg=white}

+ To number sections and subsections in table of contents
\setbeamertemplate{sections/subsections in toc}[option]
"Option" could be ball or square or circle or triangle. These options can be applied for the itemize feature as well.

+ To disable subsection description in the predefined miniframe
  • \useoutertheme[subsection=false]{miniframes}
  • \setbeamertemplate{headline}
    {
    \begin{beamercolorbox}{section in head/foot}
    \vskip2pt\insertnavigation{\paperwidth}\vskip2pt
    \end{beamercolorbox}
    }

没有评论:

发表评论