You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.3KB

  1. %%
  2. %% This is file `beamerthememetropolis.sty',
  3. %% generated with the docstrip utility.
  4. %%
  5. %% The original source files were:
  6. %%
  7. %% beamerthememetropolis.dtx (with options: `package')
  8. %% ---------------------------------------------------------------------------
  9. %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
  10. %% contributors can be found at
  11. %%
  12. %% https://github.com/matze/mtheme/graphs/contributors
  13. %%
  14. %% and the original template was based on the HSRM theme by Benjamin Weiss.
  15. %%
  16. %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
  17. %% International License (https://creativecommons.org/licenses/by-sa/4.0/).
  18. %% ---------------------------------------------------------------------------
  19. \NeedsTeXFormat{LaTeX2e}
  20. \ProvidesPackage{beamerthememetropolis}
  21. [2016/03/14 v1.1 Metropolis Beamer theme]
  22. \RequirePackage{etoolbox}
  23. \RequirePackage{pgfopts}
  24. \pgfkeys{/metropolis/.cd,
  25. .search also={
  26. /metropolis/inner,
  27. /metropolis/outer,
  28. /metropolis/color,
  29. /metropolis/font,
  30. }
  31. }
  32. \pgfkeys{
  33. /metropolis/titleformat plain/.cd,
  34. .is choice,
  35. regular/.code={%
  36. \let\metropolis@plaintitleformat\@empty%
  37. \setbeamerfont{standout}{shape=\normalfont}%
  38. },
  39. smallcaps/.code={%
  40. \let\metropolis@plaintitleformat\@empty%
  41. \setbeamerfont{standout}{shape=\scshape}%
  42. },
  43. allsmallcaps/.code={%
  44. \let\metropolis@plaintitleformat\MakeLowercase%
  45. \setbeamerfont{standout}{shape=\scshape}%
  46. \PackageWarning{beamerthememetropolis}{%
  47. Be aware that titleformat plain=allsmallcaps can lead to problems%
  48. }
  49. },
  50. allcaps/.code={%
  51. \let\metropolis@plaintitleformat\MakeUppercase%
  52. \setbeamerfont{standout}{shape=\normalfont}%
  53. \PackageWarning{beamerthememetropolis}{%
  54. Be aware that titleformat plain=allcaps can lead to problems%
  55. }
  56. },
  57. }
  58. \pgfkeys{
  59. /metropolis/titleformat/.code=\pgfkeysalso{
  60. font/titleformat title=#1,
  61. font/titleformat subtitle=#1,
  62. font/titleformat section=#1,
  63. font/titleformat frame=#1,
  64. titleformat plain=#1,
  65. }
  66. }
  67. \pgfkeys{/metropolis/.cd,
  68. usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle},
  69. noslidenumbers/.code=\pgfkeysalso{outer/numbering=none},
  70. usetotalslideindicator/.code=\pgfkeysalso{outer/numbering=fraction},
  71. nosectionslide/.code=\pgfkeysalso{inner/sectionpage=none},
  72. darkcolors/.code=\pgfkeysalso{color/background=dark},
  73. blockbg/.code=\pgfkeysalso{color/block=fill, inner/block=fill},
  74. }
  75. \newcommand{\metropolis@setdefaults}{
  76. \pgfkeys{/metropolis/.cd,
  77. titleformat plain=regular,
  78. }
  79. }
  80. \useinnertheme{metropolis}
  81. \useoutertheme{metropolis}
  82. \usecolortheme{metropolis}
  83. \usefonttheme{metropolis}
  84. \AtEndPreamble{%
  85. \@ifpackageloaded{pgfplots}{%
  86. \RequirePackage{pgfplotsthemetol}
  87. }{}
  88. }
  89. \newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}}
  90. \def\metropolis@plaintitleformat#1{#1}
  91. \newcommand{\plain}[2][]{%
  92. \PackageWarning{beamerthememetropolis}{%
  93. The syntax `\plain' may be deprecated in a future version of Metropolis.
  94. Please use a frame with [standout] instead.
  95. }
  96. \begin{frame}[standout]{#1}
  97. \metropolis@plaintitleformat{#2}
  98. \end{frame}
  99. }
  100. \newcommand{\mreducelistspacing}{\vspace{-\topsep}}
  101. \metropolis@setdefaults
  102. \ProcessPgfOptions{/metropolis}
  103. \endinput
  104. %%
  105. %% End of file `beamerthememetropolis.sty'.