mirror of https://github.com/matze/mtheme.git
Compare commits
23 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 |
3
Makefile
3
Makefile
|
@ -1,3 +1,4 @@
|
|||
MAKEFLAGS := -j 1
|
||||
INS = source/beamerthememetropolis.ins
|
||||
PACKAGE_SRC = $(wildcard source/*.dtx)
|
||||
PACKAGE_STY = $(notdir $(PACKAGE_SRC:%.dtx=%.sty))
|
||||
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
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}
|
||||
}
|
||||
|
@ -84,7 +84,7 @@
|
|||
\begin{alertblock}{Potential problems}
|
||||
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}
|
||||
}
|
||||
|
@ -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}
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip"
|
||||
wget "http://www.carrois.com/downloads/fira_mono_3_2/FiraMonoFonts3206.zip"
|
||||
apt-get install unzip -y
|
||||
|
||||
unzip FiraFonts4106.zip
|
||||
unzip FiraMonoFonts3206.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/*.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
|
||||
|
|
|
@ -221,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}
|
||||
|
|
|
@ -368,6 +368,12 @@
|
|||
{}
|
||||
{\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}{%
|
||||
|
@ -384,6 +390,12 @@
|
|||
\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}{%
|
||||
|
|
|
@ -199,9 +199,11 @@
|
|||
\newlength{\metropolis@titleseparator@linewidth}
|
||||
\setlength{\metropolis@titleseparator@linewidth}{0.4pt}
|
||||
\setbeamertemplate{title separator}{
|
||||
\tikzexternaldisable%
|
||||
\begin{tikzpicture}
|
||||
\fill[fg] (0,0) rectangle (\textwidth, \metropolis@titleseparator@linewidth);
|
||||
\end{tikzpicture}%
|
||||
\tikzexternalenable%
|
||||
\par%
|
||||
}
|
||||
% \end{macrocode}
|
||||
|
@ -336,10 +338,12 @@
|
|||
\setlength{\metropolis@progressonsectionpage}{%
|
||||
\textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
|
||||
}%
|
||||
\tikzexternaldisable%
|
||||
\begin{tikzpicture}
|
||||
\fill[bg] (0,0) rectangle (\textwidth, \metropolis@progressonsectionpage@linewidth);
|
||||
\fill[fg] (0,0) rectangle (\metropolis@progressonsectionpage, \metropolis@progressonsectionpage@linewidth);
|
||||
\end{tikzpicture}%
|
||||
\tikzexternalenable%
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
@ -532,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}
|
||||
|
@ -552,9 +556,10 @@
|
|||
bg=palette primary.bg
|
||||
}
|
||||
}
|
||||
\centering
|
||||
\setbeamercolor{local structure}{
|
||||
fg=palette primary.fg
|
||||
}
|
||||
\usebeamercolor[fg]{palette primary}
|
||||
\usebeamerfont{standout}
|
||||
}
|
||||
% \end{macrocode}
|
||||
%
|
||||
|
@ -562,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}
|
||||
|
|
|
@ -195,10 +195,12 @@
|
|||
\paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}%
|
||||
}%
|
||||
\begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot}
|
||||
\tikzexternaldisable%
|
||||
\begin{tikzpicture}
|
||||
\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}
|
||||
|
|
|
@ -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}
|
||||
%
|
||||
|
|
Loading…
Reference in New Issue