summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx')
-rw-r--r--macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx713
1 files changed, 413 insertions, 300 deletions
diff --git a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx
index 60344f6d4b..614cfb3854 100644
--- a/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx
+++ b/macros/latex/contrib/beamer-contrib/themes/beamertheme-trigon/source/beamerinnerthemetrigon.dtx
@@ -13,7 +13,7 @@
% \iffalse
%<*package>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{beamerinnerthemetrigon}[2021/09/06 v0.6.0 Trigon inner theme]
+\ProvidesPackage{beamerinnerthemetrigon}[2021/11/10 v0.6.2 Trigon inner theme]
%</package>
% \fi
% \CheckSum{0}
@@ -36,7 +36,6 @@
% \item footnotes and plain text.
% \end{itemize}
%
-%
% \subsubsection{Package dependencies}
%
% \begin{macrocode}
@@ -45,95 +44,93 @@
\usetikzlibrary{calc,3d}
% \end{macrocode}
%
-%
% \subsubsection{Definitions}
+%
% We define the command |\logobig| to specify the logo that needs to be applied
% displayed on the title frame.
% \begin{macrocode}
\def\logbig{}
\newcommand\biglogo[1]{
- \def\logbig{#1}
+ \def\logbig{#1}
}
% \end{macrocode}
%
-%
% \subsubsection{Options}
%
% \begin{macro}{sectionpage}
-% Controls whereas a slide with the section title should be inserted at the
-% beginning of the section or not.
+% Controls whereas a slide with the section title should be inserted at the
+% beginning of the section or not.
% \begin{macrocode}
\pgfkeys{
- /trigon/inner/sectionpage/.cd,
- .is choice,
- none/.code=\trigon@disablesectionpage,
- simple/.code=\trigon@enablesectionpage
+ /trigon/inner/sectionpage/.cd,
+ .is choice,
+ none/.code=\trigon@disablesectionpage,
+ simple/.code=\trigon@enablesectionpage
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{slidestyle}
-% Controls the layout that should be used for regular slides.
+% Controls the layout that should be used for regular slides.
% \begin{macrocode}
\def\slidestyle{}
\pgfkeys{
- /trigon/inner/slidestyle/.cd,
- .is choice,
- blank/.code=\def\slidestyle{blank}
- \setbeamertemplate{background}[\slidestyle],
- style1/.code=\def\slidestyle{smallcornertriangle}
- \setbeamertemplate{background}[\slidestyle],
- cyber/.code=\def\slidestyle{cyberbottom}
- \setbeamertemplate{background}[\slidestyle]
+ /trigon/inner/slidestyle/.cd,
+ .is choice,
+ blank/.code=\def\slidestyle{blank}
+ \setbeamertemplate{background}[\slidestyle],
+ style1/.code=\def\slidestyle{smallcornertriangle}
+ \setbeamertemplate{background}[\slidestyle],
+ cyber/.code=\def\slidestyle{cyberbottom}
+ \setbeamertemplate{background}[\slidestyle]
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titlestyle}
-% Controls the layout that should be used for the title page.
+% Controls the layout that should be used for the title page.
% \begin{macrocode}
\def\titlestyle{}
\pgfkeys{
- /trigon/inner/titlestyle/.cd,
- .is choice,
- plain/.code=\def\titlestyle{bottomtrianglescolor},
- style1/.code=\def\titlestyle{titlesmallimage},
- style2/.code=\def\titlestyle{titlebigimage}
+ /trigon/inner/titlestyle/.cd,
+ .is choice,
+ plain/.code=\def\titlestyle{bottomtrianglescolor},
+ style1/.code=\def\titlestyle{titlesmallimage},
+ style2/.code=\def\titlestyle{titlebigimage}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{sectionstyle}
-% Controls the layout that should be used for the title page.
+% Controls the layout that should be used for the title page.
% \begin{macrocode}
\def\sectionstyle{}
\pgfkeys{
- /trigon/inner/sectionstyle/.cd,
- .is choice,
- plain/.code=\def\sectionstyle{bottomtrianglescolor},
- style1/.code=\def\sectionstyle{bigtriangles},
- style2/.code=\def\sectionstyle{lefttriangles},
- style3/.code=\def\sectionstyle{bottomtrianglesbw}
+ /trigon/inner/sectionstyle/.cd,
+ .is choice,
+ plain/.code=\def\sectionstyle{bottomtrianglescolor},
+ style1/.code=\def\sectionstyle{bigtriangles},
+ style2/.code=\def\sectionstyle{lefttriangles},
+ style3/.code=\def\sectionstyle{bottomtrianglesbw}
}
% \end{macrocode}
% \end{macro}
%
%
% \begin{macro}{\trigon@inner@setdefaults}
-% Sets default values for the inner theme options.
+% Sets default values for the inner theme options.
% \begin{macrocode}
\newcommand{\trigon@inner@setdefaults}{
- \pgfkeys{/trigon/inner/.cd,
- sectionpage=simple,
- slidestyle=blank,
- titlestyle=style2,
- sectionstyle=plain
- }
+ \pgfkeys{/trigon/inner/.cd,
+ sectionpage=simple,
+ slidestyle=blank,
+ titlestyle=style2,
+ sectionstyle=plain
+ }
}
% \end{macrocode}
% \end{macro}
%
-%
% \subsubsection{Backgrounds}
%
% First of all, we define a few commands in order easily create the triangles
@@ -142,67 +139,67 @@
% fits the different aspect ratio possible.
%
% \begin{macro}{\leftTriangle}
-% Defines a triangle with the base on the left side (pointing right).
+% Defines a triangle with the base on the left side (pointing right).
% \begin{macrocode}
\newcommand{\leftTriangle}[2]{
- (#1,#2)
- -- (0,{#2 + tan(30)*#1} )
- -- (0,{#2 - tan(30)*#1} )
- -- cycle;
+ (#1,#2)
+ -- (0,{#2 + tan(30)*#1} )
+ -- (0,{#2 - tan(30)*#1} )
+ -- cycle;
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\righTriangle}
-% Defines a triangle with the base on the right side (pointing left).
+% Defines a triangle with the base on the right side (pointing left).
% \begin{macrocode}
\newcommand{\rightTriangle}[2]{
- (#1,#2)
- -- (\the\paperwidth,{#2 + tan(30)*(\the\paperwidth-#1)} )
- -- (\the\paperwidth,{#2 - tan(30)*(\the\paperwidth-#1)} )
- -- cycle;
+ (#1,#2)
+ -- (\the\paperwidth,{#2 + tan(30)*(\the\paperwidth-#1)} )
+ -- (\the\paperwidth,{#2 - tan(30)*(\the\paperwidth-#1)} )
+ -- cycle;
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\topTriangle}
-% Defines a triangle with the base on the bottom side (pointing top).
+% Defines a triangle with the base on the bottom side (pointing top).
% \begin{macrocode}
\newcommand{\topTriangle}[2]{
- (#1,#2)
- -- ({#1 - tan(60)*#2},0)
- -- ({#1 + tan(60)*#2},0)
- -- cycle;
+ (#1,#2)
+ -- ({#1 - tan(60)*#2},0)
+ -- ({#1 + tan(60)*#2},0)
+ -- cycle;
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\leftColorTriangle}
-% Defines a colored triangle with the base on the left side (pointing right).
+% Defines a colored triangle with the base on the left side (pointing right).
% \begin{macrocode}
\newcommand{\leftColorTriangle}[3]{
- \path[fill=#3]
- \leftTriangle{#1}{#2}
+ \path[fill=#3]
+ \leftTriangle{#1}{#2}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\righColorTriangle}
-% Defines a colored triangle with the base on the right side (pointing left).
+% Defines a colored triangle with the base on the right side (pointing left).
% \begin{macrocode}
\newcommand{\rightColorTriangle}[3]{
- \path[fill=#3]
- \rightTriangle{#1}{#2}
+ \path[fill=#3]
+ \rightTriangle{#1}{#2}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\topColorTriangle}
-% Defines a colored triangle with the base on the bottom side (pointing top).
+% Defines a colored triangle with the base on the bottom side (pointing top).
% \begin{macrocode}
\newcommand{\topColorTriangle}[3]{
- \path[fill=#3]
- \topTriangle{#1}{#2}
+ \path[fill=#3]
+ \topTriangle{#1}{#2}
}
% \end{macrocode}
% \end{macro}
@@ -211,166 +208,165 @@
% We then define the different backgrounds choices.
%
% \begin{macro}{blank}
-% Blank slide background.
+% Blank slide background.
% \begin{macrocode}
\defbeamertemplate{background}{blank}{}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{smallcornertriangle}
-% Background with a small triangle in bottom left corner (used for normal
-% frames when the appropriate option is selected).
+% Background with a small triangle in bottom left corner (used for normal
+% frames when the appropriate option is selected).
% \begin{macrocode}
\defbeamertemplate{background}{smallcornertriangle}{
- \begin{tikzpicture}[blend group=multiply]
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \leftColorTriangle{0.62\paperwidth}{0}{tGrey!30!tBg}
- \end{tikzpicture}
+ \begin{tikzpicture}[blend group=multiply]
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \leftColorTriangle{0.62\paperwidth}{0}{tGrey!30!tBg}
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{cyberbottom}
-% Background with "mesh" effect on the bottom left corner (used for normal
-% frames when the appropriate option is selected).
+% Background with "mesh" effect on the bottom left corner (used for normal
+% frames when the appropriate option is selected).
% \begin{macrocode}
\defbeamertemplate{background}{cyberbottom}{
-\tikzstyle{cyberVertex}=[scale=1,draw=tGreyBg,circle,fill=tBg]
-\tikzstyle{cyberVertex2}=[scale=0.5,draw=tGreyBg,circle,fill=tGreyBg]
-\tikzstyle{cyberEdge} = [draw,color=tGreyBg]
-\begin{tikzpicture}%[blend group=multiply]
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \foreach \pos/\name in {
- {(-0.05\paperwidth,0.75\paperheight)/0},
- {(0.02\paperwidth,0.53\paperheight)/1},
- {(-0.04\paperwidth,0.38\paperheight)/2},
- {(0.08\paperwidth,0.40\paperheight)/3},
- {(0.052\paperwidth,0.21\paperheight)/5},
- {(0.24\paperwidth,0.26\paperheight)/6},
- {(-0.08\paperwidth,-0.06\paperheight)/7},
- {(0.12\paperwidth,0.07\paperheight)/8},
- {(0.2\paperwidth,0.-0.08\paperheight)/9},
- {(0.38\paperwidth,0.06\paperheight)/10},
- {(0.56\paperwidth,-0.08\paperheight)/11}}
- \node[cyberVertex] (\name) at \pos {};
- \foreach \pos/\name in {
- {(-0.05\paperwidth,0.75\paperheight)/0},
- {(0.02\paperwidth,0.53\paperheight)/1},
- {(-0.04\paperwidth,0.38\paperheight)/2},
- {(0.08\paperwidth,0.40\paperheight)/3},
- {(0.052\paperwidth,0.21\paperheight)/5},
- {(0.24\paperwidth,0.26\paperheight)/6},
- {(-0.08\paperwidth,-0.06\paperheight)/7},
- {(0.12\paperwidth,0.07\paperheight)/8},
- {(0.2\paperwidth,0.-0.08\paperheight)/9},
- {(0.38\paperwidth,0.06\paperheight)/10},
- {(0.56\paperwidth,-0.08\paperheight)/11}}
- \node[cyberVertex2] (\name_2) at \pos {};
- \foreach \source/ \dest in
- {0/1,1/2,1/3,2/3,2/5,3/5,3/6,5/6,5/7,7/8,5/8,8/6,8/9,6/9,9/10,10/6,10/11}
- \path[cyberEdge] (\source) -- (\dest);
-\end{tikzpicture}
+ \tikzstyle{cyberVertex}=[scale=1,draw=tGreyBg,circle,fill=tBg]
+ \tikzstyle{cyberVertex2}=[scale=0.5,draw=tGreyBg,circle,fill=tGreyBg]
+ \tikzstyle{cyberEdge} = [draw,color=tGreyBg]
+ \begin{tikzpicture}%[blend group=multiply]
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \foreach \pos/\name in {
+ {(-0.05\paperwidth,0.75\paperheight)/0},
+ {(0.02\paperwidth,0.53\paperheight)/1},
+ {(-0.04\paperwidth,0.38\paperheight)/2},
+ {(0.08\paperwidth,0.40\paperheight)/3},
+ {(0.052\paperwidth,0.21\paperheight)/5},
+ {(0.24\paperwidth,0.26\paperheight)/6},
+ {(-0.08\paperwidth,-0.06\paperheight)/7},
+ {(0.12\paperwidth,0.07\paperheight)/8},
+ {(0.2\paperwidth,0.-0.08\paperheight)/9},
+ {(0.38\paperwidth,0.06\paperheight)/10},
+ {(0.56\paperwidth,-0.08\paperheight)/11}}
+ \node[cyberVertex] (\name) at \pos {};
+ \foreach \pos/\name in {
+ {(-0.05\paperwidth,0.75\paperheight)/0},
+ {(0.02\paperwidth,0.53\paperheight)/1},
+ {(-0.04\paperwidth,0.38\paperheight)/2},
+ {(0.08\paperwidth,0.40\paperheight)/3},
+ {(0.052\paperwidth,0.21\paperheight)/5},
+ {(0.24\paperwidth,0.26\paperheight)/6},
+ {(-0.08\paperwidth,-0.06\paperheight)/7},
+ {(0.12\paperwidth,0.07\paperheight)/8},
+ {(0.2\paperwidth,0.-0.08\paperheight)/9},
+ {(0.38\paperwidth,0.06\paperheight)/10},
+ {(0.56\paperwidth,-0.08\paperheight)/11}}
+ \node[cyberVertex2] (\name_2) at \pos {};
+ \foreach \source/ \dest in
+ {0/1,1/2,1/3,2/3,2/5,3/5,3/6,5/6,5/7,7/8,5/8,8/6,8/9,6/9,9/10,10/6,10/11}
+ \path[cyberEdge] (\source) -- (\dest);
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titlebigimage}
-% Background for title page with a big image in the top left corener.
+% Background for title page with a big image in the top left corener.
% \begin{macrocode}
\defbeamertemplate{background}{titlebigimage}{
- \begin{tikzpicture}
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \begin{scope}[blend group=multiply]
- \path[fill=tTheme]\leftTriangle{0.5\paperwidth}{0};
- \topColorTriangle{0.73\paperwidth}{0.70\paperheight}{tGrey!30!tBg};
- \ifx\inserttitlegraphic\@empty
- \leftColorTriangle{0.73\paperwidth}{0.70\paperheight}{tTheme}
- \else
- \path[clip]\leftTriangle{0.73\paperwidth}{0.70\paperheight};
- \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,\the\paperheight) {\inserttitlegraphic};
- \fi
- \end{scope}
- \path[fill=tBg]\rightTriangle{0.45\paperwidth}{\the\paperheight};
- \ifx\logbig\@empty \else
- \node[anchor=north east,inner sep=0mm] at
- (.96*\the\paperwidth,.96*\the\paperheight) {\includegraphics[width=0.28\textwidth]{\logbig}};
- \fi
- \end{tikzpicture}
+ \begin{tikzpicture}
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \begin{scope}[blend group=multiply]
+ \path[fill=tTheme]\leftTriangle{0.5\paperwidth}{0};
+ \topColorTriangle{0.73\paperwidth}{0.70\paperheight}{tGrey!30!tBg};
+ \ifx\inserttitlegraphic\@empty
+ \leftColorTriangle{0.73\paperwidth}{0.70\paperheight}{tTheme}
+ \else
+ \path[clip]\leftTriangle{0.73\paperwidth}{0.70\paperheight};
+ \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,\the\paperheight) {\inserttitlegraphic};
+ \fi
+ \end{scope}
+ \path[fill=tBg]\rightTriangle{0.45\paperwidth}{\the\paperheight};
+ \ifx\logbig\@empty \else
+ \node[anchor=north east,inner sep=0mm] at
+ (.96*\the\paperwidth,.96*\the\paperheight) {\includegraphics[width=0.28\textwidth]{\logbig}};
+ \fi
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titlesmallimage}
-% Background for the titlepage with a small image in the top left corner.
+% Background for the titlepage with a small image in the top left corner.
% \begin{macrocode}
\defbeamertemplate{background}{titlesmallimage}{
- \begin{tikzpicture}[blend group=multiply]
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \leftColorTriangle{0.58\paperwidth}{0}{tGrey!30!tBg}
- \ifx\logbig\@empty \else
- \node[anchor=north east,inner sep=0mm] at (.94*\the\paperwidth,.94*\the\paperheight) {\includegraphics[width=0.33\textwidth]{\logbig}};
- \fi
- \ifx\inserttitlegraphic\@empty
- \leftColorTriangle{0.58\paperwidth}{\the\paperheight}{tTheme}
- \else
- \path[clip]\leftTriangle{0.58\paperwidth}{\the\paperheight};
- \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,\the\paperheight) {\inserttitlegraphic};
- \fi
- \end{tikzpicture}
+ \begin{tikzpicture}[blend group=multiply]
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \leftColorTriangle{0.58\paperwidth}{0}{tGrey!30!tBg}
+ \ifx\logbig\@empty \else
+ \node[anchor=north east,inner sep=0mm] at (.94*\the\paperwidth,.94*\the\paperheight) {\includegraphics[width=0.33\textwidth]{\logbig}};
+ \fi
+ \ifx\inserttitlegraphic\@empty
+ \leftColorTriangle{0.58\paperwidth}{\the\paperheight}{tTheme}
+ \else
+ \path[clip]\leftTriangle{0.58\paperwidth}{\the\paperheight};
+ \node[anchor=north west, inner sep=0pt, outer sep=0pt] at (0,\the\paperheight) {\inserttitlegraphic};
+ \fi
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{bottomtrianglescolor}
-% Background for title/section pages with two colored triangles in the
-% bottom.
+% Background for title/section pages with two colored triangles in the bottom.
% \begin{macrocode}
\defbeamertemplate{background}{bottomtrianglescolor}{
- \begin{tikzpicture}[blend group=multiply]
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \leftColorTriangle{0.62\paperwidth}{0}{tTheme}
- \rightColorTriangle{0.38\paperwidth}{0}{tSec}
- \end{tikzpicture}
+ \begin{tikzpicture}[blend group=multiply]
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \leftColorTriangle{0.62\paperwidth}{0}{tTheme}
+ \rightColorTriangle{0.38\paperwidth}{0}{tSec}
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{bottomtrianglesbw}
-% Background for title/section pages with two black and white triangles in
-% the bottom.
+% Background for title/section pages with two black and white triangles in the
+% bottom.
% \begin{macrocode}
\defbeamertemplate{background}{bottomtrianglesbw}{
- \begin{tikzpicture}[blend group=multiply]
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \leftColorTriangle{0.62\paperwidth}{0}{tTheme}
- \rightColorTriangle{0.38\paperwidth}{0}{tGrey!30!tBg}
- \end{tikzpicture}
+ \begin{tikzpicture}[blend group=multiply]
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \leftColorTriangle{0.62\paperwidth}{0}{tTheme}
+ \rightColorTriangle{0.38\paperwidth}{0}{tGrey!30!tBg}
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{bigtriangles}
-% Background for section pages with a big triangle on the left.
+% Background for section pages with a big triangle on the left.
% \begin{macrocode}
\defbeamertemplate{background}{bigtriangles}{
- \begin{tikzpicture}[blend group=multiply]
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \leftColorTriangle{0.80\paperwidth}{0.62\paperheight}{tTheme}
- \rightColorTriangle{0.68\paperwidth}{0.58\paperheight}{tGrey!30!tBg}
- \end{tikzpicture}
+ \begin{tikzpicture}[blend group=multiply]
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \leftColorTriangle{0.80\paperwidth}{0.62\paperheight}{tTheme}
+ \rightColorTriangle{0.68\paperwidth}{0.58\paperheight}{tGrey!30!tBg}
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{lefttriangles}
-% Background for section pages with small triangles on the left.
+% Background for section pages with small triangles on the left.
% \begin{macrocode}
\defbeamertemplate{background}{lefttriangles}{
- \begin{tikzpicture}[blend group=multiply]
- \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
- \leftColorTriangle{0.52\paperwidth}{\the\paperheight}{tTheme}
- \leftColorTriangle{0.775\paperwidth}{0}{tGrey!30!tBg}
- \end{tikzpicture}
+ \begin{tikzpicture}[blend group=multiply]
+ \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
+ \leftColorTriangle{0.52\paperwidth}{\the\paperheight}{tTheme}
+ \leftColorTriangle{0.775\paperwidth}{0}{tGrey!30!tBg}
+ \end{tikzpicture}
}
% \end{macrocode}
% \end{macro}
@@ -385,35 +381,35 @@
% background afterwards.
%
% \begin{macro}{\titleframe}
-% Sets the titleframe.
+% Sets the titleframe.
% \begin{macrocode}
\newcommand{\titleframe}{
- \setbeamertemplate{title page}[\titlestyle]
- \setbeamertemplate{background}[\titlestyle]
- \frame[plain,noframenumbering]{\titlepage}
- \setbeamertemplate{background}[\slidestyle]
+ \setbeamertemplate{title page}[\titlestyle]
+ \setbeamertemplate{background}[\titlestyle]
+ \frame[plain,noframenumbering]{\titlepage}
+ \setbeamertemplate{background}[\slidestyle]
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\sectionframe}
-% Sets the titleframe.
+% Sets the titleframe.
% \begin{macrocode}
\newcommand{\sectionframe}{
- \setbeamertemplate{section page}[\sectionstyle]
- \setbeamertemplate{background}[\sectionstyle]
- \frame[plain,noframenumbering]{\sectionpage}
- \setbeamertemplate{background}[\slidestyle]
+ \setbeamertemplate{section page}[\sectionstyle]
+ \setbeamertemplate{background}[\sectionstyle]
+ \frame[plain,noframenumbering]{\sectionpage}
+ \setbeamertemplate{background}[\slidestyle]
}
\newcommand{\trigon@disablesectionpage}{
- \AtBeginSection{
- % intentionally empty
- }
+ \AtBeginSection{
+ % intentionally empty
+ }
}
\newcommand{\trigon@enablesectionpage}{
- \AtBeginSection{
- \sectionframe
- }
+ \AtBeginSection{
+ \sectionframe
+ }
}
% \end{macrocode}
% \end{macro}
@@ -424,177 +420,285 @@
% frame, so the fit nicely with the different background selected.
%
% \begin{macro}{titlebigimage}
-% Place the text on the title frame with a big image on the top left side.
+% Place the text on the title frame with a big image on the top left side.
% \begin{macrocode}
\defbeamertemplate{title page}{titlebigimage}
{
- \vskip140pt
- \begin{flushright}
- \begin{minipage}[t][][c]{0.5\textwidth}%
- \centering
- \usebeamerfont{title}\usebeamercolor[fg]{title}
- \inserttitle\par
- \end{minipage}
- \ifx \insertsubtitle\@empty
- \else
- \vskip15pt
- \begin{minipage}[t][][c]{0.5\textwidth}%
- \centering
- \usebeamerfont{subtitle}\insertsubtitle\par%
- \end{minipage}
- \fi
- \vskip15pt
- \begin{minipage}[t][][c]{0.5\textwidth}%
- \centering
- \usebeamerfont{author}\insertauthor%
- \vskip10pt
- \usebeamerfont{date}\insertdate%
- \end{minipage}
- \end{flushright}
- \vfill
+ \vskip135pt
+ \begin{flushright}
+ \begin{minipage}[t][][c]{0.5\textwidth}%
+ \centering
+ \usebeamerfont{title}\usebeamercolor[fg]{title}
+ \inserttitle\par
+ \end{minipage}
+ \ifx \insertsubtitle\@empty
+ \else
+ \vskip15pt
+ \begin{minipage}[t][][c]{0.5\textwidth}%
+ \centering
+ \usebeamerfont{subtitle}\insertsubtitle\par%
+ \end{minipage}
+ \fi
+ \vskip13pt
+ \begin{minipage}[t][][c]{0.5\textwidth}%
+ \centering
+ \usebeamerfont{author}\insertauthor%
+ \vskip5pt
+ \usebeamerfont{date}\insertdate%
+ \end{minipage}
+\end{flushright}
+\vfill
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titlesmallimage}
-% Place the text on the title frame with a small image on the top left side.
+% Place the text on the title frame with a small image on the top left side.
% \begin{macrocode}
\defbeamertemplate{title page}{titlesmallimage}
{
- \vskip140pt%
- \begin{beamercolorbox}[wd=\textwidth,sep=4pt]{title page header}
- \usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par%
- \end{beamercolorbox}%
- \ifx \insertsubtitle\@empty
- \else
- \vskip8pt
- \begin{beamercolorbox}[wd=\textwidth,sep=4pt]{subtitle page header}
- \usebeamerfont{subtitle}\insertsubtitle\par%
- \end{beamercolorbox}%
- \fi
- \vskip10pt
- \begin{beamercolorbox}[wd=\textwidth,sep=4pt]{author}
- \usebeamerfont{author}\insertauthor%
- \end{beamercolorbox}
- \vskip2pt%
- \begin{beamercolorbox}[wd=\textwidth,sep=4pt]{date}
- \usebeamerfont{date}\insertdate%
- \end{beamercolorbox}
- \vfill
+ \vskip140pt%
+ \begin{beamercolorbox}[wd=\textwidth,sep=4pt]{title page header}
+ \usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par%
+ \end{beamercolorbox}%
+ \ifx \insertsubtitle\@empty
+\else
+ \vskip8pt
+ \begin{beamercolorbox}[wd=\textwidth,sep=4pt]{subtitle page header}
+ \usebeamerfont{subtitle}\insertsubtitle\par%
+ \end{beamercolorbox}%
+\fi
+\vskip10pt
+\begin{beamercolorbox}[wd=\textwidth,sep=4pt]{author}
+ \usebeamerfont{author}\insertauthor%
+\end{beamercolorbox}
+\vskip2pt%
+\begin{beamercolorbox}[wd=\textwidth,sep=4pt]{date}
+ \usebeamerfont{date}\insertdate%
+\end{beamercolorbox}
+\vfill
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{bottomtrianglescolor}
-% Place the text on the title frame with two triangles on the bottom.
+% Place the text on the title frame with two triangles on the bottom.
% \begin{macrocode}
\defbeamertemplate{title page}{bottomtrianglescolor}
{
- \vskip0pt
- \begin{center}
- \begin{minipage}[t][][t]{\textwidth}
- \centering%
- \ifx\logbig\@empty \else
- \includegraphics[height=0.15\textheight]{\logbig}
- \fi
- \end{minipage}
- \vskip15pt
- \begin{minipage}[t][][c]{\textwidth}%
- \centering
- \usebeamerfont{title}\usebeamercolor[fg]{title}
- \inserttitle\par
- \end{minipage}
- \ifx \insertsubtitle\@empty
- \else
- \vskip15pt
- \begin{minipage}[t][][c]{\textwidth}%
- \centering
- \usebeamerfont{subtitle}\insertsubtitle\par%
- \end{minipage}
- \fi
- \vskip20pt
- \begin{minipage}[t][][c]{0.5\textwidth}%
- \centering
- \usebeamerfont{author}\insertauthor\\[0.3cm]%
- \usebeamerfont{date}\insertdate
- \end{minipage}
- \end{center}
- \vfill
+ \vskip0pt
+ \begin{center}
+ \begin{minipage}[t][][t]{\textwidth}
+ \centering%
+ \ifx\logbig\@empty \else
+ \includegraphics[height=0.15\textheight]{\logbig}
+ \fi
+ \end{minipage}
+ \vskip15pt
+ \begin{minipage}[t][][c]{\textwidth}%
+ \centering
+ \usebeamerfont{title}\usebeamercolor[fg]{title}
+ \inserttitle\par
+ \end{minipage}
+ \ifx \insertsubtitle\@empty
+ \else
+ \vskip15pt
+ \begin{minipage}[t][][c]{\textwidth}%
+ \centering
+ \usebeamerfont{subtitle}\insertsubtitle\par%
+ \end{minipage}
+ \fi
+ \vskip20pt
+ \begin{minipage}[t][][c]{0.5\textwidth}%
+ \centering
+ \usebeamerfont{author}\insertauthor\\[0.3cm]%
+ \usebeamerfont{date}\insertdate
+ \end{minipage}
+\end{center}
+\vfill
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{bottomtrianglescolor}
-% Place the text on the section frame with two colored triangles on the
-% bottom.
+% Place the text on the section frame with two colored triangles on the
+% bottom.
% \begin{macrocode}
\defbeamertemplate{section page}{bottomtrianglescolor}
{
- \vskip40pt
- \begin{center}
- \begin{minipage}[t][][c]{\textwidth}%
- \centering
- \usebeamerfont{section title}\usebeamercolor[fg]{title}
- \insertsectionhead\par
- \end{minipage}
- \end{center}
- \vfill
+ \vskip40pt
+ \begin{center}
+ \begin{minipage}[t][][c]{\textwidth}%
+ \centering
+ \usebeamerfont{section title}\usebeamercolor[fg]{title}
+ \insertsectionhead\par
+ \end{minipage}
+ \end{center}
+ \vfill
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{bottomtrianglesbw}
-% Place the text on the section frame with two black and white triangles on
-% the bottom.
+% Place the text on the section frame with two black and white triangles on
+% the bottom.
% \begin{macrocode}
\defbeamertemplate{section page}{bottomtrianglesbw}
{
- \vskip40pt
- \begin{center}
- \begin{minipage}[t][][c]{\textwidth}%
- \centering
- \usebeamerfont{section title}\usebeamercolor[fg]{title}
- \insertsectionhead\par
- \end{minipage}
- \end{center}
- \vfill
+ \vskip40pt
+ \begin{center}
+ \begin{minipage}[t][][c]{\textwidth}%
+ \centering
+ \usebeamerfont{section title}\usebeamercolor[fg]{title}
+ \insertsectionhead\par
+ \end{minipage}
+ \end{center}
+ \vfill
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{bigtriangles}
-% Place the text on the section frame with two big triangles.
+% Place the text on the section frame with two big triangles.
% \begin{macrocode}
\defbeamertemplate{section page}{bigtriangles}
{
- \vskip200pt
- \begin{flushright}
- \begin{minipage}[t]{0.62\textwidth}%7
- \usebeamerfont{section title}\usebeamercolor[fg]{title}
- \raggedleft
- \insertsectionhead\par
- \end{minipage}
- \end{flushright}
- \vfill
+ \vskip200pt
+ \begin{flushright}
+ \begin{minipage}[t]{0.62\textwidth}%7
+ \usebeamerfont{section title}\usebeamercolor[fg]{title}
+ \raggedleft
+ \insertsectionhead\par
+ \end{minipage}
+ \end{flushright}
+ \vfill
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{lefttriangles}
-% Place the text on the section frame with two small left triangles.
+% Place the text on the section frame with two small left triangles.
% \begin{macrocode}
\defbeamertemplate{section page}{lefttriangles}
{
- \vskip25pt
- \begin{beamercolorbox}[wd=\textwidth,leftskip=100pt,sep=4pt]{section page header}
- \usebeamerfont{section title}\usebeamercolor[fg]{title}
- \insertsectionhead\par
- \end{beamercolorbox}%
- \vfill
+ \vskip25pt
+ \begin{beamercolorbox}[wd=\textwidth,leftskip=100pt,sep=4pt]{section page header}
+ \usebeamerfont{section title}\usebeamercolor[fg]{title}
+ \insertsectionhead\par
+ \end{beamercolorbox}%
+ \vfill
}
% \end{macrocode}
% \end{macro}
%
+% \subsubsection{Block environments}
+%
+% \begin{macro}{block}
+% \begin{macro}{block alerted}
+% \begin{macro}{block example}
+%
+% The three different block environments differ only in their colours.
+% Rather than repeat the essentially the same template three times, we use
+% the auxiliary macro |\trigon@block| to define all three templates.
+%
+% \begin{macrocode}
+\newlength{\trigon@blocksep}
+\newlength{\trigon@blockadjust}
+\setlength{\trigon@blocksep}{0.75ex}
+\setlength{\trigon@blockadjust}{0.25ex}
+\providecommand{\trigon@strut}{%
+ \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}%
+}
+\newcommand{\trigon@block}[1]{
+ \par\vskip\medskipamount%
+ \setlength{\parskip}{0pt}
+% \end{macrocode}
+%
+% If a background color is defined for the block title or body, we need to
+% add a little bit of padding to the corresponding box. Ideally, this would
+% be accomplished by setting |colsep=0.75ex|, which is intended to add
+% ``color separation space'' only when the box has a colored background.
+% Unfortunately, |colsep| also adds this separation if the background color
+% is inherited, even if the inherited color is actually empty.
+% (The technical reason for this boils down to the fact that the |\ifx|
+% directive does not expand macros.)
+%
+% To achieve the correct spacing for |alertblock|s and |exampleblock|s
+% as well as for normal blocks, we have to begin the |beamercolorbox|
+% differently based on whether |block title| has an empty background.
+%
+% If the |block title| background is empty, or the user has explicitly
+% removed the background from (e.g.) |block title alerted|, we just need to
+% set a rightskip for a nice ragged-right block title.
+%
+% \begin{macrocode}
+ \ifbeamercolorempty[bg]{block title#1}{%
+ \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{%
+ \ifbeamercolorempty[bg]{block title}{%
+ \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}%
+ }%
+% \end{macrocode}
+%
+% Otherwise, if the |block title| has a background, we set the padding based
+% on |\trigon@blockskip|. However, we have to visually compensate for
+% the |\trigon@strut| added to the block title (see below) by
+% subtracting |\trigon@blockadjust| from the top and bottom padding.
+%
+% \begin{macrocode}
+ {%
+ \begin{beamercolorbox}[
+ sep=\dimexpr\trigon@blocksep-\trigon@blockadjust\relax,
+ leftskip=\trigon@blockadjust,
+ rightskip=\dimexpr\trigon@blockadjust plus 4em\relax
+ ]{block title#1}%
+ }}%
+% \end{macrocode}
+%
+% We can now set the contents of the |block title|. The zero-width but
+% positive-height box |\trigon@strut| ensures that the block title box
+% has a consistent height, even if it lacks punctuation, ascenders, or
+% descenders.
+%
+% \begin{macrocode}
+ \usebeamerfont*{block title#1}%
+ \trigon@strut%
+ \insertblocktitle%
+ \trigon@strut%
+ \end{beamercolorbox}%
+% \end{macrocode}
+%
+% Next, we typeset the |block body|. This the code is similar to, but simpler
+% than, the |block title| code since we don't need to adjust for any struts.
+%
+% \begin{macrocode}
+ \nointerlineskip%
+ \ifbeamercolorempty[bg]{block body#1}{%
+ \begin{beamercolorbox}[vmode]{block body#1}}{
+ \ifbeamercolorempty[bg]{block body}{%
+ \begin{beamercolorbox}[vmode]{block body#1}%
+ }{%
+ \begin{beamercolorbox}[sep=\trigon@blocksep, vmode]{block body#1}%
+ \vspace{-\trigon@parskip}
+ }}%
+ \usebeamerfont{block body#1}%
+ \setlength{\parskip}{\trigon@parskip}%
+}
+% \end{macrocode}
+%
+% This concludes the auxiliary macro |\trigon@block|. Finally,
+% we define the block beamer templates using this macro.
+%
+% \begin{macrocode}
+\setbeamertemplate{block begin}{\trigon@block{}}
+\setbeamertemplate{block alerted begin}{\trigon@block{ alerted}}
+\setbeamertemplate{block example begin}{\trigon@block{ example}}
+\setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}}
+\setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}}
+\setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}}
+% \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
%
% \subsubsection{Lists and floats}
%
@@ -603,8 +707,17 @@
\setbeamertemplate{caption}[numbered]
% \end{macrocode}
%
+% \subsubsection{Text and spacing settings}
+%
+% \begin{macrocode}
+\newlength{\trigon@parskip}
+\setlength{\trigon@parskip}{0.5em}
+\setlength{\parskip}{\trigon@parskip}
+\linespread{1.15}
+% \end{macrocode}
%
% \subsubsection{Margins}
+%
% The margins are defined as
% \begin{macrocode}
\setbeamersize{text margin left=.05\paperwidth, text margin right=.05\paperwidth}