Revert titleformat hyphenation and add aliases

This commit is contained in:
Ross Churchley 2016-02-08 09:25:06 -08:00
parent 069871f920
commit 177ebb7f4a
3 changed files with 46 additions and 32 deletions

View File

@ -65,7 +65,7 @@
\end{frame} \end{frame}
{ {
\metroset{titleformat-frame=smallcaps} \metroset{titleformat frame=smallcaps}
\begin{frame}{Small caps} \begin{frame}{Small caps}
This frame uses the \texttt{smallcaps} titleformat. This frame uses the \texttt{smallcaps} titleformat.
@ -76,7 +76,7 @@
} }
{ {
\metroset{titleformat-frame=allsmallcaps} \metroset{titleformat frame=allsmallcaps}
\begin{frame}{All small caps} \begin{frame}{All small caps}
This frame uses the \texttt{allsmallcaps} titleformat. This frame uses the \texttt{allsmallcaps} titleformat.
@ -89,7 +89,7 @@
} }
{ {
\metroset{titleformat-frame=allcaps} \metroset{titleformat frame=allcaps}
\begin{frame}{All caps} \begin{frame}{All caps}
This frame uses the \texttt{allcaps} titleformat. This frame uses the \texttt{allcaps} titleformat.

View File

@ -174,11 +174,11 @@
% %
% \subsubsection{Title format options} % \subsubsection{Title format options}
% %
% \begin{macro}{titleformat-title} % \begin{macro}{titleformat title}
% Controls the format of the title. % Controls the format of the title.
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/metropolis/font/titleformat-title/.cd, /metropolis/font/titleformat title/.cd,
.is choice, .is choice,
regular/.code={% regular/.code={%
\let\metropolis@titleformat\@empty% \let\metropolis@titleformat\@empty%
@ -192,25 +192,25 @@
\let\metropolis@titleformat\lowercase% \let\metropolis@titleformat\lowercase%
\setbeamerfont{title}{shape=\scshape}% \setbeamerfont{title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-title=allsmallcaps can lead to problems% Be aware that titleformat title=allsmallcaps can lead to problems%
} }
}, },
allcaps/.code={% allcaps/.code={%
\let\metropolis@titleformat\uppercase% \let\metropolis@titleformat\uppercase%
\setbeamerfont{title}{shape=\normalfont} \setbeamerfont{title}{shape=\normalfont}
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-title=allcaps can lead to problems% Be aware that titleformat title=allcaps can lead to problems%
} }
}, },
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
% \begin{macro}{titleformat-subtitle} % \begin{macro}{titleformat subtitle}
% Control the format of the subtitle. % Control the format of the subtitle.
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/metropolis/font/titleformat-subtitle/.cd, /metropolis/font/titleformat subtitle/.cd,
.is choice, .is choice,
regular/.code={% regular/.code={%
\let\metropolis@subtitleformat\@empty% \let\metropolis@subtitleformat\@empty%
@ -224,25 +224,25 @@
\let\metropolis@subtitleformat\lowercase% \let\metropolis@subtitleformat\lowercase%
\setbeamerfont{subtitle}{shape=\scshape}% \setbeamerfont{subtitle}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-subtitle=allsmallcaps can lead to problems% Be aware that titleformat subtitle=allsmallcaps can lead to problems%
} }
}, },
allcaps/.code={% allcaps/.code={%
\let\metropolis@subtitleformat\uppercase% \let\metropolis@subtitleformat\uppercase%
\setbeamerfont{subtitle}{shape=\normalfont}% \setbeamerfont{subtitle}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-subtitle=allcaps can lead to problems% Be aware that titleformat subtitle=allcaps can lead to problems%
} }
}, },
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
% \begin{macro}{titleformat-section} % \begin{macro}{titleformat section}
% Controls the format of the section title. % Controls the format of the section title.
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/metropolis/font/titleformat-section/.cd, /metropolis/font/titleformat section/.cd,
.is choice, .is choice,
regular/.code={% regular/.code={%
\let\metropolis@sectiontitleformat\@empty% \let\metropolis@sectiontitleformat\@empty%
@ -256,14 +256,14 @@
\let\metropolis@sectiontitleformat\MakeLowercase% \let\metropolis@sectiontitleformat\MakeLowercase%
\setbeamerfont{section title}{shape=\scshape}% \setbeamerfont{section title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-section=allsmallcaps can lead to problems% Be aware that titleformat section=allsmallcaps can lead to problems%
} }
}, },
allcaps/.code={% allcaps/.code={%
\let\metropolis@sectiontitleformat\MakeUppercase% \let\metropolis@sectiontitleformat\MakeUppercase%
\setbeamerfont{section title}{shape=\normalfont}% \setbeamerfont{section title}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-section=allcaps can lead to problems% Be aware that titleformat section=allcaps can lead to problems%
} }
}, },
} }
@ -274,7 +274,7 @@
% Control the format of the frame title. % Control the format of the frame title.
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/metropolis/font/titleformat-frame/.cd, /metropolis/font/titleformat frame/.cd,
.is choice, .is choice,
regular/.code={% regular/.code={%
\let\metropolis@frametitleformat\@empty% \let\metropolis@frametitleformat\@empty%
@ -288,29 +288,43 @@
\let\metropolis@frametitleformat\MakeLowercase% \let\metropolis@frametitleformat\MakeLowercase%
\setbeamerfont{frametitle}{shape=\scshape}% \setbeamerfont{frametitle}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-frame=allsmallcaps can lead to problems% Be aware that titleformat frame=allsmallcaps can lead to problems%
} }
}, },
allcaps/.code={% allcaps/.code={%
\let\metropolis@frametitleformat\MakeUppercase% \let\metropolis@frametitleformat\MakeUppercase%
\setbeamerfont{frametitle}{shape=\normalfont} \setbeamerfont{frametitle}{shape=\normalfont}
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-frame=allcaps can lead to problems% Be aware that titleformat frame=allcaps can lead to problems%
} }
}, },
} }
% \end{macrocode} % \end{macrocode}
% \end{macro} % \end{macro}
% %
% \begin{macro}{titleformat aliases}
% Allows |titleformat title| et al. to be used in the |\usetheme|
% declaration, where \LaTeX{} automatically removes all spaces.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/.cd,
titleformattitle/.code=\pgfkeysalso{titleformat title=#1},
titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1},
titleformatsection/.code=\pgfkeysalso{titleformat section=#1},
titleformatframe/.code=\pgfkeysalso{titleformat frame=#1},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\metropolis@font@setdefaults} % \begin{macro}{\metropolis@font@setdefaults}
% Sets default values for font theme options. % Sets default values for font theme options.
% \begin{macrocode} % \begin{macrocode}
\newcommand{\metropolis@font@setdefaults}{ \newcommand{\metropolis@font@setdefaults}{
\pgfkeys{/metropolis/font/.cd, \pgfkeys{/metropolis/font/.cd,
titleformat-title=regular, titleformat title=regular,
titleformat-subtitle=regular, titleformat subtitle=regular,
titleformat-section=regular, titleformat section=regular,
titleformat-frame=regular, titleformat frame=regular,
} }
} }
% \end{macrocode} % \end{macrocode}

View File

@ -69,11 +69,11 @@
} }
% \end{macrocode} % \end{macrocode}
% %
% \begin{macro}{titleformat-plain} % \begin{macro}{titleformat plain}
% Controls the formatting of the text on standout ``plain'' frames. % Controls the formatting of the text on standout ``plain'' frames.
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/metropolis/titleformat-plain/.cd, /metropolis/titleformat plain/.cd,
.is choice, .is choice,
regular/.code={% regular/.code={%
\let\metropolis@plaintitleformat\@empty% \let\metropolis@plaintitleformat\@empty%
@ -87,14 +87,14 @@
\let\metropolis@plaintitleformat\MakeLowercase% \let\metropolis@plaintitleformat\MakeLowercase%
\setbeamerfont{plain title}{shape=\scshape}% \setbeamerfont{plain title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-plain=allsmallcaps can lead to problems% Be aware that titleformat plain=allsmallcaps can lead to problems%
} }
}, },
allcaps/.code={% allcaps/.code={%
\let\metropolis@plaintitleformat\MakeUppercase% \let\metropolis@plaintitleformat\MakeUppercase%
\setbeamerfont{plain title}{shape=\normalfont}% \setbeamerfont{plain title}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{% \PackageWarning{beamerthememetropolis}{%
Be aware that titleformat-plain=allcaps can lead to problems% Be aware that titleformat plain=allcaps can lead to problems%
} }
}, },
} }
@ -107,11 +107,11 @@
% \begin{macrocode} % \begin{macrocode}
\pgfkeys{ \pgfkeys{
/metropolis/titleformat/.code=\pgfkeysalso{ /metropolis/titleformat/.code=\pgfkeysalso{
font/titleformat-title=#1, font/titleformat title=#1,
font/titleformat-subtitle=#1, font/titleformat subtitle=#1,
font/titleformat-section=#1, font/titleformat section=#1,
font/titleformat-frame=#1, font/titleformat frame=#1,
titleformat-plain=#1, titleformat plain=#1,
} }
} }
% \end{macrocode} % \end{macrocode}
@ -136,7 +136,7 @@
% \begin{macrocode} % \begin{macrocode}
\newcommand{\metropolis@setdefaults}{ \newcommand{\metropolis@setdefaults}{
\pgfkeys{/metropolis/.cd, \pgfkeys{/metropolis/.cd,
titleformat-plain=regular, titleformat plain=regular,
} }
} }
% \end{macrocode} % \end{macrocode}