| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2017 by Ivan Gankevich <[email protected]> |
| 4 |
% ------------------------------------------------------- |
| 5 |
% |
| 6 |
% This file may be distributed and/or modified under the |
| 7 |
% conditions of the LaTeX Project Public License, either version 1.3c |
| 8 |
% of this license or (at your option) any later version. |
| 9 |
% The latest version of this license is in: |
| 10 |
% |
| 11 |
% http://www.latex-project.org/lppl.txt |
| 12 |
% |
| 13 |
% and version 1.3c or later is part of all distributions of LaTeX |
| 14 |
% version 2005/12/01 or later. |
| 15 |
% |
| 16 |
% \fi |
| 17 |
% \iffalse |
| 18 |
%<*package> |
| 19 |
\NeedsTeXFormat{LaTeX2e} |
| 20 |
\ProvidesPackage{beamerfontthemeSaintPetersburg}[2017/11/20 Saint Petersburg font theme] |
| 21 |
%</package> |
| 22 |
% \fi |
| 23 |
% \CheckSum{0} |
| 24 |
% \StopEventually{} |
| 25 |
% \iffalse |
| 26 |
%<*package> |
| 27 |
% \fi |
| 28 |
% \subsection{SaintPetersburg font theme} |
| 29 |
% Use Fira Mono as typewriter font and Open Sans as sans serif font. |
| 30 |
% \begin{macrocode} |
| 31 |
\RequirePackage{FiraMono} |
| 32 |
\RequirePackage{opensans} |
| 33 |
\RequirePackage{ifxetex} |
| 34 |
% \end{macrocode} |
| 35 |
% Setup fonts using \texttt{fontspec} package. |
| 36 |
% \begin{macrocode} |
| 37 |
\ifxetex% |
| 38 |
\RequirePackage{fontspec} |
| 39 |
% \end{macrocode} |
| 40 |
|
| 41 |
% Use serif font for posters and sans serif font for slides. |
| 42 |
% \begin{macrocode} |
| 43 |
\makeatletter% |
| 44 |
\if@spbuPoster% |
| 45 |
\setmainfont[ |
| 46 |
Extension=.otf, |
| 47 |
UprightFont=*-Regular, |
| 48 |
BoldFont=*-Bold, |
| 49 |
ItalicFont=*-Italic, |
| 50 |
Mapping=tex-text |
| 51 |
]{OldStandard} |
| 52 |
\newfontfamily\cyrillicfont[ |
| 53 |
Extension=.otf, |
| 54 |
UprightFont=*-Regular, |
| 55 |
BoldFont=*-Bold, |
| 56 |
ItalicFont=*-Italic, |
| 57 |
Mapping=tex-text |
| 58 |
]{OldStandard} |
| 59 |
\else% |
| 60 |
\setmainfont[ |
| 61 |
Extension=.ttf, |
| 62 |
UprightFont=*-Regular, |
| 63 |
BoldFont=*-Bold, |
| 64 |
ItalicFont=*-Italic, |
| 65 |
BoldItalicFont=*-BoldItalic, |
| 66 |
Mapping=tex-text |
| 67 |
]{OpenSans} |
| 68 |
\newfontfamily\cyrillicfont[ |
| 69 |
Extension=.ttf, |
| 70 |
UprightFont=*-Regular, |
| 71 |
BoldFont=*-Bold, |
| 72 |
ItalicFont=*-Italic, |
| 73 |
BoldItalicFont=*-BoldItalic, |
| 74 |
Mapping=tex-text |
| 75 |
]{OpenSans} |
| 76 |
\fi% |
| 77 |
\makeatother% |
| 78 |
% \end{macrocode} |
| 79 |
% Load other fonts. |
| 80 |
% \begin{macrocode} |
| 81 |
\setromanfont[ |
| 82 |
Extension=.otf, |
| 83 |
UprightFont=*-Regular, |
| 84 |
BoldFont=*-Bold, |
| 85 |
ItalicFont=*-Italic, |
| 86 |
Mapping=tex-text |
| 87 |
]{OldStandard} |
| 88 |
\setsansfont[ |
| 89 |
Extension=.ttf, |
| 90 |
UprightFont=*-Regular, |
| 91 |
BoldFont=*-Bold, |
| 92 |
ItalicFont=*-Italic, |
| 93 |
BoldItalicFont=*-BoldItalic, |
| 94 |
Mapping=tex-text |
| 95 |
]{OpenSans} |
| 96 |
\setmonofont[ |
| 97 |
Extension=.otf, |
| 98 |
UprightFont=*-Regular, |
| 99 |
BoldFont=*-Bold |
| 100 |
]{FiraMono} |
| 101 |
\newfontfamily\cyrillicfontrm[ |
| 102 |
Extension=.otf, |
| 103 |
UprightFont=*-Regular, |
| 104 |
BoldFont=*-Bold, |
| 105 |
ItalicFont=*-Italic, |
| 106 |
Mapping=tex-text |
| 107 |
]{OldStandard} |
| 108 |
\newfontfamily\cyrillicfontsf[ |
| 109 |
Extension=.ttf, |
| 110 |
UprightFont=*-Regular, |
| 111 |
BoldFont=*-Bold, |
| 112 |
ItalicFont=*-Italic, |
| 113 |
BoldItalicFont=*-BoldItalic, |
| 114 |
Mapping=tex-text |
| 115 |
]{OpenSans} |
| 116 |
\newfontfamily\cyrillicfonttt[ |
| 117 |
Extension=.otf, |
| 118 |
UprightFont=*-Regular, |
| 119 |
BoldFont=*-Bold |
| 120 |
]{FiraMono} |
| 121 |
\newfontfamily\rmfamily[ |
| 122 |
Extension=.otf, |
| 123 |
UprightFont=*-Regular, |
| 124 |
BoldFont=*-Bold, |
| 125 |
ItalicFont=*-Italic, |
| 126 |
Mapping=tex-text |
| 127 |
]{OldStandard} |
| 128 |
\newfontfamily\sffamily[ |
| 129 |
Extension=.ttf, |
| 130 |
UprightFont=*-Regular, |
| 131 |
BoldFont=*-Bold, |
| 132 |
ItalicFont=*-Italic, |
| 133 |
BoldItalicFont=*-BoldItalic, |
| 134 |
Mapping=tex-text |
| 135 |
]{OpenSans} |
| 136 |
\newfontfamily\ttfamily[ |
| 137 |
Extension=.otf, |
| 138 |
UprightFont=*-Regular, |
| 139 |
BoldFont=*-Bold |
| 140 |
]{FiraMono} |
| 141 |
\fi% |
| 142 |
% \end{macrocode} |
| 143 |
|
| 144 |
% Define common font styles. |
| 145 |
% \begin{macrocode} |
| 146 |
\setbeamerfont{note page}{size=\small} |
| 147 |
\setbeamerfont{tiny structure}{family=\sffamily} |
| 148 |
\setbeamerfont{structure}{family=\sffamily} |
| 149 |
\setbeamerfont{section in toc}{family=\sffamily} |
| 150 |
\setbeamerfont{subsection in toc}{family=\sffamily} |
| 151 |
\setbeamerfont{subsubsection in toc}{family=\sffamily} |
| 152 |
\setbeamerfont{block title}{series=\mdseries} |
| 153 |
\setbeamerfont{block body}{series=\mdseries} |
| 154 |
\setbeamerfont{block body example}{series=\mdseries} |
| 155 |
\setbeamerfont{block title alerted}{series=\bfseries} |
| 156 |
\setbeamerfont{abstract}{size=\normalsize} |
| 157 |
\setbeamerfont{title}{size=\Large} |
| 158 |
\setbeamerfont{subtitle}{size=\Large} |
| 159 |
\setbeamerfont{author}{size=\large} |
| 160 |
\usefonttheme{professionalfonts} |
| 161 |
% \end{macrocode} |
| 162 |
|
| 163 |
% Define poster font styles. |
| 164 |
% \begin{macrocode} |
| 165 |
\makeatletter% |
| 166 |
\if@spbuPoster% |
| 167 |
% \end{macrocode} |
| 168 |
|
| 169 |
% Set roman font as the default. |
| 170 |
% \begin{macrocode} |
| 171 |
\usefonttheme{serif} |
| 172 |
% \end{macrocode} |
| 173 |
|
| 174 |
% Set small font for bibliography items. |
| 175 |
% \begin{macrocode} |
| 176 |
\setbeamerfont{bibliography item}{size=\small} |
| 177 |
\setbeamerfont{bibliography entry author}{size=\small} |
| 178 |
% \end{macrocode} |
| 179 |
|
| 180 |
% Set large font size for headings, blocks and captions. |
| 181 |
% \begin{macrocode} |
| 182 |
\setbeamerfont{section in head/foot}{series=\bfseries} |
| 183 |
\setbeamerfont{block title}{series=\bfseries} |
| 184 |
\setbeamerfont{block alerted title}{series=\bfseries} |
| 185 |
\setbeamerfont{frametitle}{series=\bfseries,size=\Large} |
| 186 |
\setbeamerfont{caption}{size=\normalsize} |
| 187 |
\setbeamerfont{caption name}{size=\normalsize} |
| 188 |
% \end{macrocode} |
| 189 |
|
| 190 |
% End of poster font styles. |
| 191 |
% \begin{macrocode} |
| 192 |
\fi% |
| 193 |
\makeatother% |
| 194 |
% \end{macrocode} |