Compare commits

...

23 Commits
v1.2 ... master

Author SHA1 Message Date
Matthias Vogelgesang 2fa6084b9d
Merge pull request #337 from pacien/pr-334
Restrict standout font and alignment to inner content
2018-08-01 18:55:02 +02:00
Matthias Vogelgesang 338eeb83fb
Merge pull request #336 from pacien/pr-335
Restore theme within frame, making standout slides work with ignorenonframetext
2018-08-01 18:54:51 +02:00
pacien a7fad7f1d8 Fix #334: restrict standout theme to inner content
So that the speaker's notes aren't affected by the typesetting of the slide.
2018-08-01 18:01:39 +02:00
pacien 1eef71d75a Fix #335: end standout theme within frame env
Restore theme within frame, making standout slides work with ignorenonframetext
2018-08-01 18:00:20 +02:00
Matthias Vogelgesang 3e1381f83c
Merge pull request #339 from Bisaloo/patch-1
Update URL to Paul Tol technical note
2018-07-30 11:53:41 +02:00
Bisaloo 9b4afd548f
Update URL to Paul Tol technical note 2018-07-30 11:45:24 +02:00
Matthias Vogelgesang 1a42fa1939
Merge pull request #325 from jzaremba/fix_Fira_font_location
Updated Fira font paths
2018-05-11 09:30:11 +02:00
Jeff Zaremba 963203c3a3 Updated Fira font paths to new location.
Fixed docker build command in Makefile.
2018-05-10 15:52:44 -04:00
Matthias Vogelgesang 2cb6e1ec83 Fix #322: point to correct Fira repo 2018-04-20 09:48:02 +02:00
Matthias Vogelgesang 98ba2b330f Add fifth step to README about Fira 2018-03-29 10:23:01 +02:00
Matthias Vogelgesang f5690f92fb Add info about the high contrast theme 2018-03-29 10:11:16 +02:00
Matthias Vogelgesang 485de66566
Merge pull request #304 from josephwright/sectionning
Patch latest beamer section commands
2017-12-04 11:21:49 +01:00
Joseph Wright 762bc408cc Patch latest beamer section commands
This fixes #303.
2017-12-02 13:53:17 +00:00
Matthias Vogelgesang 796b659809 Merge pull request #288 from vijaykartik/fixtypos-demo-1
Fix typos in demo
2017-10-02 19:25:42 +02:00
Vijay Kartik 671aa01b99 Consistently use 'small caps'/\texttt{smallcaps}
Use 'small caps' when mentioning it in normal text. Use '\texttt{smallcaps}' when referring to the command.
Similarly for 'title format' and '\texttt{titleformat}'.

N.B.: There are no instances of '\texttt{titleformat}'.
2017-10-01 21:23:10 +02:00
Matthias Vogelgesang 28e70c1e67 Fix #296: use correct colors for bibliography 2017-09-26 16:36:41 +02:00
Vijay Kartik b4b6c001ad Fix typos in demo
Very minor typo/grammar corrections.
2017-08-24 17:35:01 +02:00
Matthias Vogelgesang 36ef780a7c Fix #267: set local structure color for standout 2017-03-28 10:27:16 +02:00
Matthias Vogelgesang 7b1eed33b9 Merge pull request #262 from yudai-nkt/straightforward-fallback
Simplify redundant fallbacks
2017-02-24 14:08:35 +01:00
Yudai NAKATA ca2c9ed9fe Simplify redundant fallbacks
Fix #261
2017-02-24 19:33:13 +09:00
Matthias Vogelgesang c13b01f948 Fix #260: check if TikZ external is loaded 2017-02-14 09:49:01 +01:00
Matthias Vogelgesang dc7ae3d632 Fix #260: disable TikZ external for our bars 2017-02-13 17:23:29 +01:00
Matthias Vogelgesang 79ea6303ca Fix #217: enforce non-parallel builds 2017-01-24 10:19:15 +01:00
10 changed files with 107 additions and 38 deletions

View File

@ -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)
@ -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)

View File

@ -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

View File

@ -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}

View File

@ -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.

View File

@ -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

View File

@ -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}

View File

@ -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}{%

View File

@ -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
\usebeamercolor[fg]{palette primary}
\usebeamerfont{standout}
\setbeamercolor{local structure}{
fg=palette primary.fg
}
\usebeamercolor[fg]{palette primary}
}
% \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}

View File

@ -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}

View File

@ -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}
%