Debian Codegraph @

texmf-dist/source/latex/beamertheme-saintpetersburg/SaintPetersburg.dtx

raw
1 %%
2 %% Copyright (C) 2017 by Ivan Gankevich <[email protected]>
3 %%
4 %% This file may be distributed and/or modified under the conditions of
5 %% the LaTeX Project Public License, either version 1.3c of this license
6 %% or (at your option) any later version. The latest version of this
7 %% license is in:
8 %%
9 %% http://www.latex-project.org/lppl.txt
10 %%
11 %% and version 1.3c or later is part of all distributions of LaTeX version
12 %% 2005/12/01 or later.
13 %%
14
15 \documentclass{ltxdoc}
16
17 \usepackage{xcolor}
18 \definecolor{spbuTerracotta}{cmyk}{.08,.91,.92,.33}
19 \definecolor{spbuGray}{cmyk}{.21,.11,.09,.22}
20 \definecolor{spbuDarkGray2}{HTML}{5F7177}
21 \definecolor{spbuWhite1}{RGB}{245,246,245}
22 \usepackage[colorlinks=true,
23 linkcolor=spbuTerracotta,
24 menucolor=spbuTerracotta,
25 pagecolor=spbuTerracotta,
26 urlcolor=spbuTerracotta]{hyperref}
27 \usepackage{listings}
28 \lstset{%
29 language=[LaTeX]{TeX},
30 basicstyle=\ttfamily,
31 keywordstyle=\color{spbuTerracotta},
32 commentstyle=\color{spbuGray},
33 stringstyle=\color{spbuDarkGray2},
34 backgroundcolor=\color{spbuWhite1},
35 numbers=none,
36 showspaces=false,
37 showstringspaces=false,
38 showtabs=false,
39 frame=none,
40 breaklines=true,
41 breakatwhitespace=false,
42 morekeywords={usetheme,institute,maketitle,setdefaultlanguage%
43 ,titlegraphic,othergraphic,leftcolumnwidth,rightcolumnwidth,%
44 middlecolumnwidth,includegraphics},
45 }
46 \usepackage{metalogo}
47 \usepackage{fontspec}
48 \setmainfont[
49 Extension=.otf,
50 UprightFont=*-Regular,
51 BoldFont=*-Bold,
52 ItalicFont=*-Italic,
53 Mapping=tex-text
54 ]{OldStandard}
55 \setromanfont[
56 Extension=.otf,
57 UprightFont=*-Regular,
58 BoldFont=*-Bold,
59 ItalicFont=*-Italic,
60 Mapping=tex-text
61 ]{OldStandard}
62 \setsansfont[
63 Extension=.ttf,
64 UprightFont=*-Regular,
65 BoldFont=*-Bold,
66 ItalicFont=*-Italic,
67 BoldItalicFont=*-BoldItalic,
68 Mapping=tex-text
69 ]{OpenSans}
70 \setmonofont[
71 Extension=.otf,
72 UprightFont=*-Regular,
73 BoldFont=*-Bold
74 ]{FiraMono}
75
76 \title{Saint Petersburg: \LaTeX{} Beamer theme for SPbU}
77 \author{Ivan Gankevich}
78 \date{21 Nov 2017}
79
80 \begin{document}
81
82 \maketitle
83 \tableofcontents
84
85 \section{Introduction}
86
87 A small theme that incorporates university colours and fonts from
88 \href{http://pr.spbu.ru/}{the official web-site}.
89
90 \subsection{Installation}
91
92 On Linux/MacOS clone \href{https://github.com/igankevich/SaintPetersburg}{theme
93 repository} and type \verb=make install= to install everything to standard TeX
94 Live locations. Alternatively, just copy all \verb=*.sty= files into your
95 project directory so that \LaTeX{} can find them. In order to show
96 university's logo in the background of the title slide, you need to download
97 its medium size version from
98 \href{http://pr.spbu.ru/images/simvolika/logo/CoA_Medium.eps}{the official
99 web-site}.
100
101 \subsection{Usage}
102
103 Saint Petersburg theme can be compiled by \LaTeX{} or \XeLaTeX{}. Here is the
104 minimal working example:
105 \begin{lstlisting}
106 \documentclass[aspectratio=169]{beamer}
107 % add \usepackage{beamerposter} for the poster
108
109 % XeTeX
110 \usepackage{polyglossia}
111 \setdefaultlanguage{english}
112 % or \setdefaultlanguage{russian}
113
114 % LaTeX
115 % \usepackage[utf8]{inputenc}
116 % \usepackage[english]{babel}
117 % or \usepackage[english,russian]{babel}
118
119 \usetheme{SaintPetersburg}
120
121 \title{Saint Petersburg \LaTeX{} Beamer theme}
122 \author{Ivan Gankevich}
123 \institute{Saint Petersburg State University}
124 \date{21 Nov 2017}
125
126 \begin{document}
127 \frame{\titlepage}
128 \end{document}
129 \end{lstlisting}
130
131 \noindent An example of poster.
132 \begin{lstlisting}
133 \documentclass[aspectratio=169]{beamer}
134 \usepackage{beamerposter} for the poster
135
136 % XeTeX
137 \usepackage{polyglossia}
138 \setdefaultlanguage{english}
139 % or \setdefaultlanguage{russian}
140
141 % LaTeX
142 % \usepackage[utf8]{inputenc}
143 % \usepackage[english]{babel}
144 % or \usepackage[english,russian]{babel}
145
146 \usetheme[poster]{SaintPetersburg}
147
148 \title{Saint Petersburg \LaTeX{} Beamer theme}
149 \author{Ivan Gankevich}
150 \institute{Saint Petersburg State University}
151 \date{21 Nov 2017}
152
153 \begin{document}
154 \frame{\titlepage}
155 \end{document}
156 \end{lstlisting}
157
158 \subsection{Usage}
159
160 \subsubsection{Theme options}
161
162 \DescribeMacro{nologo} Disables display of the university coat of arms in the
163 left top corner of the title page.\vspace{\baselineskip}
164
165 \noindent\DescribeMacro{poster} Adapts the theme for poster presentation:
166 enables section commands, increases font size and changes default font family
167 to serif.
168
169 \subsubsection{Theme macros}
170
171 \DescribeMacro{\titlegraphic}%
172 \DescribeMacro{\othergraphic}%
173 Defines a code to include in the left (right) top corner of the poster. The
174 following code places SPbU logo in both left and right corners.
175 \begin{lstlisting}
176 \titlegraphic{%
177 \includegraphics[width=.7\linewidth]{spbu-CoA}}
178 \othergraphic{%
179 \includegraphics[width=.7\linewidth]{spbu-CoA}}
180 \end{lstlisting}
181 Here the width equals to 70\% of the left (right) column width. Any code can be
182 specified instead of just including graphics.
183
184 \DescribeMacro{\leftcolumnwidth}%
185 \DescribeMacro{\rightcolumnwidth}%
186 \DescribeMacro{\middlecolumnwidth}%
187 Sets left, right, middle column widths repsectively. The right and left columns
188 contain logos and the middle column contains the title, authors and institute
189 name. In the following example, the widths are set to 20\%, 60\% and 20\%
190 fractions of the total line width.
191 \begin{lstlisting}
192 \leftcolumnwidth{.2\linewidth}
193 \middlecolumnwidth{.6\linewidth}
194 \rightcolumnwidth{.2\linewidth}
195 \end{lstlisting}
196
197 \subsection{License}
198
199 Saint Petersburg theme is licensed under the terms of the
200 \href{https://ctan.org/license/lppl1.3c}{\LaTeX{} Project Public License
201 version 1.3c}.
202
203 \section{Implementation}
204
205 \DocInput{beamercolorthemeSaintPetersburg.dtx}
206 \DocInput{beamerfontthemeSaintPetersburg.dtx}
207 \DocInput{beamerthemeSaintPetersburg.dtx}
208
209 \end{document}