mirror of https://github.com/matze/mtheme.git
Compare commits
64 Commits
Author | SHA1 | Date |
---|---|---|
Matthias Vogelgesang | 2fa6084b9d | |
Matthias Vogelgesang | 338eeb83fb | |
pacien | a7fad7f1d8 | |
pacien | 1eef71d75a | |
Matthias Vogelgesang | 3e1381f83c | |
Bisaloo | 9b4afd548f | |
Matthias Vogelgesang | 1a42fa1939 | |
Jeff Zaremba | 963203c3a3 | |
Matthias Vogelgesang | 2cb6e1ec83 | |
Matthias Vogelgesang | 98ba2b330f | |
Matthias Vogelgesang | f5690f92fb | |
Matthias Vogelgesang | 485de66566 | |
Joseph Wright | 762bc408cc | |
Matthias Vogelgesang | 796b659809 | |
Vijay Kartik | 671aa01b99 | |
Matthias Vogelgesang | 28e70c1e67 | |
Vijay Kartik | b4b6c001ad | |
Matthias Vogelgesang | 36ef780a7c | |
Matthias Vogelgesang | 7b1eed33b9 | |
Yudai NAKATA | ca2c9ed9fe | |
Matthias Vogelgesang | c13b01f948 | |
Matthias Vogelgesang | dc7ae3d632 | |
Matthias Vogelgesang | 79ea6303ca | |
Matthias Vogelgesang | 10519e3de5 | |
Matthias Vogelgesang | 02980b2c48 | |
Matthias Vogelgesang | 9690030ef9 | |
Joseph Wright | 1095611cdb | |
Max H. Gerlach | c7cd8ad9e8 | |
Matthias Vogelgesang | 8858c63bcd | |
Joseph Wright | a7339544c3 | |
Matthias Vogelgesang | d71d0789b0 | |
Matthias Vogelgesang | cdb624d0a8 | |
Joseph Wright | 30d207d696 | |
Joseph Wright | 2a1fcb7ea9 | |
Joseph Wright | 32347cceba | |
Matthias Vogelgesang | caa3387782 | |
Matthias Vogelgesang | 68866fb3e3 | |
Matthias Vogelgesang | 4ede22dc48 | |
Matthias Vogelgesang | 388dee8248 | |
Matthias Vogelgesang | 72fddbd72b | |
Joshua Gleitze | 2a0d5cf12e | |
Matthias Vogelgesang | 33e6756189 | |
Benjamin Weiss | 20a8e1edf4 | |
Matthias Vogelgesang | b1eead2f8b | |
Yudai NAKATA | f88717ee6a | |
Matthias Vogelgesang | bb30b7e1f9 | |
Ross Churchley | 5040b2ab97 | |
Matthias Vogelgesang | 9cdd61bb05 | |
arijitlaik | 44a40e694f | |
arijitlaik | 539f6f4adb | |
Matthias Vogelgesang | 287b554d3d | |
Matthias Vogelgesang | 2805aa1583 | |
Matthias Vogelgesang | ebf00c8a1b | |
Matthias Vogelgesang | bd55d89a03 | |
Ross Churchley | 79485c78ae | |
Ross Churchley | 6f76e317b0 | |
Ross Churchley | 41dc7a7212 | |
Ross Churchley | 19dcbaba40 | |
Matthias Vogelgesang | 5107b2383e | |
Matthias Vogelgesang | 70fb078319 | |
Matthias Vogelgesang | fe9c932696 | |
Ross Churchley | 8eb8c82d7e | |
Matthias Vogelgesang | 73d94ddd81 | |
Ermin Wang | 3b08e613fe |
17
Makefile
17
Makefile
|
@ -1,3 +1,4 @@
|
|||
MAKEFLAGS := -j 1
|
||||
INS = source/beamerthememetropolis.ins
|
||||
PACKAGE_SRC = $(wildcard source/*.dtx)
|
||||
PACKAGE_STY = $(notdir $(PACKAGE_SRC:%.dtx=%.sty))
|
||||
|
@ -9,8 +10,8 @@ DOC_PDF = doc/metropolistheme.pdf
|
|||
CTAN_CONTENT = README.md $(INS) $(PACKAGE_SRC) $(DOC_SRC) $(DOC_PDF) $(DEMO_SRC) $(DEMO_PDF)
|
||||
|
||||
DESTDIR ?= $(shell kpsewhich -var-value=TEXMFHOME)
|
||||
INSTALL_DIR = $(DESTDIR)/tex/latex/metropolis
|
||||
DOC_DIR = $(DESTDIR)/doc/latex/metropolis
|
||||
INSTALL_DIR = $(DESTDIR)/tex/latex/metropolis
|
||||
DOC_DIR = $(DESTDIR)/doc/latex/metropolis
|
||||
CACHE_DIR := $(shell pwd)/.latex-cache
|
||||
|
||||
COMPILE_TEX := latexmk -xelatex -output-directory=$(CACHE_DIR)
|
||||
|
@ -44,10 +45,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 +59,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)
|
||||
|
||||
|
@ -74,7 +75,7 @@ docker-run: docker-build
|
|||
docker run --rm=true --name $(DOCKER_CONTAINER) -i -t -v `pwd`:/data $(DOCKER_IMAGE) make
|
||||
|
||||
docker-build:
|
||||
docker build -t $(DOCKER_IMAGE) .
|
||||
docker build -t $(DOCKER_IMAGE) docker
|
||||
|
||||
docker-rm:
|
||||
docker rm $(DOCKER_CONTAINER)
|
||||
|
|
18
NEWS
18
NEWS
|
@ -1,3 +1,21 @@
|
|||
Overview of changes in Metropolis 1.2
|
||||
=====================================
|
||||
|
||||
* New features:
|
||||
|
||||
- Added a highcontrast color theme
|
||||
|
||||
* Bugs fixed:
|
||||
|
||||
- Fixed issues with Beamer 3.37+
|
||||
- Fix the "Overfull \hbox (0.4pt too wide)" bug when using progress bar.
|
||||
- Only load fontspec if it’s not loaded
|
||||
- Fix problem w/ inverting colours mid-presentation
|
||||
- Use sectiontitleformat for subsection title
|
||||
- Fix empty second line in certain frametitles
|
||||
- Fixed #206, #214, #216
|
||||
|
||||
|
||||
Overview of changes in Metropolis 1.1
|
||||
=====================================
|
||||
|
||||
|
|
11
README.md
11
README.md
|
@ -29,18 +29,18 @@ of your TeX distribution. Metropolis is on [CTAN][] since December
|
|||
Installing Metropolis from source, like any Beamer theme, involves four easy
|
||||
steps:
|
||||
|
||||
1. **Download the source** with a `git clone` of the [Metropolis repository](https://github.com/matze/mtheme) or as a [zip archive](https://github.com/matze/mtheme/archive/master.zip) of the latest development version.
|
||||
|
||||
1. **Download the source** with a `git clone` of the [Metropolis repository](https://github.com/matze/mtheme)
|
||||
or as a [zip archive](https://github.com/matze/mtheme/archive/master.zip) of
|
||||
the latest development version.
|
||||
2. **Compile the style files** by running `make sty` inside the downloaded
|
||||
directory. (Or run LaTeX directly on `source/metropolistheme.ins`.)
|
||||
|
||||
3. **Move the resulting `*.sty` files** to the folder containing your
|
||||
presentation. To use Metropolis with many presentations, run `make install`
|
||||
or move the `*.sty` files to a folder in your TeX path instead (might require
|
||||
`sudo` rights).
|
||||
|
||||
4. **Use the theme for your presentation** by declaring `\usetheme{metropolis}` in
|
||||
the preamble of your Beamer document.
|
||||
5. **For best results** install Mozilla's [Fira Sans](https://github.com/bBoxType/FiraSans).
|
||||
|
||||
|
||||
## Usage
|
||||
|
@ -66,6 +66,9 @@ Metropolis.
|
|||
|
||||
Detailed information on using Metropolis can be found in the [manual][].
|
||||
|
||||
For an alternative dark color theme, please have a look at Ross Churchley's
|
||||
excellent [owl](https://github.com/rchurchley/beamercolortheme-owl) theme.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -52,15 +52,15 @@
|
|||
for which \themename provides a nice progress indicator \ldots
|
||||
\end{frame}
|
||||
|
||||
\section{Titleformats}
|
||||
\section{Title formats}
|
||||
|
||||
\begin{frame}{Metropolis titleformats}
|
||||
\themename supports 4 different titleformats:
|
||||
\begin{frame}{Metropolis title formats}
|
||||
\themename supports 4 different title formats:
|
||||
\begin{itemize}
|
||||
\item Regular
|
||||
\item \textsc{Smallcaps}
|
||||
\item \textsc{allsmallcaps}
|
||||
\item ALLCAPS
|
||||
\item \textsc{Small caps}
|
||||
\item \textsc{all small caps}
|
||||
\item ALL CAPS
|
||||
\end{itemize}
|
||||
They can either be set at once for every title type or individually.
|
||||
\end{frame}
|
||||
|
@ -68,10 +68,10 @@
|
|||
{
|
||||
\metroset{titleformat frame=smallcaps}
|
||||
\begin{frame}{Small caps}
|
||||
This frame uses the \texttt{smallcaps} titleformat.
|
||||
This frame uses the \texttt{smallcaps} title format.
|
||||
|
||||
\begin{alertblock}{Potential Problems}
|
||||
Be aware, that not every font supports small caps. If for example you typeset your presentation with pdfTeX and the Computer Modern Sans Serif font, every text in smallcaps will be typeset with the Computer Modern Serif font instead.
|
||||
Be aware that not every font supports small caps. If for example you typeset your presentation with pdfTeX and the Computer Modern Sans Serif font, every text in small caps will be typeset with the Computer Modern Serif font instead.
|
||||
\end{alertblock}
|
||||
\end{frame}
|
||||
}
|
||||
|
@ -79,12 +79,12 @@
|
|||
{
|
||||
\metroset{titleformat frame=allsmallcaps}
|
||||
\begin{frame}{All small caps}
|
||||
This frame uses the \texttt{allsmallcaps} titleformat.
|
||||
This frame uses the \texttt{allsmallcaps} title format.
|
||||
|
||||
\begin{alertblock}{Potential problems}
|
||||
As this titleformat also uses smallcaps you face the same problems as with the \texttt{smallcaps} titleformat. Additionally this format can cause some other problems. Please refer to the documentation if you consider using it.
|
||||
As this title format also uses small caps you face the same problems as with the \texttt{smallcaps} title format. Additionally this format can cause some other problems. Please refer to the documentation if you consider using it.
|
||||
|
||||
As a rule of thumb: Just use it for plaintext-only titles.
|
||||
As a rule of thumb: just use it for plaintext-only titles.
|
||||
\end{alertblock}
|
||||
\end{frame}
|
||||
}
|
||||
|
@ -92,10 +92,10 @@
|
|||
{
|
||||
\metroset{titleformat frame=allcaps}
|
||||
\begin{frame}{All caps}
|
||||
This frame uses the \texttt{allcaps} titleformat.
|
||||
This frame uses the \texttt{allcaps} title format.
|
||||
|
||||
\begin{alertblock}{Potential Problems}
|
||||
This titleformat is not as problematic as the \texttt{allsmallcaps} format, but basically suffers from the same deficiencies. So please have a look at the documentation if you want to use it.
|
||||
This title format is not as problematic as the \texttt{allsmallcaps} format, but basically suffers from the same deficiencies. So please have a look at the documentation if you want to use it.
|
||||
\end{alertblock}
|
||||
\end{frame}
|
||||
}
|
||||
|
@ -117,10 +117,10 @@ or show \textbf{bold} results.\end{verbatim}
|
|||
\begin{itemize}
|
||||
\item Regular
|
||||
\item \textit{Italic}
|
||||
\item \textsc{SmallCaps}
|
||||
\item \textsc{Small Caps}
|
||||
\item \textbf{Bold}
|
||||
\item \textbf{\textit{Bold Italic}}
|
||||
\item \textbf{\textsc{Bold SmallCaps}}
|
||||
\item \textbf{\textsc{Bold Small Caps}}
|
||||
\item \texttt{Monospace}
|
||||
\item \texttt{\textit{Monospace Italic}}
|
||||
\item \texttt{\textbf{Monospace Bold}}
|
||||
|
@ -133,7 +133,7 @@ or show \textbf{bold} results.\end{verbatim}
|
|||
\column{0.33\textwidth}
|
||||
Items
|
||||
\begin{itemize}
|
||||
\item Milk \item Eggs \item Potatos
|
||||
\item Milk \item Eggs \item Potatoes
|
||||
\end{itemize}
|
||||
|
||||
\column{0.33\textwidth}
|
||||
|
@ -185,7 +185,7 @@ or show \textbf{bold} results.\end{verbatim}
|
|||
\begin{frame}{Tables}
|
||||
\begin{table}
|
||||
\caption{Largest cities in the world (source: Wikipedia)}
|
||||
\begin{tabular}{lr}
|
||||
\begin{tabular}{@{} lr @{}}
|
||||
\toprule
|
||||
City & Population\\
|
||||
\midrule
|
||||
|
|
|
@ -400,7 +400,7 @@ The list of options is structured as shown in the following example.
|
|||
|
||||
\DescribeMacro{titleformat title}
|
||||
\DescribeMacro{titleformat subtitle}
|
||||
\DescribeMacro{titeformat section}
|
||||
\DescribeMacro{titleformat section}
|
||||
\DescribeOption{titleformat frame}%
|
||||
{regular, smallcaps, allsmallcaps, allcaps}%
|
||||
{regular}{
|
||||
|
@ -436,6 +436,13 @@ of \themename specific colors, which can also be redefined to your liking.
|
|||
\setbeamercolor{progress bar in section page}{ ... }
|
||||
\end{lstlisting}
|
||||
|
||||
For low-light situations \themename it might be helpful to use the
|
||||
|metropolis-highcontrast| color theme. It is enabled like any other color theme:
|
||||
|
||||
\begin{lstlisting}
|
||||
\usecolortheme{metropolis-highcontrast}
|
||||
\end{lstlisting}
|
||||
|
||||
|
||||
\subsection{Font Customization}
|
||||
|
||||
|
@ -521,7 +528,7 @@ possible as well as from black and white, can be discerned item under different
|
|||
lighting and display environments and by color-blind viewers, while matching
|
||||
well together.
|
||||
|
||||
In a \href{https://personal.sron.nl/~pault/colourschemes.pdf}{technical note}
|
||||
In a \href{https://personal.sron.nl/~pault/data/colourschemes.pdf}{technical note}
|
||||
for SRON, Paul Tol proposed a palette of colors satisfying these constraints.
|
||||
The sub-package |pgfplotsthemetol| defines palettes for |pgfplots| charts
|
||||
based on Tol's work.
|
||||
|
@ -630,6 +637,46 @@ 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}
|
||||
|
||||
|
||||
\subsection{Standout frames with Pandoc}
|
||||
|
||||
With Pandoc versions prior 1.17.2 it was not possible to create standout frames
|
||||
because Pandoc only supported a specific list of frame attributes thus ignoring
|
||||
additional attributes such as |{.standout}|.
|
||||
|
||||
|
||||
\section{License}
|
||||
|
||||
\themename is licensed under a
|
||||
|
|
|
@ -5,16 +5,26 @@
|
|||
cd /tmp
|
||||
|
||||
# install unzip just in case the user doesn't already have it.
|
||||
sudo apt-get install unzip -y
|
||||
wget "http://dev.carrois.com/wordpress/wp-content/uploads/downloads/fira_3_1/FiraSans3106.zip"
|
||||
wget "http://dev.carrois.com/wordpress/wp-content/uploads/downloads/fira_3_1/FiraMono3106.zip"
|
||||
apt-get install unzip -y
|
||||
|
||||
unzip FiraMono3106.zip
|
||||
unzip FiraSans3106.zip
|
||||
# Fonts also available at: https://github.com/bBoxType/FiraSans
|
||||
wget "https://bboxtype.com/downloads/Fira/Download_Folder_FiraSans_4301.zip"
|
||||
wget "https://bboxtype.com/downloads/Fira/Fira_Mono_3_2.zip"
|
||||
|
||||
unzip Download_Folder_FiraSans_4301.zip
|
||||
unzip Fira_Mono_3_2.zip
|
||||
|
||||
sudo mkdir -p /usr/share/fonts/truetype/FiraSans
|
||||
sudo mkdir -p /usr/share/fonts/opentype/FiraSans
|
||||
sudo cp Fira*/WEB/*.ttf /usr/share/fonts/truetype/FiraSans/
|
||||
sudo cp Fira*/OTF/Fira* /usr/share/fonts/opentype/FiraSans/
|
||||
|
||||
sudo fc-cache -fv
|
||||
cp Download_Folder_FiraSans_4301/Fonts/Fira_Sans_TTF_4301/*/*/*.ttf \
|
||||
/usr/share/fonts/truetype/FiraSans/
|
||||
cp Download_Folder_FiraSans_4301/Fonts/Fira_Sans_OTF_4301/*/*/*.otf \
|
||||
/usr/share/fonts/opentype/FiraSans/
|
||||
cp Fira_Mono_3_2/Fonts/FiraMono_WEB_32/*.ttf /usr/share/fonts/truetype/FiraSans
|
||||
cp Fira_Mono_3_2/Fonts/FiraMono_OTF_32/*.otf /usr/share/fonts/truetype/FiraSans
|
||||
|
||||
rm Download_Folder_FiraSans_4301.zip Fira_Mono_3_2.zip
|
||||
rm -rf Download_Folder_FiraSans_4301 Fira_Mono_3_2
|
||||
|
||||
fc-cache -fv
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
% \iffalse meta-comment -------------------------------------------------------
|
||||
% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of
|
||||
% contributors can be found at
|
||||
%
|
||||
% https://github.com/matze/mtheme/graphs/contributors
|
||||
%
|
||||
% and the original template was based on the HSRM theme by Benjamin Weiss.
|
||||
%
|
||||
% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0
|
||||
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
|
||||
% ------------------------------------------------------------------------- \fi
|
||||
% \iffalse
|
||||
%<*package>
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{beamercolorthememetropolis-highcontrast}[2017/01/23 Metropolis color theme]
|
||||
%</package>
|
||||
% \fi
|
||||
% \CheckSum{0}
|
||||
% \StopEventually{}
|
||||
% \iffalse
|
||||
%<*package>
|
||||
% ------------------------------------------------------------------------- \fi
|
||||
%
|
||||
\usecolortheme{metropolis}
|
||||
|
||||
\definecolor{mAlert}{HTML}{AD003D}
|
||||
\definecolor{mExample}{HTML}{005580}
|
||||
|
||||
\setbeamercolor{normal text}{%
|
||||
fg=black,
|
||||
bg=white
|
||||
}
|
||||
\setbeamercolor{alerted text}{%
|
||||
fg=mAlert,
|
||||
}
|
||||
\setbeamercolor{example text}{%
|
||||
fg=mExample,
|
||||
}
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\mode<all>
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \iffalse
|
||||
%</package>
|
||||
% \fi
|
||||
% \Finale
|
||||
\endinput
|
|
@ -12,7 +12,7 @@
|
|||
% \iffalse
|
||||
%<*package>
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{beamercolorthememetropolis}[2016/03/14 Metropolis color theme]
|
||||
\ProvidesPackage{beamercolorthememetropolis}[2017/01/23 Metropolis color theme]
|
||||
%</package>
|
||||
% \fi
|
||||
% \CheckSum{0}
|
||||
|
@ -96,6 +96,7 @@
|
|||
fg=black!2,
|
||||
bg=mDarkTeal
|
||||
}
|
||||
\usebeamercolor[fg]{normal text}
|
||||
}
|
||||
\newcommand{\metropolis@colors@light}{
|
||||
\setbeamercolor{normal text}{%
|
||||
|
@ -220,6 +221,17 @@
|
|||
\setbeamercolor{footnote mark}{fg=.}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% We also reset the bibliography colors in order to pick up the surrounding
|
||||
% colors at the time of use. This prevents us having to set the correct color in
|
||||
% normal and standout mode.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\setbeamercolor{bibliography entry author}{fg=, bg=}
|
||||
\setbeamercolor{bibliography entry title}{fg=, bg=}
|
||||
\setbeamercolor{bibliography entry location}{fg=, bg=}
|
||||
\setbeamercolor{bibliography entry note}{fg=, bg=}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
%
|
||||
% \subsubsection{Process package options}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
% \iffalse
|
||||
%<*package>
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{beamerfontthememetropolis}[2016/03/14 Metropolis font theme]
|
||||
\ProvidesPackage{beamerfontthememetropolis}[2017/01/23 Metropolis font theme]
|
||||
%</package>
|
||||
% \fi
|
||||
% \CheckSum{0}
|
||||
|
@ -45,7 +45,11 @@
|
|||
%
|
||||
% \begin{macrocode}
|
||||
\ifboolexpr{bool {xetex} or bool {luatex}}{
|
||||
\RequirePackage[no-math]{fontspec}
|
||||
\@ifpackageloaded{fontspec}{
|
||||
\PassOptionsToPackage{no-math}{fontspec}
|
||||
}{
|
||||
\RequirePackage[no-math]{fontspec}
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \begin{macro}{\checkfont}
|
||||
|
@ -352,23 +356,61 @@
|
|||
{\def\inserttitle{#2}}%
|
||||
{\def\inserttitle{\metropolis@titleformat{#2}}}%
|
||||
{}%
|
||||
{\PackageError{beamerfontthememetropolis}{Patching title failed}}
|
||||
{\PackageError{beamerfontthememetropolis}{Patching title failed}\@ehc}
|
||||
\patchcmd{\beamer@subtitle}%
|
||||
{\def\insertsubtitle{#2}}%
|
||||
{\def\insertsubtitle{\metropolis@subtitleformat{#2}}}%
|
||||
{}%
|
||||
{\PackageError{beamerfontthememetropolis}{Patching subtitle failed}}
|
||||
{\PackageError{beamerfontthememetropolis}{Patching subtitle failed}\@ehc}
|
||||
\patchcmd{\sectionentry}
|
||||
{\def\insertsectionhead{#2}}
|
||||
{\def\insertsectionhead{\metropolis@sectiontitleformat{#2}}}
|
||||
{}
|
||||
{\PackageError{beamerfontthememetropolis}{Patching section title failed}}
|
||||
{\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc}
|
||||
\@tempswafalse
|
||||
\patchcmd{\beamer@section}
|
||||
{\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
|
||||
{\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\metropolis@sectiontitleformat{\unexpanded{#1}}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@section}
|
||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{%
|
||||
\metropolis@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
{\PackageError{beamerfontthememetropolis}{Patching section title failed}}
|
||||
\patchcmd{\beamer@section}
|
||||
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\metropolis@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\if@tempswa\else
|
||||
\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc
|
||||
\fi
|
||||
\@tempswafalse
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}}
|
||||
{\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\metropolis@sectiontitleformat{\unexpanded{#1}}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{%
|
||||
\metropolis@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\patchcmd{\beamer@subsection}
|
||||
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}}
|
||||
{\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{%
|
||||
\noexpand\metropolis@sectiontitleformat{#1}}}}
|
||||
{\@tempswatrue}
|
||||
{}
|
||||
\if@tempswa\else
|
||||
\PackageError{beamerfontthememetropolis}{Patching section title failed}\@ehc
|
||||
\fi
|
||||
% \end{macrocode}
|
||||
%
|
||||
% Similarly, to make the |\MakeLowercase| and |\MakeUppercase| macros work in
|
||||
|
@ -376,13 +418,13 @@
|
|||
%
|
||||
% \begin{macrocode}
|
||||
\patchcmd{\beamer@@frametitle}
|
||||
{\beamer@ifempty{#2}{}{%
|
||||
{{%
|
||||
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space%
|
||||
\usebeamertemplate*{frametitle continuation}\fi}}%
|
||||
\gdef\beamer@frametitle{#2}%
|
||||
\gdef\beamer@shortframetitle{#1}%
|
||||
}}
|
||||
{\beamer@ifempty{#2}{}{%
|
||||
{{%
|
||||
\gdef\insertframetitle{{\metropolis@frametitleformat{#2}\ifnum%
|
||||
\beamer@autobreakcount>0\relax{}\space%
|
||||
\usebeamertemplate*{frametitle continuation}\fi}}%
|
||||
|
@ -390,7 +432,7 @@
|
|||
\gdef\beamer@shortframetitle{#1}%
|
||||
}}
|
||||
{}
|
||||
{\PackageError{beamerfontthememetropolis}{Patching frame title failed}}
|
||||
{\PackageError{beamerfontthememetropolis}{Patching frame title failed}\@ehc}
|
||||
% \end{macrocode}
|
||||
%
|
||||
%
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
% \iffalse
|
||||
%<*package>
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{beamerinnerthememetropolis}[2016/03/14 Metropolis inner theme]
|
||||
\ProvidesPackage{beamerinnerthememetropolis}[2017/01/23 Metropolis inner theme]
|
||||
%</package>
|
||||
% \fi
|
||||
% \CheckSum{0}
|
||||
|
@ -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{
|
||||
|
@ -184,6 +184,7 @@
|
|||
% Set the subtitle on the title page.
|
||||
% \begin{macrocode}
|
||||
\setbeamertemplate{subtitle}{
|
||||
\raggedright%
|
||||
\insertsubtitle%
|
||||
\par%
|
||||
\vspace*{0.5em}
|
||||
|
@ -195,10 +196,14 @@
|
|||
% Template to set the title graphic in a zero-height box. (It won't
|
||||
% change the position of other elements.)
|
||||
% \begin{macrocode}
|
||||
\newlength{\metropolis@titleseparator@linewidth}
|
||||
\setlength{\metropolis@titleseparator@linewidth}{0.4pt}
|
||||
\setbeamertemplate{title separator}{
|
||||
\tikzexternaldisable%
|
||||
\begin{tikzpicture}
|
||||
\draw[fg, fill=fg] (0,0) rectangle (\textwidth, 0.4pt);
|
||||
\fill[fg] (0,0) rectangle (\textwidth, \metropolis@titleseparator@linewidth);
|
||||
\end{tikzpicture}%
|
||||
\tikzexternalenable%
|
||||
\par%
|
||||
}
|
||||
% \end{macrocode}
|
||||
|
@ -251,10 +256,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 +272,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
|
||||
|
@ -327,14 +332,18 @@
|
|||
%
|
||||
% \begin{macrocode}
|
||||
\newlength{\metropolis@progressonsectionpage}
|
||||
\newlength{\metropolis@progressonsectionpage@linewidth}
|
||||
\setlength{\metropolis@progressonsectionpage@linewidth}{0.4pt}
|
||||
\setbeamertemplate{progress bar in section page}{
|
||||
\setlength{\metropolis@progressonsectionpage}{%
|
||||
\textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
|
||||
}%
|
||||
\tikzexternaldisable%
|
||||
\begin{tikzpicture}
|
||||
\draw[bg, fill=bg] (0,0) rectangle (\textwidth, 0.4pt);
|
||||
\draw[fg, fill=fg] (0,0) rectangle (\metropolis@progressonsectionpage, 0.4pt);
|
||||
\fill[bg] (0,0) rectangle (\textwidth, \metropolis@progressonsectionpage@linewidth);
|
||||
\fill[fg] (0,0) rectangle (\metropolis@progressonsectionpage, \metropolis@progressonsectionpage@linewidth);
|
||||
\end{tikzpicture}%
|
||||
\tikzexternalenable%
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
@ -527,7 +536,7 @@
|
|||
% Optional arguments to Beamer's frames are implemented using
|
||||
% |\define@key| from the |keyval| package, which will execute code when the
|
||||
% defined option is called. For the |standout| option, we begin a group,
|
||||
% change the colors and fonts, and set a \centering alignment.
|
||||
% change the colors and set frame options.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\providebool{metropolis@standout}
|
||||
|
@ -547,9 +556,10 @@
|
|||
bg=palette primary.bg
|
||||
}
|
||||
}
|
||||
\centering
|
||||
\usebeamercolor[fg]{palette primary}
|
||||
\usebeamerfont{standout}
|
||||
\setbeamercolor{local structure}{
|
||||
fg=palette primary.fg
|
||||
}
|
||||
\usebeamercolor[fg]{palette primary}
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
@ -557,17 +567,30 @@
|
|||
% in order to restore the colours and fonts for the rest of the
|
||||
% presentation. Unfortunately, we cannot use \AfterEndEnvironment{frame} for
|
||||
% this (see \url{http://tex.stackexchange.com/questions/226319/}).
|
||||
% Instead, we add the |\endgroup| to |\beamer@reseteecodes|, which is run
|
||||
% Instead, we prepend the |\endgroup| to |\beamer@reseteecodes|, which is run
|
||||
% exactly once at the end of each slide.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\apptocmd{\beamer@reseteecodes}{%
|
||||
\pretocmd{\beamer@reseteecodes}{%
|
||||
\ifbool{metropolis@standout}{
|
||||
\endgroup
|
||||
\boolfalse{metropolis@standout}
|
||||
}{}
|
||||
}{}{}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% We set the fonts and the \centering alignment on the inner content,
|
||||
% in such a way that the speaker's note layout isn't affected by the custom
|
||||
% formatting.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\AtBeginEnvironment{beamer@frameslide}{
|
||||
\ifbool{metropolis@standout}{
|
||||
\centering
|
||||
\usebeamerfont{standout}
|
||||
}{}
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
% \subsubsection{Process package options}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
% \iffalse
|
||||
%<*package>
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{beamerouterthememetropolis}[2016/03/14 Metropolis outer theme]
|
||||
\ProvidesPackage{beamerouterthememetropolis}[2017/01/23 Metropolis outer theme]
|
||||
%</package>
|
||||
% \fi
|
||||
% \CheckSum{0}
|
||||
|
@ -168,9 +168,16 @@
|
|||
leftskip=\metropolis@frametitle@padding,%
|
||||
rightskip=\metropolis@frametitle@padding,%
|
||||
]{frametitle}%
|
||||
\metropolis@frametitlestrut@start\insertframetitle\metropolis@frametitlestrut@end%
|
||||
\metropolis@frametitlestrut@start%
|
||||
\insertframetitle%
|
||||
\nolinebreak%
|
||||
\metropolis@frametitlestrut@end%
|
||||
\end{beamercolorbox}%
|
||||
}
|
||||
\setbeamertemplate{frametitle continuation}{%
|
||||
\usebeamerfont{frametitle}
|
||||
\romannumeral \insertcontinuationcount
|
||||
}
|
||||
% \end{macrocode}
|
||||
% \end{macro}
|
||||
%
|
||||
|
@ -180,16 +187,20 @@
|
|||
% template |progress bar in section page|.
|
||||
% \begin{macrocode}
|
||||
\newlength{\metropolis@progressinheadfoot}
|
||||
\newlength{\metropolis@progressinheadfoot@linewidth}
|
||||
\setlength{\metropolis@progressinheadfoot@linewidth}{0.4pt}
|
||||
\setbeamertemplate{progress bar in head/foot}{
|
||||
\nointerlineskip
|
||||
\setlength{\metropolis@progressinheadfoot}{%
|
||||
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
|
||||
}%
|
||||
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
|
||||
\tikzexternaldisable%
|
||||
\begin{tikzpicture}
|
||||
\draw[bg, fill=bg] (0,0) rectangle (\paperwidth, 0.4pt);
|
||||
\draw[fg, fill=fg] (0,0) rectangle (\metropolis@progressinheadfoot, 0.4pt);
|
||||
\fill[bg] (0,0) rectangle (\paperwidth, \metropolis@progressinheadfoot@linewidth);
|
||||
\fill[fg] (0,0) rectangle (\metropolis@progressinheadfoot, \metropolis@progressinheadfoot@linewidth);
|
||||
\end{tikzpicture}%
|
||||
\tikzexternalenable%
|
||||
\end{beamercolorbox}
|
||||
}
|
||||
% \end{macrocode}
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
%<*package>
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{beamerthememetropolis}
|
||||
[2016/03/14 v1.1 Metropolis Beamer theme]
|
||||
[2017/01/23 v1.2 Metropolis Beamer theme]
|
||||
%</package>
|
||||
% \fi
|
||||
% \CheckSum{0}
|
||||
|
@ -126,7 +126,15 @@
|
|||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% To avoid generating externalized figures of the progressbar we have to disable
|
||||
% them with ``tikzexternalenable'' and ``tikzexternaldisable''. However, if the
|
||||
% ``external'' libray is not loaded we would get undefined control sequence
|
||||
% problems, hence we define them as no-ops if they are not defined yet.
|
||||
%
|
||||
% \begin{macrocode}
|
||||
\providecommand{\tikzexternalenable}{}
|
||||
\providecommand{\tikzexternaldisable}{}
|
||||
% \end{macrocode}
|
||||
%
|
||||
% \subsubsection{Component sub-packages}
|
||||
%
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
%% International License (https://creativecommons.org/licenses/by-sa/4.0/).
|
||||
%% ---------------------------------------------------------------------------
|
||||
|
||||
\input{docstrip.tex}
|
||||
\input docstrip.tex %
|
||||
\keepsilent
|
||||
\askforoverwritefalse
|
||||
\usedir{tex/latex/mtheme}
|
||||
|
@ -44,6 +44,9 @@ International License (https://creativecommons.org/licenses/by-sa/4.0/).
|
|||
\generate{\file{beamercolorthememetropolis.sty}{%
|
||||
\from{beamercolorthememetropolis.dtx}{package}}
|
||||
}
|
||||
\generate{\file{beamercolorthememetropolis-highcontrast.sty}{%
|
||||
\from{beamercolorthememetropolis-highcontrast.dtx}{package}}
|
||||
}
|
||||
\generate{\file{pgfplotsthemetol.sty}{%
|
||||
\from{pgfplotsthemetol.dtx}{package}}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
%<*package>
|
||||
\NeedsTeXFormat{LaTeX2e}
|
||||
\ProvidesPackage{pgfplotsthemetol}
|
||||
[2016/03/14 PGFplots colors based on Paul Tol's SRON technical note]
|
||||
[2017/01/23 PGFplots colors based on Paul Tol's SRON technical note]
|
||||
%</package>
|
||||
%<driver> \documentclass{ltxdoc}
|
||||
%<driver> \usepackage{pgfplotsthemetol}
|
||||
|
|
Loading…
Reference in New Issue