123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167 |
- % Copyright 2007 by Marco Barisione
- %
- % This file may be distributed and/or modified
- %
- % 1. under the LaTeX Project Public License and/or
- % 2. under the GNU Public License.
- \mode<presentation>
- % String used between the current page and the total page count.
- \def\beamer@decolines@pageofpages{/}
- \DeclareOptionBeamer{pageofpages}{\def\beamer@decolines@pageofpages{#1}}
- % Show a line below the frame title.
- \DeclareOptionBeamer{titleline}[true]{\def\beamer@decolines@titleline{#1}}
- % Image used for the watermark.
- \def\beamer@decolines@watermarkorig{}
- \DeclareOptionBeamer{watermark}{\def\beamer@decolines@watermarkorig{#1}}
- % Height of the watermark.
- \def\beamer@decolines@watermarkheight{80px}
- \DeclareOptionBeamer{watermarkheight}{\def\beamer@decolines@watermarkheight{#1}}
- % The original image height is watermarkheightmult * watermarkheight.
- \def\beamer@decolines@watermarkheightmult{1}
- \DeclareOptionBeamer{watermarkheightmult}{\def\beamer@decolines@watermarkheightmult{#1}}
- \ExecuteOptionsBeamer{titleline=false}
- \ProcessOptionsBeamer
- % Enable/disable the watermark.
- \def\watermarkon{%
- \def\beamer@decolines@watermark{\beamer@decolines@watermarkorig}%
- }
- \def\watermarkoff{\def\beamer@decolines@watermark{}}
- % Initially enable the watermark.
- \watermarkon
- % Colors.
- \setbeamercolor*{lineup}{parent=palette primary}
- \setbeamercolor*{linemid}{parent=palette secondary}
- \setbeamercolor*{linebottom}{parent=palette tertiary}
- \setbeamercolor*{page header}{parent=titlelike}
- % Lengths
- \newlength{\headerheight}
- \setlength{\headerheight}{.045\paperheight}
- \newlength{\beamer@decolines@lineup}
- \setlength{\beamer@decolines@lineup}{.025\paperheight}
- \newlength{\beamer@decolines@linemid}
- \setlength{\beamer@decolines@linemid}{.015\paperheight}
- \newlength{\beamer@decolines@linebottom}
- \setlength{\beamer@decolines@linebottom}{.01\paperheight}
- % The height of the watermark part below the 3 bottom lines.
- \newlength{\beamer@decolines@watermarkheightbottom}
- \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@lineup}
- \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linemid}
- \addtolength{\beamer@decolines@watermarkheightbottom}{\beamer@decolines@linebottom}
- % The height of the watermark part over the 3 bottom lines before shrinking.
- \newlength{\beamer@decolines@watermarkheightupperorig}
- \setlength{\beamer@decolines@watermarkheightupperorig}{\beamer@decolines@watermarkheight}
- \addtolength{\beamer@decolines@watermarkheightupperorig}{-\beamer@decolines@watermarkheightbottom}
- \multiply\beamer@decolines@watermarkheightupperorig by \beamer@decolines@watermarkheightmult
- % Footer.
- \defbeamertemplate*{footline}{decolines theme}
- {
- \leavevmode%
- % Page number.
- \hbox{%
- \begin{beamercolorbox}[wd=.2\paperwidth,ht=0ex,dp=0ex,center]{}%
- \usebeamerfont{palette primary}\insertframenumber{} \beamer@decolines@pageofpages{} \inserttotalframenumber%
- \end{beamercolorbox}%
- \begin{beamercolorbox}[wd=.8\paperwidth,ht=0ex,dp=0ex]{}%
- \end{beamercolorbox}%
- } %
- % First line.
- \hbox{%
- \begin{beamercolorbox}[wd=.2\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{}%
- \end{beamercolorbox}%
- \begin{beamercolorbox}[wd=.8\paperwidth,ht=\beamer@decolines@lineup,dp=0pt]{lineup}%
- \end{beamercolorbox}%
- } %
- % Second line.
- \hbox{%
- \begin{beamercolorbox}[wd=\paperwidth,ht=\beamer@decolines@linemid,dp=0pt]{linemid}%
- \end{beamercolorbox}%
- } %
- % Third line.
- \hbox{%
- \begin{beamercolorbox}[wd=.1\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{}%
- \end{beamercolorbox}%
- \begin{beamercolorbox}[wd=.9\paperwidth,ht=\beamer@decolines@linebottom,dp=0pt]{linebottom}%
- \end{beamercolorbox}%
- }%
- % This seems to fix some alignment problems with the watermark. It has to be
- % always applied if you do not want to see the footer moving up and down when
- % moving from a page with watermark to a page without or vice versa.
- \vskip-.5px%
- % Watermark.
- % \if\beamer@decolines@watermark\@empty\else%
- % \vskip-\beamer@decolines@watermarkheightbottom%
- % \llap{\includegraphics[height=\beamer@decolines@watermarkheightbottom,clip=true,%
- % trim=0pt 0pt 0pt \beamer@decolines@watermarkheightupperorig]{\beamer@decolines@watermark}\hskip-\paperwidth}%
- % \fi%
- }
- \defbeamertemplate*{headline}{decolines theme}
- {
- \leavevmode%
- \hbox{%
- \begin{beamercolorbox}[wd=\paperwidth,ht=\headerheight,dp=0pt]{page header}%
- \end{beamercolorbox}%
- } %
- \vskip0pt%
- }
- \defbeamertemplate*{frametitle}{decolines theme}[1][left]
- {
- \ifbeamercolorempty[bg]{frametitle}{}{\nointerlineskip}%
- \@tempdima=\textwidth%
- \advance\@tempdima by\beamer@leftmargin%
- \advance\@tempdima by\beamer@rightmargin%
- \vbox{}\vskip-.5\beamer@leftmargin%
- \begin{beamercolorbox}[sep=\beamer@leftmargin,#1,wd=\the\@tempdima]{}
- \usebeamerfont{frametitle}\usebeamercolor[bg]{framesubtitle}%
- \vbox{}\vskip0ex%
- \if@tempswa\else\csname beamer@fte#1\endcsname\fi%
- \strut\insertframetitle\strut\par%
- {%
- \ifx\insertframesubtitle\@empty%
- \else%
- {\usebeamerfont{framesubtitle}\usebeamercolor[bg]{framesubtitle}\insertframesubtitle\strut\par}%
- \fi
- }%
- \vskip-1ex%
- \if@tempswa\else\vskip-\beamer@leftmargin\fi
- \end{beamercolorbox}%
- \def\beamer@decolines@truetext{true}%
- \ifx\beamer@decolines@titleline\beamer@decolines@truetext%
- \vskip-.5\beamer@leftmargin%
- \begin{beamercolorbox}[wd=\textwidth,ht=.1ex,dp=0ex]{linemid}%
- \end{beamercolorbox}%
- \fi
- }
- % Frame title continuations, default
- \defbeamertemplate*{frametitle continuation}{decolines theme}{(\insertcontinuationcount)}
- \defbeamertemplate*{sidebar right}{decolines theme}
- {
- \vfill%
- \llap{\begin{minipage}{100px}
- \if\beamer@decolines@watermark\@empty\else
- \hfill{\transparent{0.5}{\includegraphics[height=\beamer@decolines@watermarkheight]{\beamer@decolines@watermark}}\hskip7px}
- \fi
- \end{minipage}
- }%
- \vskip7px
- }
- \mode
- <all>
|