beamerthemeJuelich.sty 4.03 KB
Newer Older
1
% Latex-Beamer Template Research Centre Juelich
2
% version 18.12
3 4 5
% please report any problems to i.kabadshow@fz-juelich.de
% this version does support pdflatex, xelatex and lualatex
%
6 7 8
\ProvidesPackage{beamerthemeJuelich}%
           [2018/12/14 v18.12
            Research Centre Juelich Beamer Template]%
9 10

\RequirePackage{ifluatex,ifxetex,ifpdf}
11
\RequirePackage{etoolbox}
12
\RequirePackage{tikz}
13
\RequirePackage{calc}
14
\RequirePackage{textcase}
15
\usetikzlibrary{calc}
Ivo Kabadshow's avatar
Ivo Kabadshow committed
16
\usetikzlibrary{external}
17 18 19

\ifluatex
  \RequirePackage{microtype}
20
  \RequirePackage{fontspec}
21 22 23
  \setmainfont{LiberationSans}
  \setsansfont{LiberationSans}
  \setmonofont{LiberationMono}
24 25
\else\ifxetex
  \RequirePackage{fontspec}
26 27 28
  \setmainfont{LiberationSans}
  \setsansfont{LiberationSans}
  \setmonofont{LiberationMono}
29
\else
30
  \RequirePackage{helvet}
31
  \RequirePackage{microtype}
Andreas Beckmann's avatar
Andreas Beckmann committed
32
\fi\fi
33 34 35 36 37 38 39 40 41 42 43 44 45 46



\newcommand{\fzjset}[1]{\pgfkeys{/beamerfzj/.cd,#1}}

\pgfkeys{/beamerfzj/.cd,
  .search also={
    /beamerfzj/inner,
    /beamerfzj/outer,
    /beamerfzj/color,
    /beamerfzj/font,
  }
}

47 48
\pgfkeys{/beamerfzj/.cd,
  pages layout/.code={%
Andreas Beckmann's avatar
Andreas Beckmann committed
49 50
        \usepackage{pgf}
        \usepackage{pgfpages}
51
        \pgfpagesuselayout{#1}[a4paper,border shrink=5mm]
Andreas Beckmann's avatar
Andreas Beckmann committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68

        \pgfpageslogicalpageoptions{1}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{2}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{3}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{4}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{5}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{6}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{7}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{8}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{9}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{10}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{11}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{12}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{13}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{14}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{15}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
        \pgfpageslogicalpageoptions{16}{border code=\pgfsetlinewidth{0.4pt}\pgfstroke}
69
  }%
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
}

\mode<presentation>

% Juelich specific definitions

\deftranslation[]{SlideName}{Slide}
\deftranslation[to=German]{SlideName}{Folie}

\deftranslation[]{HelmholtzBanner}{Member of the Helmholtz Association}
\deftranslation[to=German]{HelmholtzBanner}{Mitglied der Helmholtz-Gemeinschaft}

\usefonttheme{Juelich}
\usecolortheme{Juelich}
\useinnertheme{Juelich}
\useoutertheme{Juelich}

% default settings for title, part and section pages
Ivo Kabadshow's avatar
Ivo Kabadshow committed
88 89 90 91 92
\fzjset{
  title=allcaps,
  subtitle=regular,
  part=regular,
  frametitle=allcaps,
93
  compat mode=disabled,
Ivo Kabadshow's avatar
Ivo Kabadshow committed
94
}
95 96 97 98 99

\mode<all>

% define progressbar
\makeatletter
Ivo Kabadshow's avatar
Ivo Kabadshow committed
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

\newlength{\fzj@progressinheadfoot}
\newlength{\fzj@progressinheadfoot@linewidth}
\setlength{\fzj@progressinheadfoot@linewidth}{0.4pt}
\setbeamertemplate{progress bar footer}{
  \nointerlineskip
  \setlength{\fzj@progressinheadfoot}{%
    \paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
  }%
  \begin{beamercolorbox}[wd=\paperwidth]{progress bar footer}
    \tikzset{external/export next=false}%
    \begin{tikzpicture}
      \fill[fg] (0,0) rectangle (\fzj@progressinheadfoot, \fzj@progressinheadfoot@linewidth);
    \end{tikzpicture}%
  \end{beamercolorbox}
115
}
Ivo Kabadshow's avatar
Ivo Kabadshow committed
116 117 118 119 120 121

% make sure we have a large number of total slided before the first run to keep the frame/total frame ratio below 1
% if your slide deck has more than 300 slides, you might increase the number below
% after the second latex run the totalframenumber will be read correctly from the .aux file
\def\inserttotalframenumber{300}

122
\makeatother