summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/ppt-slides/ppt-templates/ppt-9x6.tex
blob: d80db063fda3ae1c4a80819b2305a29a041ece8f (plain)
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
% (The MIT License)
%
% Copyright (c) 2022 Yegor Bugayenko
%
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the 'Software'), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
%
% The above copyright notice and this permission notice shall be included in all
% copies or substantial portions of the Software.
%
% THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
% SOFTWARE.

\RequirePackage{geometry}
  \geometry{paperwidth=16in, paperheight=9in, left=4in, right=2in, top=1.5in, bottom=1.5in}
\RequirePackage[absolute]{textpos}
  \TPGrid{16}{16}
\RequirePackage[tt=false,type1=true]{libertine} % the font we use
\RequirePackage{microtype} % just to make rendering smooth
\RequirePackage{anyfontsize} % to support all sizes
\RequirePackage{multicol} % for pptWide environment
\RequirePackage[fontsize=24pt]{fontsize} % to make fonts larger
\RequirePackage{changepage} % to use 'adjustwidth' environment in pptWide
\RequirePackage{soul} % for underscores in crumbs
\RequirePackage{tikz} % for drawing circles
\RequirePackage{lastpage} % to count pages and show total

\RequirePackage{crumbs}
  \renewcommand\crumb[2]{%
    \ifnum\value{crumbi}=1\else\hspace{1em}\fi
    \ifnum\value{crumbi}=\value{section}%
      {\setulcolor{blue}\color{blue}\ul{#1}}%
    \else%
      #1%
    \fi%
  }
  \renewcommand\subcrumb[2]{%
    \ifnum\value{subcrumbi}=1\else\hspace{0.5em}\fi
    \ifnum\value{subcrumbi}=\value{subsection}%
      {\setulcolor{blue}\color{blue}\ul{#1}}%
    \else%
      #1%
    \fi%
  }

\RequirePackage{fancyhdr}
  \pagestyle{fancy}
  \renewcommand{\headrulewidth}{0pt}
  \fancyhf{}
  \fancyhead[L]{%
    \ifx\crumbs\empty\else
      \begin{textblock}{12}(1,1)%
        \ifnum\value{section}=0\else
          {\small\ttfamily\crumbs}
          \ifnum\value{subsection}=0\else
            \\[6pt]
            {\quad\scriptsize\ttfamily\color{grey}[ \subcrumbs{} ]}
          \fi
        \fi
      \end{textblock}%
    \fi
  }
  \fancyhead[R]{%
    \ifnum\value{page}=1\else%
      \begin{textblock}{4}[1,0](15,1)%
        {\ttfamily\normalsize {\thepage{}}{\footnotesize{\color{grey}/\pageref{LastPage}}}}
      \end{textblock}%
      \ifcsname c@minutes\endcsname
        \ifnum\value{minutes}=0\else%
          \begin{textblock}{1}[1,0](15.8,0.2)%
            \tikz{\node[inner sep=2pt,circle,draw=grey]{\color{grey}\scriptsize\ttfamily\theminutes{}};}
          \end{textblock}%
        \fi
      \fi
    \fi
  }

\newcommand\pptLeft[1]{%
  \fancyfoot[L]{%
    \ifnum\value{page}=1\else%
      \begin{textblock}{8}[0,1](1,15)%
        {\color{grey}\scriptsize\ttfamily #1}
      \end{textblock}%
    \fi
  }
}

\newcommand\pptRight[1]{%
  \fancyfoot[R]{%
    \ifnum\value{page}=1\else%
      \begin{textblock}{8}[1,1](15,15)%
        {\color{grey}\scriptsize\ttfamily #1}
      \end{textblock}%
    \fi
  }
}

\AtBeginDocument{%
  \raggedbottom%
  \raggedright%
  \raggedcolumns%
  \setlength\topskip{0pt}%
  \setlength\headheight{32pt}%
  \setlength\footskip{32pt}%
  \setlength\parindent{0pt}%
  \setlength\parskip{18pt}%
  \setlength\columnsep{32pt}%
  \normalsize%
  \sffamily%
}