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 16 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. %
  2. % beamerthemeKenotom.sty
  3. %
  4. % A beamer style file to use in a kenotom presentation
  5. %
  6. % author: Christos Choutouridis <c.choutouridis@kenotom.com>
  7. %
  8. \NeedsTeXFormat{LaTeX2e}
  9. \ProvidesPackage{beamerthemeKenotom}[2023/05/12 Kenotom beamer theme]
  10. % Requirements
  11. % =====================================================
  12. \RequirePackage{xcolor}
  13. \RequirePackage{fontspec}
  14. \RequirePackage{tikz}
  15. \RequirePackage{graphicx}
  16. \RequirePackage{ifthen}
  17. \RequirePackage[absolute,overlay]{textpos}
  18. % Options
  19. % =====================================================
  20. % key-value: theme: {classic(default), light, dark}
  21. \DeclareOptionBeamer{theme}{\def\beamer@kenotom@theme{#1}}
  22. % key-value: backround: {none(default), ribon}
  23. \DeclareOptionBeamer{backround}{\def\beamer@kenotom@backround{#1}}
  24. % key-value: title: {normal(default), small, large}
  25. \DeclareOptionBeamer{title}{\def\beamer@kenotom@title{#1}}
  26. % key-value: navigation: {enable(default), disable}
  27. \DeclareOptionBeamer{navigation}{\def\beamer@kenotom@navigation{#1}}
  28. % key-value: fancy: {disable(default), enable}
  29. \DeclareOptionBeamer{fancy}{\def\beamer@kenotom@fancy{#1}}
  30. % Set default options
  31. \ExecuteOptionsBeamer{theme=classic}
  32. \ExecuteOptionsBeamer{backround=none}
  33. \ExecuteOptionsBeamer{title=normal}
  34. \ExecuteOptionsBeamer{navigation=enable}
  35. \ExecuteOptionsBeamer{fancy=disable}
  36. \ProcessOptionsBeamer
  37. %\ProcessOptions\relax
  38. % Colors
  39. % =====================================================
  40. % Define some colors
  41. \definecolor{KenotomGreenLight}{RGB}{127,213,201}
  42. \definecolor{KenotomGreen}{RGB}{57,174,157}
  43. \definecolor{KenotomGreenDark}{RGB}{39,103,96}
  44. \definecolor{KenotomGreenGreyLight}{RGB}{203,217,217}
  45. \definecolor{KenotomGreenGrey}{RGB}{67,91,92}
  46. \definecolor{KenotomGreenGreyDark}{RGB}{13,34,39}
  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. % Local commands
  56. % =====================================================
  57. \newcommand{\Vfill}{\vskip0pt plus 1filll}
  58. % Define a string equality test
  59. \newcommand{\isequal}[2]{ \pdf@strcmp{#1}{#2} }
  60. \newcommand{\SetItemize}[1]{%
  61. \setbeamertemplate{itemize item}{\small{#1}}
  62. \setbeamertemplate{itemize subitem}{\scriptsize{#1}}
  63. \setbeamertemplate{itemize subsubitem}{\tiny{#1}}
  64. }
  65. \newcommand{\SetGraphItemize}[2]{
  66. \setbeamertemplate{itemize item}{\small\includegraphics[height=#1]{#2}}
  67. \setbeamertemplate{itemize subitem}{\scriptsize\includegraphics[height=#1]{#2}}
  68. \setbeamertemplate{itemize subsubitem}{\tiny\includegraphics[height=#1]{#2}}
  69. }
  70. % [1]: Banner image
  71. \newcommand{\SetBackroundPlain}[1]{%
  72. \setbeamertemplate{background}{%
  73. \begin{tikzpicture}[overlay,remember picture]
  74. % Banner
  75. \node[anchor=east, inner sep=0pt, yshift=-0.06\paperheight] at (current page.north east) {%
  76. \includegraphics[width=0.2\paperwidth]{#1}
  77. };%
  78. \end{tikzpicture}%
  79. }
  80. }
  81. % [1]: [social]:
  82. % {2}: Banner image
  83. % {3}: background image
  84. % {4}: y-offset
  85. % {5}: Opacity
  86. \newcommand{\SetBackgroundImage}[5][noSocial]{%
  87. \setbeamertemplate{background}{%
  88. \begin{tikzpicture}[overlay,remember picture]
  89. % Banner
  90. \node[anchor=east, inner sep=0pt, yshift=-0.06\paperheight] at (current page.north east) {%
  91. \includegraphics[width=0.2\paperwidth]{#2}
  92. };%
  93. % Image
  94. \node[anchor=center, inner sep=0pt, yshift=#4\paperheight, opacity=#5] at (current page.center) {%
  95. \includegraphics[width=\paperwidth]{#3}
  96. };%
  97. % Social links
  98. \ifnum \isequal{#1}{social}=0
  99. \node[anchor=west, inner sep=0pt, xshift=0.05\paperwidth, yshift=-0.06\paperheight] at (current page.north west) {%
  100. \includegraphics[width=0.03\paperwidth]{media/Social.png}
  101. };%
  102. \fi
  103. \end{tikzpicture}%
  104. }
  105. }
  106. \newcommand{\BeginCountingFrames}{%
  107. \addtobeamertemplate{navigation symbols}{}{%
  108. \hspace{2em} \usebeamerfont{footline} \texttt{ \scriptsize{\insertframenumber/\inserttotalframenumber}}
  109. }
  110. \setcounter{framenumber}{0}
  111. }
  112. %
  113. % [1]: Color
  114. % [2]: Text
  115. %\newcommand{\InsertBackroundToText}[2]{%
  116. %% \colorbox{#1}{%
  117. %% \parbox{\dimexpr\textwidth-2\fboxsep\relax}{#2}
  118. % \colorbox{#1}{#2}
  119. %
  120. % }
  121. %}
  122. %
  123. % Theme
  124. % =====================================================
  125. \ifnum \isequal{\beamer@kenotom@theme}{dark}=0
  126. \colorlet{BackgroundCanvasColor}{KenotomGreenGreyDark}
  127. \colorlet{TitleColor}{KenotomGreyLight}
  128. \colorlet{TitleColorFancy}{KenotomWhite}
  129. \colorlet{TitleColorAux}{KenotomGreenLight}
  130. \colorlet{FrameTitleColor}{KenotomGrey}
  131. \colorlet{BlockTitleColor}{KenotomGrey}
  132. \colorlet{TextColor}{KenotomGreenGreyLight}
  133. \colorlet{StructureColor}{KenotomGreenLight}
  134. \colorlet{NavigationColor}{KenotomGreen}
  135. \colorlet{NavigationColorFancy}{KenotomWhite}
  136. \colorlet{NavigationArrowsColor}{KenotomGreyLight}
  137. \colorlet{NavigationArrowsColorFancy}{KenotomWhite}
  138. \colorlet{TableCaptionColor}{KenotomGreyDark1}
  139. \colorlet{TableCaptionTextColor}{KenotomWhite}
  140. \colorlet{TableRowColor1}{KenotomLightBlue1}
  141. \colorlet{TableRowColor2}{KenotomLightBlue2}
  142. \else \ifnum \isequal{\beamer@kenotom@theme}{light}=0
  143. \colorlet{BackgroundCanvasColor}{KenotomWhite}
  144. \colorlet{TitleColor}{KenotomGrey}
  145. \colorlet{TitleColorFancy}{KenotomWhite}
  146. \colorlet{TitleColorAux}{KenotomGreen}
  147. \colorlet{FrameTitleColor}{KenotomGrey}
  148. \colorlet{BlockTitleColor}{KenotomGrey}
  149. \colorlet{TextColor}{KenotomGrey}
  150. \colorlet{StructureColor}{KenotomGreen}
  151. \colorlet{NavigationColor}{KenotomGreen}
  152. \colorlet{NavigationColorFancy}{KenotomWhite}
  153. \colorlet{NavigationArrowsColor}{KenotomGrey}
  154. \colorlet{NavigationArrowsColorFancy}{KenotomWhite}
  155. \colorlet{TableCaptionColor}{KenotomGrey}
  156. \colorlet{TableCaptionTextColor}{KenotomWhite}
  157. \colorlet{TableRowColor1}{KenotomLightBlue1}
  158. \colorlet{TableRowColor2}{KenotomLightBlue2}
  159. \else % clasic
  160. \colorlet{BackgroundCanvasColor}{KenotomWhite}
  161. \colorlet{TitleColor}{KenotomGreyDark1}
  162. \colorlet{TitleColorFancy}{KenotomWhite}
  163. \colorlet{TitleColorAux}{KenotomGreen}
  164. \colorlet{FrameTitleColor}{KenotomGreyDark2}
  165. \colorlet{BlockTitleColor}{KenotomGreyDark2}
  166. \colorlet{TextColor}{KenotomGreenGrey}
  167. \colorlet{StructureColor}{KenotomGreen}
  168. \colorlet{NavigationColor}{KenotomGreen}
  169. \colorlet{NavigationColorFancy}{KenotomWhite}
  170. \colorlet{NavigationArrowsColor}{KenotomGreyDark1}
  171. \colorlet{NavigationArrowsColorFancy}{KenotomWhite}
  172. \colorlet{TableCaptionColor}{KenotomGreyDark1}
  173. \colorlet{TableCaptionTextColor}{KenotomWhite}
  174. \colorlet{TableRowColor1}{KenotomLightBlue1}
  175. \colorlet{TableRowColor2}{KenotomLightBlue2}
  176. \fi\fi
  177. % Apply theme colors
  178. \setbeamercolor{background canvas}{bg=BackgroundCanvasColor}
  179. \setbeamercolor{title}{fg=TitleColor}
  180. \setbeamercolor{subtitle}{fg=TitleColor}
  181. \setbeamercolor{frametitle}{fg=FrameTitleColor}
  182. \setbeamercolor{section title}{fg=FrameTitleColor}
  183. \setbeamercolor{subsection title}{fg=FrameTitleColor}
  184. \setbeamercolor{block title}{fg=BlockTitleColor}
  185. \setbeamercolor{normal text}{fg=TextColor}
  186. \setbeamercolor{structure}{fg=StructureColor}
  187. \setbeamercolor{navigation symbols}{fg=NavigationColor, bg=NavigationArrowsColor}
  188. %
  189. % Layout and global settings
  190. % =====================================================
  191. \newcommand{\SideMargin}{2em}
  192. % Frame layout
  193. \setbeamersize{
  194. text margin left=\SideMargin,
  195. text margin right=\SideMargin
  196. }
  197. \setlength{\leftmargini}{1.25em}
  198. \setlength{\leftmarginii}{1em}
  199. \setlength{\leftmarginiii}{1em}
  200. \addtobeamertemplate{footnote}{}{\vspace{2ex}}
  201. % Default backround (We overwrite it temporary inside kenotom frame environments)
  202. \ifnum \isequal{\beamer@kenotom@backround}{ribon}=0
  203. \SetBackgroundImage{media/BannerLogoLink.png}{media/Ribon.png}{0.04}{0.15}
  204. \else %None
  205. \SetBackgroundPlain{media/BannerLogoLink.png}
  206. \fi%
  207. % Fonts
  208. \setromanfont{Georgia}
  209. \setsansfont[Scale=MatchLowercase]{Open Sans}
  210. % General
  211. \ifnum \isequal{\beamer@kenotom@navigation}{disable}=0
  212. \setbeamertemplate{navigation symbols}{}
  213. \fi
  214. \setbeamertemplate{caption}[numbered]
  215. % Default itemize symbols (We overwrite them with kenotom environments)
  216. \SetItemize{\textbullet}
  217. % Content style
  218. % =====================================================
  219. \newcommand{\TitleSize}{\Huge}
  220. \newcommand{\SectionSize}{\Large}
  221. \ifnum \isequal{\beamer@kenotom@title}{small}=0
  222. \newcommand{\FrameTitleSize}{\large}
  223. \else\ifnum \isequal{\beamer@kenotom@title}{normal}=0
  224. \newcommand{\FrameTitleSize}{\Large}
  225. \else\ifnum \isequal{\beamer@kenotom@title}{large}=0
  226. \newcommand{\FrameTitleSize}{\huge}
  227. \else % default = normal
  228. \newcommand{\FrameTitleSize}{\Large}
  229. \fi\fi\fi%
  230. \newcommand{\AuthorSize}{\Large}
  231. \newcommand{\InstituteSize}{\normalsize}
  232. \newcommand{\ContactInfoSize}{\normalize}
  233. \newcommand{\FancyTitleSize}{\LARGE}
  234. \newcommand{\FancyTitleFontStyle}[1]{\textbf{#1}}
  235. %\newcommand{\FancyDateSize}{\normalize}
  236. %\newcommand{\FancyDateFontStyle}[1]{\textrm{#1}}
  237. \newcommand{\FancySectionSize}{\huge}
  238. \newcommand{\FancySectionFontStyle}[1]{\textbf{#1}}
  239. % Title page style
  240. \setbeamertemplate{title page}[default][left]
  241. \setbeamerfont{title}{family=\rmfamily,size=\TitleSize}
  242. \setbeamerfont{author}{size=\AuthorSize}
  243. \setbeamerfont{institute}{size=\InstituteSize}
  244. \renewcommand{\maketitle}{%
  245. \ifnum \isequal{\beamer@kenotom@fancy}{enable}=0
  246. \TitleFrameFancy
  247. \else {% once
  248. \SetBackgroundImage{media/BannerLink.png}{media/Ribon.png}{0.04}{0.4}
  249. \begin{frame}
  250. \titlepage
  251. \end{frame}
  252. } \fi
  253. }
  254. % footline
  255. %\setbeamertemplate{navigation symbols}{}
  256. %\setbeamertemplate{footlline}{\hfill \insertnavigation{0.3\textwidth}}
  257. % Frame title style
  258. \setbeamerfont{frametitle}{family=\rmfamily,size=\FrameTitleSize,series=\bfseries}
  259. \setbeamertemplate{frametitle}{
  260. \vskip0.05\paperheight
  261. \insertframetitle
  262. }
  263. %\setbeamerfont{section title}{size=\LARGE,series=\bfseries}
  264. %\setbeamerfont{subsection title}{size=\Large,series=\bfseries}
  265. % Block style
  266. \setbeamerfont{block title}{family=\rmfamily,size=\large}
  267. % Table style
  268. \renewcommand{\arraystretch}{1.2}
  269. \newcommand{\tableheadrow}{\rowcolor{TableCaptionColor}}
  270. \newcommand{\tableheadcol}[1]{{\bfseries\color{TableCaptionTextColor}#1}}
  271. \rowcolors{2}{TableRowColor1}{TableRowColor2}
  272. % Section frames
  273. \AtBeginSection[]{%
  274. \ifnum \isequal{\beamer@kenotom@fancy}{enable}=0
  275. \SectionFrameFancy
  276. \fi
  277. }
  278. %\AtBeginEnvironment{tabular}{\color{black}}
  279. \newcommand{\InsertFancyTitle}{%
  280. \FancyTitleSize
  281. \textcolor{TitleColorFancy}{\FancyTitleFontStyle{\inserttitle}}
  282. }
  283. \newcommand{\InsertFancySection}{%
  284. \FancySectionSize
  285. \textcolor{TitleColorFancy}{
  286. \ifnum \thesection<10
  287. \FancySectionFontStyle{0\thesection} \\
  288. \else
  289. \FancySectionFontStyle{\thesection} \\
  290. \fi
  291. \FancySectionFontStyle{\insertsection}
  292. }
  293. }
  294. \newcommand{\InsertFancyDate}{%
  295. \textcolor{TitleColorFancy}{\insertdate}
  296. }
  297. \newcommand{\InsertAuthorEmail}{%
  298. \AuthorEmail
  299. }
  300. \newcommand{\InsertAddress}{%
  301. \textcolor{StructureColor}{\Address}
  302. }
  303. \newcommand{\InsertTelephone}{%
  304. \textcolor{StructureColor}{\Telephone}
  305. }
  306. % Kenotom environments
  307. % =====================================================
  308. % Kenotom CoverFrame
  309. \newcommand{\TitleFrameFancy}{ {% once
  310. \SetBackgroundImage[social]{media/BannerLink.png}{media/Ribon.png}{0.12}{0.1}
  311. \setbeamercolor{navigation symbols}{fg=NavigationColor, bg=NavigationArrowsColorFancy}
  312. \addtobeamertemplate{background}{}{%
  313. \begin{tikzpicture}[overlay,remember picture]
  314. % Logo
  315. \node[anchor=center, inner sep=0pt, yshift=0.275\paperheight] at (current page.center) {%
  316. \ifnum \isequal{\beamer@kenotom@theme}{dark}=0
  317. \includegraphics[width=\paperwidth]{media/LogoWhite.png}
  318. \else
  319. \includegraphics[width=\paperwidth]{media/Logo.png}
  320. \fi
  321. };%
  322. % Car the
  323. \node[anchor=north, inner sep=0pt, yshift=0.08\paperheight] at (current page.center) {%
  324. \includegraphics[width=\paperwidth, keepaspectratio]{media/CarCover.png}
  325. };%
  326. % TitleBox center:0.58\paperheight
  327. \node[anchor=center, inner sep=0pt, yshift=0.08\paperheight] at (current page.center) {%
  328. \includegraphics[width=0.7\paperwidth, keepaspectratio]{media/FancyTitleBox.png}
  329. };%
  330. \end{tikzpicture}
  331. }
  332. \begin{frame}
  333. \setlength{\TPHorizModule}{\paperwidth}
  334. \setlength{\TPVertModule}{\paperheight}
  335. % hsize:
  336. % 0.58 = {BoxLength=7.697}/{TotlaLength=13.333}
  337. % hpos: 0.56
  338. % (1.6/2)/13.333 in = 0.06\paperwidth
  339. % 0.5+0.06 = 0.56
  340. % vpos: 0.42
  341. % 0.42 = 0.5 - 0.08
  342. \begin{textblock}{0.58}[0.5,0.5](0.56,0.42)
  343. \centering
  344. \InsertFancyTitle
  345. \end{textblock}
  346. % Date @ bottom right
  347. \begin{textblock}{0.5}[1,1](0.95,0.95)
  348. \begin{flushright}
  349. \InsertFancyDate
  350. \end{flushright}
  351. \end{textblock}
  352. \end{frame}
  353. }
  354. }
  355. % [nosubsections]
  356. % {1} : Outline Text Grey
  357. % {2} : Outline Text Green
  358. \newcommand{\OutlineFrameFancy}[3][subsections]{ {% once
  359. \SetBackgroundImage{media/BannerLink.png}{media/Ribon.png}{0.04}{0.1}
  360. \begin{frame}
  361. \begin{columns}
  362. \begin{column}{0.6\textwidth}
  363. \setlength{\TPHorizModule}{\textwidth}
  364. \setlength{\TPVertModule}{\textheight}
  365. \begin{textblock}{1}[0.5,0.5](0.5,0.35)
  366. \centering
  367. \huge \textbf {\textcolor{KenotomGrey}{#2} \textcolor{KenotomGreen}{#3}}
  368. \end{textblock}
  369. \end{column}
  370. \begin{column}{0.4\textwidth}
  371. \vspace{0.2\textheight}
  372. \ifnum \isequal{#1}{nosubsections}=0
  373. \setcounter{tocdepth}{1}
  374. \fi
  375. \tableofcontents
  376. \Vfill
  377. \end{column}
  378. \end{columns}
  379. \end{frame}
  380. }
  381. }
  382. \newcommand{\OutlineFrame}[3][subsections]{%
  383. \ifnum \isequal{\beamer@kenotom@fancy}{enable}=0
  384. \OutlineFrameFancy[#1]{#2}{#3}
  385. \else
  386. \begin{frame}{#2 #3}
  387. \vspace{0.2\textheight}
  388. \ifnum \isequal{#1}{nosubsections}=0
  389. \setcounter{tocdepth}{1}
  390. \fi
  391. \tableofcontents
  392. \Vfill
  393. \end{frame}
  394. \fi
  395. }
  396. \newcommand{\SectionFrameFancy}{ {% once
  397. \SetBackgroundImage{media/nothing.png}{media/SectionBackground.png}{0}{1.0}
  398. \setbeamercolor{navigation symbols}{fg=NavigationColorFancy, bg=NavigationArrowsColorFancy}
  399. \begin{frame}
  400. \setlength{\TPHorizModule}{\paperwidth}
  401. \setlength{\TPVertModule}{\paperheight}
  402. % hsize:
  403. % 0.4 = {AvailableLength}/{TotlaLength}
  404. % hpos: 0.9
  405. % // The line in svg ends @12in
  406. % 0.9 = {LineEnds}/{TotalLength} = 12/13.333
  407. % vpos: 0.475
  408. % // 0.025 above center
  409. % 0.475 = 0.5 - 0.025
  410. \begin{textblock}{0.4}[1,1](0.9,0.475)
  411. \begin{flushright}
  412. \InsertFancySection
  413. \end{flushright}
  414. \end{textblock}
  415. \end{frame}
  416. }
  417. }
  418. \newcommand{\BackFrame}{ {% once
  419. \SetBackgroundImage[social]{media/BannerThankYou.png}{media/Ribon.png}{0.04}{0.4}
  420. \addtobeamertemplate{background}{}{%
  421. \begin{tikzpicture}[overlay,remember picture]
  422. \node[anchor=center, inner sep=0pt, yshift=0.04\paperheight] at (current page.center) {%
  423. \includegraphics[width=\paperwidth]{media/LogoDetails.png}
  424. };%
  425. \node[anchor=south, inner sep=0pt] at (current page.south) {%
  426. \includegraphics[width=\paperwidth]{media/BottomGradient.png}
  427. };%
  428. \end{tikzpicture}
  429. }
  430. \begin{frame}
  431. \Vfill
  432. \insertauthor \\
  433. \InsertAuthorEmail \\
  434. \InsertAddress \\
  435. \InsertTelephone
  436. \vspace{0.125\paperheight}
  437. \end{frame}
  438. }
  439. }
  440. \newenvironment{tickmarks}{%
  441. \SetGraphItemize{1.6ex}{media/Tickmark.png}
  442. \begin{itemize}
  443. }{%
  444. \end{itemize}
  445. }
  446. \newenvironment{bullets}{%
  447. \SetGraphItemize{1.3em}{media/Bullet.png}
  448. \begin{itemize}
  449. }{%
  450. \end{itemize}
  451. }