-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbeamerinnerthemerli.sty
96 lines (76 loc) · 4.6 KB
/
beamerinnerthemerli.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
\mode<presentation>
\usetikzlibrary{calc}
% Itemize environment
\setbeamertemplate{itemize item}{\color{rliblue}$\blacktriangleright$}
\setbeamertemplate{itemize subitem}{\color{rliblue}$\blacktriangleright$}
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
% Title page background image and clipping
\setbeamertemplate{background}{
\begin{tikzpicture}
\useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight);
\node[anchor=south east,inner sep=0] (picture) at (\the\paperwidth,0) {\includegraphics[width=0.7\paperwidth]{img/createria-ZYu6P9-Glic-unsplash_resized.jpg}};
% coordinates
\def \halfWidthBar{4pt};
\def \blockWidth{90pt};
\coordinate (paperTL) at (0,\paperheight);
\coordinate (paperTR) at (\paperwidth,\paperheight);
\coordinate (paperBL) at (0,0);
\coordinate (paperBR) at (\paperwidth,0);
% White triangle (1)
\coordinate (w1bL) at (0.299\paperwidth,0);
\coordinate (w1tL) at (0.299\paperwidth,\paperheight);
\coordinate (w1tR) at (0.299\paperwidth+\paperheight,\paperheight);
% Crossing point
\coordinate (midCross) at ($(w1bL)!0.55!(w1tR)$);
% Box in "rliblue"
\coordinate (brS) at ($ (midCross) + (-\halfWidthBar,\halfWidthBar) $);
\coordinate (brW) at ($(brS)!\blockWidth+2*\halfWidthBar!90:(w1tR)$);
\coordinate (helpPoint1) at ($(brW)!5\blockWidth!90:(brS)$);
\coordinate (brN) at (intersection of brW--helpPoint1 and paperTL--paperTR);
\coordinate (brE) at ($ (w1tR) + ({-2*\halfWidthBar},0) $);
% White bar (2)
\coordinate (helpPoint2) at ($(midCross)!5\blockWidth!-90:(w1tR)$);
\coordinate (helpPoint3) at ($(midCross)!5\blockWidth!90:(w1tR)$);
\coordinate (w2tR) at (intersection of midCross--helpPoint3 and paperTL--paperTR);
% Upper picture part
\coordinate (picUpN) at ($(midCross)!\blockWidth!0:(w1tR)$);
\coordinate (picUpE) at ($(picUpN)!1.4*\blockWidth!90:(midCross)$);
\coordinate (picUpS) at ($(picUpE)!\blockWidth!90:(picUpN)$);
% Box in "rligray"
\coordinate (bgS) at (intersection of midCross--helpPoint2 and paperBL--paperBR);
\coordinate (bgW) at ($ (picUpS) + (\halfWidthBar,-\halfWidthBar) $);
\coordinate (helpPoint4) at ($(bgW)!5\blockWidth!90:(bgS)$);
\coordinate (bgN) at (intersection of bgW--helpPoint4 and paperTR--paperBR);
%
% Draw all the boxes
\filldraw[draw=white,fill=white] (w1bL) -- (w1tL) -- (w1tR) -- cycle;
\filldraw[draw=none,fill=rliblue] (brS) -- (brW) -- (brN) -- (brE) -- cycle;
\filldraw[draw=white,fill=white] (w2tR) -- (bgS) -- ($ (bgS) + ({-2*\halfWidthBar},0) $) -- ($ (w2tR) + ({-2*\halfWidthBar},0) $) -- cycle;
\filldraw[draw=white,fill=white] (picUpN) -- (w1tR) -- (paperTR) -- (bgN) -- (bgW) -- (picUpS) -- (picUpE) -- cycle;
\filldraw[draw=none,fill=rligraylight] (bgS) -- (bgW) -- (bgN) -- (paperBR) -- cycle;
\draw (1,0.685\paperheight) -- (0.5\textwidth,0.685\paperheight);
\ifnum\thepage>1\relax%
\fill[white,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight);
\fi
\end{tikzpicture}
}
% Title page text
\defbeamertemplate*{title page}{rli}[1][]
{
\begin{picture}(0,0)
\put(0,-110.7){%
\begin{minipage}[b][45mm][t]{.5\textwidth}
\usebeamerfont{title}{\bfseries{\inserttitle}\par}
\usebeamerfont{subtitle}{\insertsubtitle\par\vspace{0.5cm}}
\usebeamerfont{author}{\insertauthor\par\vspace{0.5cm}}
\usebeamerfont{institute}{\insertinstitute\par\vspace{0.1cm}}
\usebeamerfont{date}{\insertdate\par}
\end{minipage}
}
\end{picture}
}
\mode
<all>
% Background image credits: Photo by Createria on Unsplash. Credit badge code
% <a style="background-color:black;color:white;text-decoration:none;padding:4px 6px;font-family:-apple-system, BlinkMacSystemFont, "San Francisco", "Helvetica Neue", Helvetica, Ubuntu, Roboto, Noto, "Segoe UI", Arial, sans-serif;font-size:12px;font-weight:bold;line-height:1.2;display:inline-block;border-radius:3px" href="https://unsplash.com/@createria?utm_medium=referral&utm_campaign=photographer-credit&utm_content=creditBadge" target="_blank" rel="noopener noreferrer" title="Download free do whatever you want high-resolution photos from Createria"><span style="display:inline-block;padding:2px 3px"><svg xmlns="http://www.w3.org/2000/svg" style="height:12px;width:auto;position:relative;vertical-align:middle;top:-2px;fill:white" viewBox="0 0 32 32"><title>unsplash-logo</title><path d="M10 9V0h12v9H10zm12 5h10v18H0V14h10v9h12v-9z"></path></svg></span><span style="display:inline-block;padding:2px 3px">Createria</span></a>