Kenotom beamer presentation style and template
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

beamerThemeKenotom.sty 12 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402
  1. %
  2. % beamerthemeKenotom.sty
  3. %
  4. % A beamer style file to use in a beamer presentation
  5. %
  6. % author: Christos Choutouridis <c.choutouridis@kenotom.com>
  7. %
  8. \NeedsTeXFormat{LaTeX2e}
  9. \ProvidesPackage{beamerthemeKenotom}
  10. % Requirements
  11. % =====================================================
  12. \RequirePackage{xcolor}
  13. %\RequirePackage{silence}
  14. %\RequirePackage{etoolbox}
  15. \RequirePackage{fontspec}
  16. \RequirePackage{tikz}
  17. \RequirePackage{graphicx}
  18. %\RequirePackage{enumitem}
  19. \RequirePackage{ifthen}
  20. % Options
  21. % =====================================================
  22. % aspectratio: {43(default), 169}
  23. \DeclareOptionBeamer{aspectratio}{\def\beamer@kenotom@aspectratio{#1}}
  24. % theme: {classic(default), light, dark}
  25. \DeclareOptionBeamer{theme}{\def\beamer@kenotom@theme{#1}}
  26. % backround: {none(default), ribon}
  27. \DeclareOptionBeamer{backround}{\def\beamer@kenotom@backround{#1}}
  28. % title: {normal(default), small, large}
  29. \DeclareOptionBeamer{title}{\def\beamer@kenotom@title{#1}}
  30. % nonavigation
  31. %\DeclareOptionBeamer{nonavigation}{\setbeamertemplate{navigation symbols}{}}
  32. % Set default options
  33. \ExecuteOptionsBeamer{aspectratio=43}
  34. \ExecuteOptionsBeamer{theme=classic}
  35. \ExecuteOptionsBeamer{backround=none}
  36. \ExecuteOptionsBeamer{title=normal}
  37. \ProcessOptionsBeamer
  38. %\ProcessOptions\relax
  39. %\WarningsOff[mathdesign/mdbch]
  40. % Colors
  41. % =====================================================
  42. % Define some colors
  43. %\definecolor{KenotomGreen}{RGB}{67,174,158}
  44. \definecolor{KenotomGreen}{RGB}{57,174,157}
  45. \definecolor{KenotomGreenDark}{RGB}{39,103,96}
  46. \definecolor{KenotomGreenGrey}{RGB}{67,91,92}
  47. \definecolor{KenotomGreyLight}{RGB}{215,216,216}
  48. \definecolor{KenotomGrey}{RGB}{154,155,157}
  49. \definecolor{KenotomGreyDark1}{RGB}{108,108,108}
  50. \definecolor{KenotomGreyDark2}{RGB}{92,96,98}
  51. \definecolor{KenotomLightBlue1}{RGB}{207,226,234}
  52. \definecolor{KenotomLightBlue2}{RGB}{232,241,245}
  53. \definecolor{KenotomBlack}{RGB}{0,0,0}
  54. \definecolor{KenotomWhite}{RGB}{255,255,255}
  55. % Define kenotom logos
  56. \pgfdeclareimage[height=0.075\paperheight]{Logo1}{media/kenotomLogo1.png}
  57. \pgfdeclareimage[height=0.075\paperheight]{Logo2}{media/kenotomLogo2.png}
  58. \pgfdeclareimage[height=0.04\paperheight]{Logo3}{media/kenotomLogo3.png}
  59. \pgfdeclareimage[height=0.04\paperheight]{Logo4}{media/kenotomLogo4.png}
  60. \pgfdeclareimage[height=0.06\paperheight]{Logo5}{media/kenotomLogo5.png}
  61. %\pgfdeclareimage[height=0.04\paperheight]{Banner}{media/kenotomBanner.png}
  62. % Local commands
  63. % =====================================================
  64. \newcommand{\Vfill}{\vskip0pt plus 1filll}
  65. % Define a string equality test
  66. \newcommand{\isequal}[2]{ \pdf@strcmp{#1}{#2} }
  67. \newcommand{\SetItemize}[1]{%
  68. \setbeamertemplate{itemize item}{\small{#1}}
  69. \setbeamertemplate{itemize subitem}{\scriptsize{#1}}
  70. \setbeamertemplate{itemize subsubitem}{\tiny{#1}}
  71. }
  72. \newcommand{\SetGraphItemize}[2]{
  73. \setbeamertemplate{itemize item}{\small\includegraphics[height=#1]{#2}}
  74. \setbeamertemplate{itemize subitem}{\scriptsize\includegraphics[height=#1]{#2}}
  75. \setbeamertemplate{itemize subsubitem}{\tiny\includegraphics[height=#1]{#2}}
  76. }
  77. \newcommand{\SetBackroundImage}[1]{
  78. \setbeamertemplate{background}{%
  79. \includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#1}
  80. }
  81. }
  82. %
  83. % [1]: Color
  84. % [2]: Text
  85. %\newcommand{\InsertBackroundToText}[2]{%
  86. %% \colorbox{#1}{%
  87. %% \parbox{\dimexpr\textwidth-2\fboxsep\relax}{#2}
  88. % \colorbox{#1}{#2}
  89. %
  90. % }
  91. %}
  92. %\newcommand{\InsertNavigation}{%
  93. % \insertslidenavigationsymbol%
  94. % \insertframenavigationsymbol%
  95. % \insertsubsectionnavigationsymbol%
  96. % \insertsectionnavigationsymbol%
  97. % \insertdocnavigationsymbol%
  98. % \insertbackfindforwardnavigationsymbol%
  99. %}
  100. %
  101. % Theme
  102. % =====================================================
  103. \ifnum \isequal{\beamer@kenotom@theme}{dark}=0
  104. \colorlet{BackroundCanvasColor}{KenotomBlack}
  105. \colorlet{TitleColor}{KenotomGrey}
  106. \colorlet{TitleColorAux}{KenotomGreen}
  107. \colorlet{FrameTitleColor}{KenotomGreyDark1}
  108. \colorlet{BlockTitleColor}{KenotomGreyDark1}
  109. \colorlet{TextColor}{KenotomGreenGrey}
  110. \colorlet{StructureColor}{KenotomGreen}
  111. \colorlet{NavigationColor}{KenotomGreen}
  112. \colorlet{NavigationArrowsColor}{KenotomWhite}
  113. \colorlet{TableCaptionColor}{KenotomGreyDark1}
  114. \colorlet{TableCaptionTextColor}{KenotomWhite}
  115. \colorlet{TableRowColor1}{KenotomLightBlue1}
  116. \colorlet{TableRowColor2}{KenotomLightBlue2}
  117. \else \ifnum \isequal{\beamer@kenotom@theme}{light}=0
  118. \colorlet{BackroundCanvasColor}{KenotomWhite}
  119. \colorlet{TitleColor}{KenotomGrey}
  120. \colorlet{TitleColorAux}{KenotomGreen}
  121. \colorlet{FrameTitleColor}{KenotomGrey}
  122. \colorlet{BlockTitleColor}{KenotomGrey}
  123. \colorlet{TextColor}{KenotomGrey}
  124. \colorlet{StructureColor}{KenotomGreen}
  125. \colorlet{NavigationColor}{KenotomGreen}
  126. \colorlet{NavigationArrowsColor}{KenotomGrey}
  127. \colorlet{TableCaptionColor}{KenotomGrey}
  128. \colorlet{TableCaptionTextColor}{KenotomWhite}
  129. \colorlet{TableRowColor1}{KenotomLightBlue1}
  130. \colorlet{TableRowColor2}{KenotomLightBlue2}
  131. \else % clasic
  132. \colorlet{BackroundCanvasColor}{KenotomWhite}
  133. \colorlet{TitleColor}{KenotomGreyDark1}
  134. \colorlet{TitleColorAux}{KenotomGreen}
  135. \colorlet{FrameTitleColor}{KenotomGreyDark2}
  136. \colorlet{BlockTitleColor}{KenotomGreyDark2}
  137. \colorlet{TextColor}{KenotomGreenGrey}
  138. \colorlet{StructureColor}{KenotomGreen}
  139. \colorlet{NavigationColor}{KenotomGreen}
  140. \colorlet{NavigationArrowsColor}{KenotomGreyDark1}
  141. \colorlet{TableCaptionColor}{KenotomGreyDark1}
  142. \colorlet{TableCaptionTextColor}{KenotomWhite}
  143. \colorlet{TableRowColor1}{KenotomLightBlue1}
  144. \colorlet{TableRowColor2}{KenotomLightBlue2}
  145. \fi\fi
  146. % Apply theme colors
  147. \setbeamercolor{background canvas}{bg=BackroundCanvasColor}
  148. \setbeamercolor{titlelike}{fg=FrameTitleColor}
  149. \setbeamercolor{block title}{fg=BlockTitleColor}
  150. \setbeamercolor{normal text}{fg=TextColor}
  151. \setbeamercolor{structure}{fg=StructureColor}
  152. \setbeamercolor{navigation symbols}{fg=NavigationColor, bg=NavigationArrowsColor}
  153. %
  154. % Layout and global settings
  155. % =====================================================
  156. % Frame layout
  157. \setbeamersize{
  158. text margin left=2em,
  159. text margin right=2em
  160. }
  161. \setlength{\leftmargini}{1.25em}
  162. \setlength{\leftmarginii}{1em}
  163. \setlength{\leftmarginiii}{1em}
  164. %#+LaTeX_HEADER:\addtobeamertemplate{footnote}{}{\vspace{2ex}}
  165. \addtobeamertemplate{footnote}{}{\vspace{2ex}}
  166. % Default backround (We overwrite it with kenotom environments)
  167. %\ifnum \isequal{\beamer@kenotom@backround}{ribon}=0
  168. % \ifnum \isequal{\beamer@kenotom@aspectratio}{169}=0
  169. % \SetBackround{media/backroundRibon169.png}
  170. % \else
  171. % \SetBackround{media/backroundRibon43.png}
  172. % \fi
  173. %\else %None
  174. % \ifnum \isequal{\beamer@kenotom@aspectratio}{169}=0
  175. % \SetBackround{media/backroundNone169.png}
  176. % \else
  177. % \SetBackround{media/backroundNone43.png}
  178. % \fi
  179. %\fi%
  180. % Default backround (We overwrite it with kenotom environments)
  181. % [1]: Baner image
  182. % [2]: backround image
  183. % [3]: Opacity
  184. %\newcommand{\SetBackround}[3]{%
  185. \setbeamertemplate{background}{%
  186. \begin{tikzpicture}[overlay,remember picture]
  187. % Banner
  188. \node[anchor=north east, inner sep=0pt, yshift=-0.06\paperheight] at (current page.north east) {%
  189. \includegraphics[width=0.2\paperwidth]{media/kenotomBannerRight.png}
  190. };%
  191. % \ifnum \isnotempty{#2}
  192. \node[anchor=center, inner sep=0pt, yshift=0.04\paperheight, opacity=0.1] at (current page.center) {%
  193. \includegraphics[width=\paperwidth]{media/ribon.png}
  194. };%
  195. \node[anchor=center, inner sep=0pt, yshift=0.04\paperheight, opacity=1] at (current page.center) {%
  196. \includegraphics[width=\paperwidth]{media/kenotomLogoDetails.png}
  197. };%
  198. % \fi
  199. \end{tikzpicture}%
  200. }
  201. %}
  202. %\SetBackround{media/kenotomBannerRight.png}{media/ribon.png}{0.15}
  203. % Fonts
  204. \setromanfont{Georgia}
  205. \setsansfont[Scale=MatchLowercase]{Open Sans}
  206. % General
  207. %\setbeamertemplate{navigation symbols}{}
  208. \setbeamertemplate{caption}[numbered]
  209. % Default itemize symbols (We overwrite them with kenotom environments)
  210. \SetItemize{\textbullet}
  211. % Content style
  212. % =====================================================
  213. % Title page style
  214. \setbeamertemplate{title page}[default][left]
  215. \setbeamerfont{title}{family=\rmfamily,size=\Huge}
  216. \setbeamerfont{author}{size=\Large}
  217. \setbeamerfont{institute}{size=\normalsize}
  218. % Delay headline format
  219. %\newcommand{\SetHeadline}{%
  220. % \setbeamertemplate{headline}{%
  221. % \leavevmode
  222. % \hfill \textrm{ \footnotesize{\insertframenumber/\inserttotalframenumber}}
  223. %% \hfill \textrm{ \footnotesize{\insertframenumber/\inserttotalframenumber}}
  224. % }
  225. % \setbeamertemplate{navigation symbols}{\vspace{-1em}}
  226. % \addtobeamertemplate{navigation symbols}{\vspace{-1em}}{}
  227. %}
  228. % footline
  229. %\setbeamertemplate{navigation symbols}{}
  230. %\setbeamertemplate{footlline}{\hfill \insertnavigation{0.3\textwidth}}
  231. \newcommand{\BeginCountingFrames}{%
  232. \addtobeamertemplate{navigation symbols}{}{%
  233. % \hspace{1em} \usebeamerfont{footline} \textrm{ \footnotesize{\insertframenumber/\inserttotalframenumber}}
  234. \hspace{2em} \usebeamerfont{footline} \texttt{ \footnotesize{\insertframenumber}}
  235. }
  236. \setcounter{framenumber}{0}
  237. }
  238. % Frame title style
  239. \ifnum \isequal{\beamer@kenotom@title}{small}=0
  240. \setbeamerfont{frametitle}{family=\rmfamily,size=\large,series=\bfseries}
  241. \else\ifnum \isequal{\beamer@kenotom@title}{normal}=0
  242. \setbeamerfont{frametitle}{family=\rmfamily,size=\Large,series=\bfseries}
  243. \else\ifnum \isequal{\beamer@kenotom@title}{large}=0
  244. \setbeamerfont{frametitle}{family=\rmfamily,size=\huge,series=\bfseries}
  245. \else % default = normal
  246. \setbeamerfont{frametitle}{size=\Large,series=\bfseries}
  247. \fi\fi\fi%
  248. \setbeamertemplate{frametitle}{
  249. \vskip0.05\paperheight
  250. \insertframetitle
  251. }
  252. % Block style
  253. \setbeamerfont{block title}{family=\rmfamily,size=\large}
  254. % Table style
  255. \renewcommand{\arraystretch}{1.2}
  256. \newcommand{\tableheadrow}{\rowcolor{TableCaptionColor}}
  257. \newcommand{\tableheadcol}[1]{{\bfseries\color{TableCaptionTextColor}#1}}
  258. \rowcolors{2}{TableRowColor1}{TableRowColor2}
  259. %\AtBeginEnvironment{tabular}{\color{black}}
  260. % Kenotom environments
  261. % =====================================================
  262. % Kenotom CoverFrame
  263. \newcommand{\CoverFrame}{{%
  264. \ifnum \isequal{\beamer@kenotom@aspectratio}{169}=0
  265. \SetBackroundImage{media/backroundCover169.png}
  266. \else
  267. \SetBackroundImage{media/backroundCover43.png}
  268. \fi
  269. \begin{frame}
  270. \end{frame}
  271. }
  272. }
  273. \newcommand{\TitleFrame}{{%
  274. \ifnum \isequal{\beamer@kenotom@aspectratio}{169}=0
  275. \SetBackroundImage{media/backroundTitlePage169.png}
  276. \else
  277. \SetBackroundImage{media/backroundTitlePage43.png}
  278. \fi
  279. \begin{frame}
  280. \vspace{0.15\textheight}
  281. \textcolor{TitleColor}{
  282. \rmfamily \Huge
  283. \Title \\[0.5ex]
  284. \normalsize
  285. \SubTitle \\[10ex]
  286. }
  287. \textcolor{TextColor}{
  288. \Large
  289. \AuthorName \\[1.5ex]
  290. \normalsize
  291. \Date
  292. }
  293. \end{frame}
  294. }
  295. }
  296. \newcommand{\BackCoverFrame}{{%
  297. \ifnum \isequal{\beamer@kenotom@aspectratio}{169}=0
  298. \SetBackroundImage{media/backroundBackCover169.png}
  299. \else
  300. \SetBackroundImage{media/backroundBackCover43.png}
  301. \fi
  302. \begin{frame}
  303. \Vfill
  304. \AuthorName \\
  305. \AuthorMail \\
  306. \textcolor{StructureColor}{%
  307. \Address \\
  308. \Telephone
  309. }
  310. \vspace{0.125\paperheight}
  311. \end{frame}
  312. }
  313. }
  314. \newenvironment{tickmarks}{%
  315. \SetGraphItemize{1.6ex}{media/tickmark1.png}
  316. \begin{itemize}
  317. }{%
  318. \end{itemize}
  319. }
  320. \newenvironment{bullets}{%
  321. \SetGraphItemize{1.3em}{media/bullet.png}
  322. \begin{itemize}
  323. }{%
  324. \end{itemize}
  325. }