From 19dcbaba40e0ca452da03029ed29d2f207a4b4a2 Mon Sep 17 00:00:00 2001 From: Ross Churchley Date: Mon, 13 Jun 2016 19:42:38 -0700 Subject: [PATCH 1/4] Use sectiontitleformat for subsection title Fix #212 --- source/beamerfontthememetropolis.dtx | 6 ++++++ source/beamerinnerthememetropolis.dtx | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/source/beamerfontthememetropolis.dtx b/source/beamerfontthememetropolis.dtx index 0d707d5..9888f05 100644 --- a/source/beamerfontthememetropolis.dtx +++ b/source/beamerfontthememetropolis.dtx @@ -369,6 +369,12 @@ \metropolis@sectiontitleformat{#1}}}} {} {\PackageError{beamerfontthememetropolis}{Patching section title failed}} +\patchcmd{\beamer@subsection} + {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} + {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{% + \metropolis@sectiontitleformat{#1}}}} + {} + {\PackageError{beamerfontthememetropolis}{Patching section title failed}} % \end{macrocode} % % Similarly, to make the |\MakeLowercase| and |\MakeUppercase| macros work in diff --git a/source/beamerinnerthememetropolis.dtx b/source/beamerinnerthememetropolis.dtx index f312d0a..6b89f34 100644 --- a/source/beamerinnerthememetropolis.dtx +++ b/source/beamerinnerthememetropolis.dtx @@ -65,7 +65,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{sectionpage} +% \begin{macro}{subsectionpage} % Optionally add a slide marking the beginning of each subsection. % \begin{macrocode} \pgfkeys{ @@ -251,10 +251,10 @@ \usebeamercolor[fg]{section title} \usebeamerfont{section title} \insertsectionhead\par - \ifx\insertsubsection\@empty\else + \ifx\insertsubsectionhead\@empty\else \usebeamercolor[fg]{subsection title} \usebeamerfont{subsection title} - \insertsubsection + \insertsubsectionhead \fi \end{center} } @@ -267,10 +267,10 @@ \insertsectionhead\\[-1ex] \usebeamertemplate*{progress bar in section page} \par - \ifx\insertsubsection\@empty\else% + \ifx\insertsubsectionhead\@empty\else% \usebeamercolor[fg]{subsection title}% \usebeamerfont{subsection title}% - \insertsubsection + \insertsubsectionhead \fi \end{minipage} \par From 41dc7a7212fc13f17ae411498a774f5b8e8e5c03 Mon Sep 17 00:00:00 2001 From: Ross Churchley Date: Mon, 13 Jun 2016 19:55:11 -0700 Subject: [PATCH 2/4] Restore `make clean` functionality 80a513f3 escaped directory and file names to avoid removing unrelated directories due to spaces in path names. However, this breaks clean-cache (since the wildcard * should not be escaped) and clean-sty (since the spaces in $(PACKAGE_STY) actually do indicate different files). This change reverts the change to clean-sty and provides a workaround to clean-cache to avoid wildcards. --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index cef3def..bd1e6c9 100644 --- a/Makefile +++ b/Makefile @@ -44,10 +44,10 @@ uninstall: @rmdir "$(DOC_DIR)" clean-cache: - @rm -f "$(CACHE_DIR)/*" + @rm -rf "$(CACHE_DIR)" clean-sty: - @rm -f "$(PACKAGE_STY)" + @rm -f $(PACKAGE_STY) ctan: $(CTAN_CONTENT) ctan-version @tar --transform "s@\(.*\)@metropolis/\1@" -cf metropolis-$(shell date "+%Y-%m-%d").tar.gz $(CTAN_CONTENT) @@ -58,15 +58,15 @@ ctan-version: $(CACHE_DIR): @mkdir -p $(CACHE_DIR) -$(PACKAGE_STY): $(PACKAGE_SRC) $(INS) | $(CACHE_DIR) clean-cache +$(PACKAGE_STY): $(PACKAGE_SRC) $(INS) | clean-cache $(CACHE_DIR) @cd $(dir $(INS)) && latex -output-directory=$(CACHE_DIR) $(notdir $(INS)) @cp $(addprefix $(CACHE_DIR)/,$(PACKAGE_STY)) . -$(DOC_PDF): $(DOC_SRC) $(PACKAGE_STY) | $(CACHE_DIR) clean-cache +$(DOC_PDF): $(DOC_SRC) $(PACKAGE_STY) | clean-cache $(CACHE_DIR) @cd $(dir $(DOC_SRC)) && $(COMPILE_TEX) $(notdir $(DOC_SRC)) @cp $(CACHE_DIR)/$(notdir $(DOC_PDF)) $(DOC_PDF) -$(DEMO_PDF): $(DEMO_SRC) $(PACKAGE_STY) | $(CACHE_DIR) clean-cache +$(DEMO_PDF): $(DEMO_SRC) $(PACKAGE_STY) | clean-cache $(CACHE_DIR) @cd $(dir $(DEMO_SRC)) && $(COMPILE_TEX) $(notdir $(DEMO_SRC)) @cp $(CACHE_DIR)/$(notdir $(DEMO_PDF)) $(DEMO_PDF) From 6f76e317b0cfbc88a94c3490bf8e44b457ed247a Mon Sep 17 00:00:00 2001 From: Ross Churchley Date: Mon, 13 Jun 2016 23:28:04 -0700 Subject: [PATCH 3/4] Add to docs tip for standout frames with org-mode Fix #203 --- doc/metropolistheme.dtx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/metropolistheme.dtx b/doc/metropolistheme.dtx index 4baf260..6bc0dff 100644 --- a/doc/metropolistheme.dtx +++ b/doc/metropolistheme.dtx @@ -630,6 +630,39 @@ on each slide. \end{lstlisting} +\subsection{Standout frames with labels} + +Because the |standout| frame option creates a group to restrict the colour +change to a single slide, labels defined after calling |standout| will stay +local to the group. In other words, the following may result in a ``label undefined'' error. + +\begin{lstlisting} +\begin{frame}[standout, label=conclusion]{Conclusion} + Awesome slide +\end{frame} +\end{lstlisting} + +To fix this problem, change the order of the keys in the frame. + +\begin{lstlisting} +\begin{frame}[label=conclusion, standout]{Conclusion} + Awesome slide +\end{frame} +\end{lstlisting} + +This error can be unwittingly triggered if you export your slides from Emacs +Org mode, which automatically adds labels after frame options. Alex Branham +\href{https://github.com/matze/mtheme/issues/203}{offers} the following +solution for Org mode users, using |org-set-property|. + +\begin{lstlisting} +* Start of a frame + :PROPERTIES: + :BEAMER_opt: label=conclusion,standout + :END: +\end{lstlisting} + + \section{License} \themename is licensed under a From 79485c78ae5a2c4fc524435805c3d72c47059d28 Mon Sep 17 00:00:00 2001 From: Ross Churchley Date: Mon, 13 Jun 2016 23:28:40 -0700 Subject: [PATCH 4/4] Add to docs known issue about standout and Pandoc --- doc/metropolistheme.dtx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/metropolistheme.dtx b/doc/metropolistheme.dtx index 6bc0dff..4c27306 100644 --- a/doc/metropolistheme.dtx +++ b/doc/metropolistheme.dtx @@ -663,6 +663,16 @@ solution for Org mode users, using |org-set-property|. \end{lstlisting} +\subsection{Standout frames with Pandoc} + +It is not currently possible to create standout frames if you create your +presentation with Pandoc. This is because Pandoc only supports a specific list +of frame attributes --- namely, |allowdisplaybreaks|, |allowframebreaks|, |b|, +|c|, |t|, |environment|, |label|, |plain|, and |shrink|. In other words, +Pandoc will ignore the attribute |{.standout}| instead of adding the option to +the frame. + + \section{License} \themename is licensed under a