materialbeamer.sty 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. % MaterialBeamer-BEAMER
  2. %
  3. % Lorenzo Lancia
  4. % Based on Radboud U. Beamer by Pim Vullers
  5. %
  6. % This file may be distributed and/or modified
  7. %
  8. % 1. under the LaTeX Project Public License and/or
  9. % 2. under the GNU Public License.
  10. %
  11. % See the file doc/licenses/LICENSE for more details.
  12. \usepackage[no-math]{fontspec}
  13. \usepackage{roboto}
  14. %%%
  15. %%% Inherit definitions from existing themes (DO NOT MODIFY THESE)
  16. %%%
  17. % Layout scheme for outer elements: split header and footer
  18. %\useoutertheme{split}
  19. % Color scheme for outer elements: use background colors
  20. %\usecolortheme{whale}
  21. % Layout scheme for inner elements: rounded elements
  22. %\useinnertheme{rounded}
  23. % Color scheme for inner elements: use foreground colors
  24. %\usecolortheme{orchid}
  25. \mode<presentation>
  26. \useoutertheme[subsection=false]{smoothbars}
  27. \useinnertheme[shadow=false]{rounded}
  28. \usecolortheme{orchid}
  29. \usecolortheme{whale}
  30. \setbeamerfont{block title}{size={}}
  31. %%%
  32. %%% Tweak definitions of inner theme to match personal preferences (MODIFY THESE)
  33. %%%
  34. % Itemize items: default (triangle), circle, square, ball
  35. \setbeamertemplate{itemize items}[circle]
  36. % Enumerate items: default, circle, square, ball
  37. \setbeamertemplate{enumerate items}[circle]
  38. % Outline: default, sections numbered, subsections numbered, circle, square, ball, ball unnumbered
  39. \setbeamertemplate{sections/subsections in toc}[default]
  40. % General blocks:
  41. \setbeamertemplate{blocks}[rounded=false]
  42. % Title page:
  43. \setbeamertemplate{title page}[default][colsep=-4bp,rounded=false]
  44. % Part page:
  45. \setbeamertemplate{part page}[default][colsep=-4bp,rounded=false]
  46. % Navigation symbols:
  47. \setbeamertemplate{navigation symbols}{}
  48. % Colors
  49. %\definecolor{sapred}{RGB}{130,36,51}
  50. \definecolor{sapblue}{RGB}{0,103,120}
  51. % Material Colors
  52. \definecolor{matred}{HTML}{F44336}
  53. \definecolor{matblue}{HTML}{2196F3}
  54. \definecolor{matbluelight}{HTML}{BBDEFB}
  55. \definecolor{matbluedark}{HTML}{1976D2}
  56. \setbeamercolor{structure}{fg = matbluedark}
  57. %\setbeamercolor{frametitle}{parent=subsection in head/foot}
  58. %\setbeamercolor{frametitle right}{parent=section in head/foot}
  59. \definecolor{grey}{HTML}{51504A}
  60. \setbeamercolor{section in head/foot}{ bg=matbluedark, fg=white}
  61. \setbeamercolor{footline}{ bg=matbluedark}
  62. \setbeamercolor{title in head/foot}{bg=matbluedark, fg=white}
  63. %\pgfdeclarehorizontalshading[frametitle.bg,frametitle right.bg]{beamer@frametitleshade}{\paperheight}{%
  64. % color(0pt)=(sapblue);
  65. % color(\paperwidth)=(sapblue)}
  66. %shadowing
  67. \AtBeginDocument{
  68. \pgfdeclareverticalshading{b@matshade}{\the\paperwidth}
  69. {rgb(0pt)=(1,1,1); rgb(3pt)=(0.8,0.8,0.8);rgb(5pt)=(0.75,0.75,0.75)}
  70. }
  71. % Footline: AUTHOR | TITLE | DATE FRAMENUMBER
  72. \defbeamertemplate*{footline}{mat theme}{%
  73. \begin{beamercolorbox}[wd=\paperwidth,ht=5ex,dp=2.25ex]{title in head/foot}%
  74. \begin{minipage}[t]{0.48\textwidth}%
  75. \hskip10pt\insertshortauthor%
  76. \end{minipage}%
  77. \begin{minipage}[t]{0.48\textwidth}%
  78. %
  79. \hfill\insertframenumber{} / \inserttotalframenumber\hskip10pt\vfill%
  80. %
  81. \end{minipage}%
  82. \end{beamercolorbox}%
  83. \vfill%
  84. }
  85. \usepackage{tcolorbox}
  86. \tcbuselibrary{skins} % preamble
  87. \usepackage{tikz} %
  88. \usetikzlibrary{shadows,shadings} %
  89. \tikzset{myshadow/.style={ % custom shadow with tikz
  90. opacity=.16,
  91. shadow xshift=0.01,
  92. shadow yshift=-0.02,
  93. shade,
  94. shading=axis,
  95. shading angle=230}
  96. }
  97. \tcbset{ % set a custom tcolorbox
  98. skin=enhanced, % enables use of shadows
  99. frame style={fill=matblue,drop shadow={myshadow}}, % sets the frame color and the shadow properties
  100. bottom=5pt, % distance between the body text and the bottom frame
  101. top=5pt, % distance between the body text and the top frame
  102. boxrule=0mm, % frame width
  103. bottomtitle=2mm, % distance between the title text and the bottom title frame
  104. toptitle=2mm, % distance between the title text and the top title frame
  105. lefttitle=10pt % title text left margin
  106. }
  107. \setbeamercolor{block body}{bg=matbluelight, fg=black}
  108. \defbeamertemplate*{block begin}{mat theme}
  109. {
  110. \begin{tcolorbox}[title=\large \insertblocktitle]
  111. }
  112. \defbeamertemplate*{block end}{mat theme}
  113. {\end{tcolorbox}\vskip\smallskipamount}
  114. \defbeamertemplate*{headline}{mat theme}{%
  115. \leavevmode%
  116. \begin{beamercolorbox}[wd=\paperwidth]{section in head/foot}%
  117. \vskip5pt \hskip10pt \insertshorttitle \hfill \robotocondensed
  118. \insertsectionnavigationhorizontal{.8\textwidth}{\hskip0pt plus1filll}{}
  119. \vskip5pt%
  120. \ifx\insertframesubtitle\@empty%
  121. \pgfuseshading{b@matshade}
  122. \fi
  123. \end{beamercolorbox}%
  124. %
  125. %\begin{beamercolorbox}[wd=.4\paperwidth,ht=\@tempdimb,right]{subsection in head/foot}%
  126. % \vbox to\@tempdimb{\vfil\vfil\textbf{\footnotesize\insertshortinstitute~~}\vfil}%
  127. %\end{beamercolorbox}%
  128. }
  129. \setbeamerfont{frametitle}{size=\normalsize, parent=structure}
  130. \defbeamertemplate*{frametitle}{mat theme}{%
  131. \nointerlineskip%
  132. \setbeamercolor{titlebar}{fg=white,bg=matblue}%
  133. \begin{beamercolorbox}[wd=\paperwidth, ht=5ex]{titlebar}%
  134. \hskip10pt \robotocondensed\insertframetitle\vfill%
  135. \pgfuseshading{b@matshade}%
  136. \end{beamercolorbox}
  137. }
  138. \defbeamertemplate*{title page}{ru theme}[1][]
  139. {
  140. \nointerlineskip
  141. \usebeamerfont{subtitle}
  142. %\setbeamercolor{thead}{fg=white,bg=sapred}
  143. \begin{beamercolorbox}[sep=1em,wd=\paperwidth, ht=2.5cm, dp=0.5cm,right ]{thead}
  144. \usebeamerfont{author} \insertauthor\par
  145. \usebeamerfont{institute}\robotocondensed
  146. \insertinstitute\par
  147. \end{beamercolorbox}
  148. \nointerlineskip
  149. \setbeamercolor{postit}{fg=white, bg=matblue}
  150. \begin{beamercolorbox}[sep=1em,wd=\paperwidth,ht=3cm,dp=3cm]{postit}
  151. \begin{minipage}[t]{0.6\textwidth}
  152. \usebeamerfont{title} {\Huge
  153. \inserttitle} \par
  154. \usebeamerfont{subtitle} {\robotocondensed
  155. \insertsubtitle}
  156. \end{minipage}%
  157. \begin{minipage}[t]{0.4\textwidth}
  158. \inserttitlegraphic
  159. \end{minipage}
  160. \end{beamercolorbox}
  161. %\setbeamercolor{postit}{fg=sapred}
  162. }