Alessio Caiazza is sharing code with you
Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.
Don't show this againruby-beamer / rubytheme.sty
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | \ProvidesPackage{beamerthemeruby}[2004/09/25 ver 1.00]
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
% Copyright 2003 by Till Tantau <tantau@cs.tu-berlin.de>.
%
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt.
\newcounter{pagecount}
\addtocounter{pagecount}{1}
\newcounter{bst@temp}
{\usecolortheme[rgb={0.7,0.2,0.2}]{structure}}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \section{A counter that contains the number of pages}
% \DescribeMacro{\bs@savelastpage}
% Write number of pages into aux file
% We need two runs for this to work
% \begin{MacroCode}
\newcommand{\bs@savelastpage}{%
\immediate\write\@auxout{%
\string\message{bstransp: Loading lastpage from aux file}%
\string\setcounter{pagecount}{\thepage}}}
% \end{MacroCode}
%
% At the end of the document start the save procedure
% and utter a message.
% \begin{MacroCode}
\AtEndDocument{%
\message{bstransp: Saving set lastpage into aux file}%
\bs@savelastpage}
% \end{MacroCode}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\mode<presentation>
\RequirePackage{fp} % FLoating point calc
\edef\midpoint{0.5}%
%\beamerboxesdeclarecolorscheme{title}{structure!75!black}{structure!75!black}
\usetitlepagetemplate{%
\vbox{}
\vfill
\begin{centering}
\begin{beamerboxesrounded}[shadow=false,scheme=title]{}
\begin{centering}\Large\color{black}\inserttitle\par%
%\begin{centering}\Large\color{white}\inserttitle\par%
\normalsize\ifx\insertsubtitle\@empty\else\vskip0.25em\insertsubtitle\par\fi
\hskip -\paperwidth
\vskip -\paperheight
\end{centering}
\end{beamerboxesrounded}
\vskip1em\par
\inserttitlegraphic
{\color{white}\smaller[2]\vskip-2em\insertinstitute}\par
\vskip1em\par
\normalsize\insertauthor\par
\end{centering}
\vfill
}
\useframetitletemplate{%
\nointerlineskip\vskip-2pt%{\tiny\vskip.35em}\vskip-2pt%
\hbox{\leavevmode%
\advance\beamer@leftmargin by -12bp%
\advance\beamer@rightmargin by -12bp%
\beamer@tempdim=\textwidth%
\advance\beamer@tempdim by \beamer@leftmargin%
\advance\beamer@tempdim by \beamer@rightmargin%
\hskip-\Gm@lmargin\hbox{%
\setbox\beamer@tempbox=\hbox{\begin{minipage}[b]{\paperwidth}%
\vbox{}%\vskip-0.9ex%
\leftskip0.3cm%
\rightskip0.3cm plus1fil\leavevmode
\Large\color{white}\hskip0.2em\insertframetitle%
\ifx\insertframesubtitle\@empty%
\strut\par%
\else%
\par{\footnotesize{\insertframesubtitle}\strut\par}%
\fi%
\nointerlineskip%
\vbox{}%
\end{minipage}}%
\color{structure!75!black}%
\beamer@tempdim=\ht\beamer@tempbox%
\advance\beamer@tempdim by 2pt%
\begin{pgfpicture}{0pt}{0pt}{\paperwidth}{\beamer@tempdim}
\pgfrect[clip]{\pgforigin}{\pgfpoint{\paperwidth}{\beamer@tempdim}}
\pgfbox[left,base]{\pgfuseshading{frametitleshade}}
\end{pgfpicture}
%\vrule width\paperwidth height \beamer@tempdim%
\hskip-\paperwidth%
\advance\beamer@tempdim by -2pt%
%{\hskip-2.2pt\raisebox{0.65pt}{\includegraphics[width=0.37cm]{images/ruby-pear-red}}\hskip 2.2pt}\hskip -0.37cm%
\box\beamer@tempbox%
}%
\hskip-\Gm@rmargin%
}%
\nointerlineskip%
\vskip-0.2pt%
\hbox to\textwidth{\hskip-\Gm@lmargin\pgfuseshading{topshade}\hskip-\Gm@rmargin}%
\vskip-2pt%
\vskip-1em%
}
\beamertemplatetriangleitem
\beamertemplatesolidbuttons
\usesectionheadtemplate{}{}
\usesubsectionheadtemplate{}{}
% Entries in table of contents
%\beamertemplatenumberedballsectiontoc
\pgfdeclareverticalshading{topshade}{\paperwidth}{%
color(0pt)=(bg);
color(4pt)=(black!50!bg)}
\pgfdeclarehorizontalshading{frametitleshade}{\paperheight}{%
color(0pt)=(structure);
color(\paperwidth)=(black)}
\newdimen\tempdimen
% Head
% Footline
\newlength{\footrest}
\newlength{\leftfoot}
\newlength{\rightfoot}
\newlength{\minleftfoot}
\newlength{\minrightfoot}
\newlength{\rubywidth}
\newlength{\mingradientfoot}
\setlength{\mingradientfoot}{0.4em}
\setlength{\rubywidth}{0.4cm}
\setlength{\minleftfoot}{2cm}
\setlength{\minrightfoot}{2cm}
\usefoottemplate{%
\setlength{\footrest}{\paperwidth}%
\addtolength{\footrest}{-\rubywidth}%
\addtolength{\footrest}{-\minleftfoot}%
\addtolength{\footrest}{-\minrightfoot}%
\addtolength{\footrest}{-2\mingradientfoot}%
\ifthenelse{\equal{\thepagecount}{1}}{}{%
\FPeval{\midpoint}{trunc(((thepage-1) / (thepagecount-2)):4)}%
}%
\setlength{\leftfoot}{0pt}%
\setlength{\rightfoot}{\footrest}%
\addtolength{\leftfoot}{\midpoint\footrest}%
\addtolength{\rightfoot}{-\leftfoot}%
\addtolength{\leftfoot}{\mingradientfoot}%
\addtolength{\rightfoot}{\mingradientfoot}%
\vbox{\tiny%
\hbox{%
\setbox\beamer@linebox=\hbox to\paperwidth{%
{\hskip 1em\tiny\color{white}\textbf{Alessio Caiazza}\hfill\textbf{Corso di Ruby}\hskip 1em}}%
\ht\beamer@linebox=2.625ex%
\dp\beamer@linebox=0pt%
\setbox\beamer@linebox=\vbox{\box\beamer@linebox\vskip1.125ex}%
\hskip-\Gm@lmargin%
\pgfdeclarehorizontalshading{leftfootshade}{\paperheight}{%
color(0pt)=(structure);%
color(\leftfoot)=(white)}%
\pgfdeclarehorizontalshading{rightfootshade}{\paperheight}{%
color(0pt)=(white);%
color(\rightfoot)=(structure)}%
\color{structure}\vrule width \minleftfoot height\ht\beamer@linebox%
\begin{pgfpicture}{0pt}{0pt}{\leftfoot}{\ht\beamer@linebox}%
\pgfrect[clip]{\pgforigin}{\pgfpoint{\leftfoot}{\ht\beamer@linebox}}%
\pgfbox[left,base]{\pgfuseshading{leftfootshade}}%
\end{pgfpicture}%
\includegraphics[width=\rubywidth]{images/ruby-pear}%
\begin{pgfpicture}{0pt}{0pt}{\rightfoot}{\ht\beamer@linebox}%
\pgfrect[clip]{\pgforigin}{\pgfpoint{\rightfoot}{\ht\beamer@linebox}}%
\pgfbox[left,base]{\pgfuseshading{rightfootshade}}%
\end{pgfpicture}%
\color{structure}\vrule width \minrightfoot height\ht\beamer@linebox%
\hskip-\paperwidth%
\hbox{\box\beamer@linebox\hfill}\hfill\hskip-\Gm@rmargin%
}%
}%
}
%\beamertemplateshadowblocks
%\renewcommand{\beamertemplatesetupshadings}{
% \beamerboxessetupshadows
% \beamerboxesdeclarecolorscheme{block}{structure!75!black}{black!8!white}
% \beamerboxesdeclarecolorscheme{alert}{alert!75!bg}{alert!8!white}
% \beamerboxesdeclarecolorscheme{example}{beamerexample!75!bg}{beamerexample!8!white}
%}
%\beamertemplateheadempty
%\beamertemplatenavigationsymbolsempty
\usebibliographyblocktemplate
{\color{structure}}
{\par\color{black}}
{\par\color{black}}
{\par\color{structure}}
\mode<all>
|