Compare commits

...

134 Commits
v1.0 ... 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
Matthias Vogelgesang 10519e3de5 Release version 1.2 2017-01-23 12:55:26 +01:00
Matthias Vogelgesang 02980b2c48 Merge pull request #253 from maxhgerlach/fix-highcontrast-package-name
fix \ProvidesPackage{} for highcontrast theme
2017-01-10 15:53:10 +01:00
Matthias Vogelgesang 9690030ef9 Merge pull request #254 from josephwright/booktabs
Format table rules following booktabs advice
2017-01-10 15:51:35 +01:00
Joseph Wright 1095611cdb Format table rules following booktabs advice 2017-01-10 09:16:34 +00:00
Max H. Gerlach c7cd8ad9e8 fix \ProvidesPackage{} for highcontrast theme
Removes warning:

LaTeX Warning: You have requested package `beamercolorthememetropolis-highcontrast',
               but the package provides `beamercolorthememetropolis-minimal'.
2017-01-09 19:42:03 +01:00
Matthias Vogelgesang 8858c63bcd Merge pull request #251 from josephwright/ifempty-patch
Simplify a patch
2017-01-07 01:03:24 +01:00
Joseph Wright a7339544c3 Simplify a patch
This avoids looking for an internal command that will be removed
in a future update.
2017-01-06 14:08:41 +00:00
Matthias Vogelgesang d71d0789b0 Merge pull request #250 from josephwright/update-patch
Update patch: track beamer changes
2017-01-06 13:05:28 +01:00
Matthias Vogelgesang cdb624d0a8 Merge pull request #248 from josephwright/docstrip-patch
Drop braces in input line
2017-01-06 13:04:08 +01:00
Joseph Wright 30d207d696 Patch older and newer versions of beamer code
The fixes in
ef419391cb
and
ce790e640c
mean that a new patch route is needed. Patches cannot be nested
(easily) so use two and a switch to track if an error is needed.
2017-01-06 10:52:53 +00:00
Joseph Wright 2a1fcb7ea9 Add missing arguments for \PackageError
The command needs three arguments: \@ehc is the 'Press Enter to
continue" generic advice.
2017-01-06 10:37:53 +00:00
Joseph Wright 32347cceba Drop braces in input line 2017-01-06 10:34:39 +00:00
Matthias Vogelgesang caa3387782 Merge pull request #244 from matze/additional-color-themes
Add metropolis-highcontrast color theme
2016-12-13 14:09:54 +01:00
Matthias Vogelgesang 68866fb3e3 Update alert and add new example color 2016-11-23 15:32:06 +01:00
Matthias Vogelgesang 4ede22dc48 Rename color theme to highcontrast 2016-11-23 15:32:06 +01:00
Matthias Vogelgesang 388dee8248 Add metropolis-minimal color theme 2016-11-21 10:50:32 +01:00
Matthias Vogelgesang 72fddbd72b Merge pull request #243 from jGleitz/fix-fontspec-option-clash
Fix fontspec option clash
2016-11-20 05:57:27 -08:00
Joshua Gleitze 2a0d5cf12e Only load fontspec if it’s not loaded
fixes #239 in some cases
2016-11-20 13:50:46 +01:00
Matthias Vogelgesang 33e6756189 Merge pull request #238 from benjamin-weiss/progressbar-width
fixes #237: Allow to define the width of the progress bar
2016-11-06 23:33:36 +01:00
Benjamin Weiss 20a8e1edf4 removed hardcoded progress bar and title separator values and introduced (internal) variables 2016-11-06 21:18:32 +01:00
Matthias Vogelgesang b1eead2f8b Merge pull request #225 from yudai-nkt/typo
Fix a typo in documentation
2016-10-05 09:06:01 +02:00
Yudai NAKATA f88717ee6a Fix a typo in documentation 2016-10-05 13:31:26 +09:00
Matthias Vogelgesang bb30b7e1f9 Merge pull request #223 from rchurchley/bugfixes
Fix problem w/ inverting colours mid-presentation
2016-09-21 11:39:19 +02:00
Ross Churchley 5040b2ab97 Fix problem w/ inverting colours mid-presentation
Fix #221
2016-09-17 09:09:36 -07:00
Matthias Vogelgesang 9cdd61bb05 Merge pull request #219 from arijitlaik/patch-1
update unzip filenames
2016-08-11 08:06:11 +02:00
arijitlaik 44a40e694f update the TTF file copy command 2016-08-11 04:51:20 +05:30
arijitlaik 539f6f4adb update unzip filenames
the unzip command used filenames from the previous urls the new urls have different file names, this fixes the script
2016-08-11 04:44:11 +05:30
Matthias Vogelgesang 287b554d3d Clarify the Pandoc .standout situation 2016-08-05 15:46:59 +02:00
Matthias Vogelgesang 2805aa1583 Fix #216: use frametitle font for continuation 2016-07-20 12:37:24 +02:00
Matthias Vogelgesang ebf00c8a1b Fix #214: use ragged right for subtitle 2016-07-07 12:00:48 +02:00
Matthias Vogelgesang bd55d89a03 Merge pull request #213 from rchurchley/bugfixes
Bugfixes
2016-06-14 10:43:16 +02:00
Ross Churchley 79485c78ae Add to docs known issue about standout and Pandoc 2016-06-13 23:28:40 -07:00
Ross Churchley 6f76e317b0 Add to docs tip for standout frames with org-mode
Fix #203
2016-06-13 23:28:04 -07:00
Ross Churchley 41dc7a7212 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.
2016-06-13 19:55:11 -07:00
Ross Churchley 19dcbaba40 Use sectiontitleformat for subsection title
Fix #212
2016-06-13 19:42:38 -07:00
Matthias Vogelgesang 5107b2383e Fix #206: update Fira Sans font URLs 2016-04-20 09:02:31 +02:00
Matthias Vogelgesang 70fb078319 Add reference to @rchurcley's color theme 2016-04-03 19:25:34 +02:00
Matthias Vogelgesang fe9c932696 Merge pull request #204 from rchurchley/fixbreak
Fix empty second line in certain frametitles
2016-03-31 11:08:15 +02:00
Ross Churchley 8eb8c82d7e Fix empty second line in certain frametitles
Fix #202
2016-03-30 12:31:24 -07:00
Matthias Vogelgesang 73d94ddd81 Merge pull request #200 from wagermn/my-branch
Fix the "Overfull \hbox (0.4pt too wide)" bug when using progress bar.
2016-03-25 09:44:45 +01:00
Ermin Wang 3b08e613fe Fix the "Overfull \hbox (0.4pt too wide)" bug when using progress bar. 2016-03-25 00:47:06 +08:00
Matthias Vogelgesang 127b9aca65 Release version 1.1 2016-03-14 11:47:56 +01:00
Matthias Vogelgesang caa922644c Add NEWS file with changes
Eventually, this should be merged with the manual itself.
2016-03-14 11:45:43 +01:00
Matthias Vogelgesang 094fa5755e make: replace all filedate occurences 2016-03-14 11:26:04 +01:00
Matthias Vogelgesang 6ff1299c56 Fix a typo in the manual 2016-03-14 11:11:02 +01:00
Matthias Vogelgesang 806787012e Merge pull request #195 from rchurchley/documentation
Documentation updates
2016-03-14 11:06:06 +01:00
Ross Churchley 68249c9747 Remove unused driver code from sub-packages
As the theme's documentation is generated from `doc/metropolistheme.dtx` and not by running latex on the component sub-packages, this code is never actually executed. (Good thing, too, since it wouldn't compile; it is not possible to call `beamerthememetropolis` in a document with the `ltxdoc` class)
2016-03-10 23:35:51 -08:00
Ross Churchley 448f438c18 Note section, subsection slides can be consecutive
Fix #197
2016-03-10 23:24:40 -08:00
Matthias Vogelgesang fdf0aac8b6 Merge pull request #100 from benjamin-weiss/logo-redraw
upper part of logo redrawn by hand to get proper transparency
2016-03-10 08:36:58 +01:00
Matthias Vogelgesang 80a513f3fc Fix #196 partially: do not remove wrong dirs
This change escapes directory and file names to avoid removing unrelated
directories due to spaces in path names.
2016-03-09 17:34:53 +01:00
Benjamin Weiss 7bdb2003ed upper part of logo redrawn by hand to get proper transparency 2016-03-09 12:54:39 +01:00
Ross Churchley ffde17b63c Update date of packages modified for v1.1 2016-03-09 02:28:59 -08:00
Ross Churchley 19505fe82a Various documentation improvements 2016-03-09 02:28:59 -08:00
Ross Churchley 4c12fb79ee Remove link to Debian package (gives 404) 2016-03-09 02:28:59 -08:00
Ross Churchley 1d65da0777 Suggest Fira Book customization in some cases
Fix #75
2016-03-09 02:28:59 -08:00
Ross Churchley 48ee6d3336 Address notes font colour bug in documentation
Fix #191
2016-03-09 02:28:59 -08:00
Ross Churchley eeeac82b75 Fix titleformat options in documentation 2016-03-09 02:28:59 -08:00
Matthias Vogelgesang 5a61b4d2e0 Mention that Metropolis is on CTAN 2016-03-09 10:46:22 +01:00
Matthias Vogelgesang 3033dd3126 Merge pull request #194 from rchurchley/fix-empty-alertblock
Allow user to define empty (e.g.) alertblock background
2016-03-09 10:41:49 +01:00
Matthias Vogelgesang 6b70b210b5 Merge pull request #190 from rchurchley/subsection-page
Add support for subsections
2016-03-09 10:22:06 +01:00
Matthias Vogelgesang 820589f497 Merge pull request #189 from rchurchley/standout-slides
Use frame key for standout slides, move to inner theme
2016-03-09 10:18:56 +01:00
Ross Churchley 78b5a5bd4b Allow user to define empty alertblock background 2016-03-08 18:35:46 -08:00
Ross Churchley 774bd7b954 Add support for subsections
Fix #53
2016-03-04 23:39:45 -08:00
Ross Churchley cbffe39dcf Use frame key for standout slides, move to inner
Fix #11
2016-03-04 17:37:02 -08:00
Matthias Vogelgesang f921318fc0 Merge pull request #188 from rchurchley/fix-lualatex
Explicitly set italic, bold, and bolditalic fonts
2016-03-04 12:10:18 +01:00
Ross Churchley b47234ba14 Explicitly set italic, bold, and bolditalic fonts
Fix #187
2016-03-04 01:10:03 -08:00
Matthias Vogelgesang b5910b8f72 demo: deactivate title logo once again 2016-03-04 09:32:50 +01:00
Matthias Vogelgesang f31c772a8f Increase frametitle padding
Recent changes reduced it way more than it used to be, leading to a cramped
feeling especially with small caps titling.
2016-03-04 09:28:34 +01:00
Matthias Vogelgesang 612a947760 Merge pull request #186 from rchurchley/autoversion
Automatically get version, date for manual
2016-03-03 10:54:13 +01:00
Ross Churchley 309b6bad8c Automatically get version, date for manual
Fix #87
2016-03-03 01:05:51 -08:00
Matthias Vogelgesang 2b4b85dd93 Merge pull request #185 from rchurchley/section-page
Section page fixes
2016-03-03 09:03:41 +01:00
Ross Churchley 8894c7ea62 Adjust position of contents on section page
Fix #184 — Adjust spacing on section pages
2016-03-02 10:04:54 -08:00
Ross Churchley 3637e7ad60 Disable ugly justification in section pages
Fix #163 — Line breaks in section heading
2016-03-02 10:03:22 -08:00
Matthias Vogelgesang 45a1a83118 Merge pull request #183 from benjamin-weiss/new-frametitle-struts
new frame title struts – fixes #165
2016-03-02 09:38:20 +01:00
Matthias Vogelgesang 1cea72657b Merge pull request #182 from rchurchley/fix-blocks
Fix multi-line block titles
2016-03-02 09:37:45 +01:00
Ross Churchley cbfc756fce Revert changes to outer theme
This reverts the portion of the commit c48cc90a7b that applies to the outer theme, in order to prevent merge conflicts for #183
2016-02-28 14:34:58 -08:00
Benjamin Weiss 6c2f5dd4ae use etoolbox for if statement 2016-02-28 12:16:26 +01:00
Ross Churchley 8df52f8df5 Refactor and document solution 2016-02-26 16:12:57 -08:00
Benjamin Weiss 122e9f48ba new frame title struts 2016-02-26 19:31:25 +01:00
Ross Churchley 087c95d694 Remove accidentally included test line 2016-02-26 09:13:28 -08:00
davidcorteso 1b0699893d Use beamertemplate for footer
Added possibility to add a custom footer. Usage is shown in the demo slide deck.
2016-02-26 12:12:48 +01:00
Ross Churchley b97a35f847 Tweak block padding 2016-02-26 01:20:16 -08:00
Ross Churchley c48cc90a7b Ensure consistent line height 2016-02-25 17:39:40 -08:00
Ross Churchley 36f8d94172 Fix multi-line block titles 2016-02-24 09:57:24 -08:00
Matthias Vogelgesang 81adcb6a8f Merge pull request #181 from rchurchley/backup-slides
Support backup slides
2016-02-24 10:30:59 +01:00
Ross Churchley f3b9c24906 Update documentation for backup slides 2016-02-23 12:46:56 -08:00
Ross Churchley a9457cd08c Support backup slides
Fix #126
2016-02-22 22:48:01 -08:00
Matthias Vogelgesang eb36b2dd49 Unify whitespace usage in the manual 2016-02-22 12:44:09 +01:00
Matthias Vogelgesang 6741e329ef Explain pgfplots style keys more in-depth
We also give the pgfplots integration its own section in the manual.
2016-02-22 12:43:21 +01:00
Matthias Vogelgesang ed11f5fc37 Merge pull request #177 from rchurchley/color-compatibility
Improve compatibility with other color themes
2016-02-22 12:16:27 +01:00
Ross Churchley 59f8794f59 Update dates 2016-02-21 23:30:07 -08:00
Ross Churchley 7d378d374c Update documentation
Add details on conflicts with other color themes.
2016-02-21 22:41:46 -08:00
Ross Churchley 3f6e0c936b Fix known issue with beamercolortheme fly
Previously `\plain` slides were broken if the user overrode the colour theme with `fly`, as that theme does not define a background colour for `palette primary`. The solution checks whether `palette primary.bg` is undefined; if so, it automatically picks a colour complementary to `palette primary.fg` for the background of the plain slides.
2016-02-21 21:57:37 -08:00
Ross Churchley 653826403e Base block spacing on bg colour, not theme option 2016-02-21 21:53:09 -08:00
Matthias Vogelgesang c997553cad Merge pull request #174 from rchurchley/updates
Move titleformat options to font theme (and other tidying)
2016-02-09 07:59:46 +01:00
Ross Churchley 177ebb7f4a Revert titleformat hyphenation and add aliases 2016-02-08 09:25:06 -08:00
Ross Churchley 069871f920 Increment version 2016-02-06 22:29:28 -08:00
Ross Churchley 8f23f78e08 Update documentation 2016-02-06 22:26:41 -08:00
Ross Churchley 83469b03ff Rename \iffontsexist to \iffontsavailable
Prevents me from thinking it tests "if font sexist" instead of "if fonts exist"
2016-02-06 22:24:45 -08:00
Ross Churchley a87cb88cd3 Move titleformat options to font theme 2016-02-06 22:18:53 -08:00
Ross Churchley 4a7c1306f0 Hyphenate titleformat options
Although (e.g.) `titleformat title` is a valid PGF key and works in the `\metroset`, it does not work as an optional argument to `\usetheme`, where spaces are ignored.
2016-02-06 20:19:36 -08:00
Ross Churchley eee7860518 Standardize internal command namespacing
Use \metropolis@foo instead of \@metropolis@foo, following the example of`beamer`'s source code
2016-02-06 19:24:47 -08:00
Ross Churchley 4a82c4b3af Remove hardcoded references to \textsc{metropolis}
Use \themename in documentation instead.
2016-02-06 19:07:48 -08:00
Matthias Vogelgesang 4def6e7ce9 Merge pull request #172 from ronnychevalier/rc/numbering
innertheme: add noframenumbering for section and titlepage
2016-02-02 16:57:53 +01:00
Ronny Chevalier 0383c3e7e6 innertheme: add noframenumbering for section and titlepage
There is no need to increment the frame number for the titlepage and the
section page.
2016-02-02 16:24:59 +01:00
Matthias Vogelgesang fe28e21fcb Add notice about title format changes 2015-12-17 12:43:24 +01:00
Matthias Vogelgesang f57425aac8 Ignore PDF manual and demo 2015-12-06 22:10:29 +01:00
Matthias Vogelgesang 818939e370 Fix #162: use correct theme name for Pandoc 2015-12-06 22:04:30 +01:00
Matthias Vogelgesang 3183287b9b Remove compiled demo and manual
We now simply refere to the PDFs hosted at CTAN.
2015-12-06 11:48:51 +01:00
Matthias Vogelgesang a40729c919 Clarify that the installation method is for source 2015-12-05 13:59:15 +01:00
Matthias Vogelgesang 3ccd790c49 Update release date 2015-12-04 15:56:42 +01:00
20 changed files with 1559 additions and 816 deletions

2
.gitignore vendored
View File

@ -39,3 +39,5 @@
# Output
*.sty
doc/metropolistheme.pdf
demo/demo.pdf

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)
@ -38,13 +39,13 @@ install: $(PACKAGE_STY) $(DOC_PDF)
@cp $(DOC_PDF) $(DOC_DIR)
uninstall:
@rm -f $(addprefix $(INSTALL_DIR)/, $(PACKAGE_STY))
@rmdir $(INSTALL_DIR)
@rm -f $(DOC_DIR)/$(notdir $(DOC_PDF))
@rmdir $(DOC_DIR)
@rm -f "$(addprefix $(INSTALL_DIR)/, $(PACKAGE_STY))"
@rmdir "$(INSTALL_DIR)"
@rm -f "$(DOC_DIR)/$(notdir $(DOC_PDF))"
@rmdir "$(DOC_DIR)"
clean-cache:
@rm -f $(CACHE_DIR)/*
@rm -rf "$(CACHE_DIR)"
clean-sty:
@rm -f $(PACKAGE_STY)
@ -53,20 +54,20 @@ ctan: $(CTAN_CONTENT) ctan-version
@tar --transform "s@\(.*\)@metropolis/\1@" -cf metropolis-$(shell date "+%Y-%m-%d").tar.gz $(CTAN_CONTENT)
ctan-version:
@sed -i 's@\(ProvidesPackage.*\[\)[0-9/]*@\1$(shell date "+%Y/%m/%d")@' $(PACKAGE_SRC)
@sed -i 's@20[0-9][0-9]/[0-9]*/[0-9]*@$(shell date "+%Y/%m/%d")@' $(PACKAGE_SRC)
$(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)

35
NEWS Normal file
View File

@ -0,0 +1,35 @@
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 its 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
=====================================
* New features:
- Support backup slides
- Support for subsections
- Add standout frame key for standout slides
* Bugs fixed:
- Avoid justification of title in section pages.
- Improve frame title with new struts
- Fix multi-line block titles
- Ensure consistent line height
- Known issue with beamercolortheme fly
- Do not increase frame number for section and titlepage

View File

@ -1,6 +1,13 @@
## Metropolis
**NOTICE: The package name changed from *m* to *metropolis*!**
**IMPORTANT NOTICES FOR VERSION 1.0**
* The package and theme name changed from *m* to *metropolis*!
* The `title format` values have been restructured. Please refer to the
[manual][].
---
Metropolis is a simple, modern Beamer theme suitable for anyone to use. It tries
to minimize noise and maximize space for content; the only visual flourish it
@ -8,24 +15,32 @@ offers is an (optional) progress bar added to each slide. The core design
principles of the theme were described in a blog post
[here](http://bloerg.net/2014/09/20/a-modern-beamer-theme.html).
Not convinced? Have a look at the [demo slides](demo/demo.pdf).
Not convinced? Have a look at the [demo slides][].
![Sample](http://i.imgur.com/Bxu52fz.png)
## Installation
Installing Metropolis, like any Beamer theme, involves four easy steps:
To install a stable version of this theme, please refer to update instructions
of your TeX distribution. Metropolis is on [CTAN][] since December
2014 thus it is part of MikTeX and will be part of TeX Live 2016.
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.
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.
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).
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
@ -49,7 +64,10 @@ Metropolis.
\end{document}
```
Detailed information on using Metropolis can be found in the [manual (PDF)](doc/metropolistheme.pdf).
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
@ -59,3 +77,8 @@ The theme itself is licensed under a [Creative Commons Attribution-ShareAlike
means that if you change the theme and re-distribute it, you *must* retain the
copyright notice header and license it under the same CC-BY-SA license. This
does not affect the presentation that you create with the theme.
[demo slides]: http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/themes/metropolis/demo/demo.pdf
[manual]: http://mirrors.ctan.org/macros/latex/contrib/beamer-contrib/themes/metropolis/doc/metropolistheme.pdf
[CTAN]: http://ctan.org/pkg/beamertheme-metropolis

Binary file not shown.

View File

@ -1,6 +1,7 @@
\documentclass[10pt]{beamer}
\usetheme{metropolis}
\usepackage{appendixnumberbeamer}
\usepackage{booktabs}
\usepackage[scale=2]{ccicons}
@ -16,7 +17,7 @@
\date{\today}
\author{Matthias Vogelgesang}
\institute{Center for modern beamer themes}
% \titlegraphic{\hfill\includegraphics[height=1.5cm]{logo/logo}}
% \titlegraphic{\hfill\includegraphics[height=1.5cm]{logo.pdf}}
\begin{document}
@ -51,26 +52,26 @@
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}
{
\metroset{titleformat frame=smallcaps}
\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}
}
@ -78,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}
}
@ -91,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}
}
@ -116,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}}
@ -132,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}
@ -184,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
@ -280,6 +281,14 @@ or show \textbf{bold} results.\end{verbatim}
\end{quote}
\end{frame}
{%
\setbeamertemplate{frame footer}{My custom footer}
\begin{frame}[fragile]{Frame footer}
\themename defines a custom beamer template to add a text to the footer. It can be set via
\begin{verbatim}\setbeamertemplate{frame footer}{My custom footer}\end{verbatim}
\end{frame}
}
\begin{frame}{References}
Some references to showcase [allowframebreaks] \cite{knuth92,ConcreteMath,Simpson,Er01,greenwade93}
\end{frame}
@ -300,7 +309,22 @@ or show \textbf{bold} results.\end{verbatim}
\end{frame}
\plain{Questions?}
\begin{frame}[standout]
Questions?
\end{frame}
\appendix
\begin{frame}[fragile]{Backup slides}
Sometimes, it is useful to add slides at the end of your presentation to
refer to during audience questions.
The best way to do this is to include the \verb|appendixnumberbeamer|
package in your preamble and call \verb|\appendix| before your backup slides.
\themename will automatically turn off slide numbering and progress bars for
slides in the appendix.
\end{frame}
\begin{frame}[allowframebreaks]{References}

268
demo/logo.eps Normal file
View File

@ -0,0 +1,268 @@
%!PS-Adobe-3.0 EPSF-3.0
%%Creator: cairo 1.14.0 (http://cairographics.org)
%%CreationDate: Wed Jun 24 11:33:35 2015
%%Pages: 1
%%DocumentData: Clean7Bit
%%LanguageLevel: 2
%%BoundingBox: 0 -1 518 784
%%EndComments
%%BeginProlog
save
50 dict begin
/q { gsave } bind def
/Q { grestore } bind def
/cm { 6 array astore concat } bind def
/w { setlinewidth } bind def
/J { setlinecap } bind def
/j { setlinejoin } bind def
/M { setmiterlimit } bind def
/d { setdash } bind def
/m { moveto } bind def
/l { lineto } bind def
/c { curveto } bind def
/h { closepath } bind def
/re { exch dup neg 3 1 roll 5 3 roll moveto 0 rlineto
0 exch rlineto 0 rlineto closepath } bind def
/S { stroke } bind def
/f { fill } bind def
/f* { eofill } bind def
/n { newpath } bind def
/W { clip } bind def
/W* { eoclip } bind def
/BT { } bind def
/ET { } bind def
/pdfmark where { pop globaldict /?pdfmark /exec load put }
{ globaldict begin /?pdfmark /pop load def /pdfmark
/cleartomark load def end } ifelse
/BDC { mark 3 1 roll /BDC pdfmark } bind def
/EMC { mark /EMC pdfmark } bind def
/cairo_store_point { /cairo_point_y exch def /cairo_point_x exch def } def
/Tj { show currentpoint cairo_store_point } bind def
/TJ {
{
dup
type /stringtype eq
{ show } { -0.001 mul 0 cairo_font_matrix dtransform rmoveto } ifelse
} forall
currentpoint cairo_store_point
} bind def
/cairo_selectfont { cairo_font_matrix aload pop pop pop 0 0 6 array astore
cairo_font exch selectfont cairo_point_x cairo_point_y moveto } bind def
/Tf { pop /cairo_font exch def /cairo_font_matrix where
{ pop cairo_selectfont } if } bind def
/Td { matrix translate cairo_font_matrix matrix concatmatrix dup
/cairo_font_matrix exch def dup 4 get exch 5 get cairo_store_point
/cairo_font where { pop cairo_selectfont } if } bind def
/Tm { 2 copy 8 2 roll 6 array astore /cairo_font_matrix exch def
cairo_store_point /cairo_font where { pop cairo_selectfont } if } bind def
/g { setgray } bind def
/rg { setrgbcolor } bind def
/d1 { setcachedevice } bind def
%%EndProlog
%%BeginSetup
%%EndSetup
%%Page: 1 1
%%BeginPageSetup
%%PageBoundingBox: 0 -1 518 784
%%EndPageSetup
q 0 -1 518 785 rectclip q
0.137255 0.215686 0.231373 rg
0 527.921 m 0 783.578 l 517.574 783.578 l 517.574 478.808 l 452.461 462.206
l 451.93 547.921 l 451.93 547.921 457.473 531.105 464.133 534.042 c 468.656
536.035 463.938 525.749 463.938 525.749 c 463.938 525.749 469.383 521.531
467.723 518.847 c 465.543 515.328 465.305 508.917 467.266 502.097 c 469.227
495.273 471.566 494.613 468.008 483.21 c 464.449 471.804 488.176 467.48
488.176 478.078 c 488.176 488.675 489.07 535.355 489.07 535.355 c 483.004
538.531 457.035 551.8 451.93 551.8 c 446.195 551.8 412.195 538.874 412.195
538.874 c 410.906 452.023 l 364.344 439.273 l 363.973 495.074 l 349.852
507.558 l 347.711 529.074 l 330.578 540.164 l 330.578 540.164 331.516 641.015
330.578 644.179 c 329.641 647.343 268.844 705.074 266.574 707.343 c 264.309
709.609 262.387 709.476 257.984 705.206 c 254.641 701.964 197.914 648.144
197.914 648.144 c 196.973 540.273 l 187.508 532.675 l 187.508 532.675 182.527
532.792 181.484 530.8 c 180.441 528.808 179.961 508.406 179.961 508.406
c 166.309 495.339 l 166.309 495.339 166.641 522.378 166.18 530.8 c 164.039
540.14 166.441 557.609 164.574 560.14 c 162.707 562.675 140.809 572.675
138.309 573.874 c 134.973 575.476 111.664 574.316 108.863 573.382 c 106.062
572.449 86.809 559.519 86.809 559.519 c 86.809 559.519 86.305 518.941 87.641
505.339 c 88.973 491.742 86.98 487.609 85.91 486.675 c 84.84 485.742 0
527.921 0 527.921 c h
0 527.921 m f
108.309 326.406 m 109.41 530.406 l 109.41 530.406 102.812 471.316 104.312
465.917 c 105.812 460.515 103.344 442.23 103.711 437.007 c 104.551 425.035
103.477 424.945 102.91 417.507 c 102.41 410.941 104.574 408.074 102.809
403.706 c 100.992 399.206 98.512 346.007 100.109 326.406 c h
122.707 326.406 m 138.309 326.406 l 138.309 326.406 135.875 388.531 135.793
395.824 c 135.707 403.121 136.02 524.55 136.02 524.55 c 134.652 562.746
l 134.652 562.746 131.117 542.335 131.688 536.863 c 132.258 531.39 132.828
535.496 133.625 529.906 c 134.426 524.32 133.012 441.128 131.574 433.906
c 130.133 426.683 129.059 403.796 128.84 381.23 c 128.699 366.753 126.898
358.882 128.383 349.308 c 130.328 336.738 122.707 326.406 122.707 326.406
c h
151.508 326.406 m 151.508 326.406 163.109 344.206 163.109 356.007 c 163.109
486.007 l 163.109 486.007 157.531 474.042 157.309 468.808 c 157.086 463.574
156.91 458.609 156.508 452.808 c 156.109 447.007 153.109 441.406 150.707
425.206 c 148.309 409.007 151.309 405.949 149.109 390.777 c 146.91 375.609
146.707 373.808 149.109 360.808 c 151.508 347.808 151.508 326.406 151.508
326.406 c h
168.508 326.406 m 179.707 326.406 l 179.707 503.007 l 176.91 500.808 l
176.91 500.808 176.309 450.007 176.109 422.007 c 175.91 394.007 177.707
385.406 175.707 381.406 c 173.707 377.406 174.109 371.206 174.109 371.206
c 174.109 371.206 173.508 363.609 173.109 354.007 c 172.707 344.406 168.508
326.406 168.508 326.406 c h
190.109 326.406 m 197.309 326.406 l 196.91 454.007 l 194.469 455.886 l
194.469 455.886 195.297 411.222 195.098 406.624 c 194.895 402.023 194.699
394.062 193.707 389.824 c 191.523 380.488 193.812 349.941 191.508 345.41
c 189.203 340.874 189.52 338.242 189.457 334.355 c 189.391 330.468 190.109
326.406 190.109 326.406 c h
263.637 326.406 m 265.293 475.757 l 265.293 475.757 267.668 472.66 267.801
463.574 c 267.91 455.886 276.129 447.199 278.188 435.464 c 279.547 427.714
280.805 417.371 286.125 408.019 c 289.242 402.539 289.371 392.187 288.633
388.507 c 287.891 384.831 288.207 384.554 289.008 381.206 c 289.727 378.226
287.777 376.472 289.742 372.933 c 291.742 369.331 292.707 371.007 297.039
363.706 c 301.98 355.374 296.109 359.808 305.637 347.503 c 307.781 344.73
306.207 341.906 305.508 336.706 c 304.719 330.843 308.941 326.41 308.941
326.41 c 263.637 326.41 l h
328.109 326.406 m 338.309 326.406 l 338.309 326.406 338.043 337.874 337.109
342.007 c 336.176 346.14 336.203 364.953 337.012 368.804 c 337.816 372.66
334.246 380.738 335.375 385.609 c 336.574 390.777 335.871 393.605 335.25
401.98 c 334.84 407.542 334.309 423.406 334.309 423.406 c 334.309 423.406
334.449 471.671 333.211 471.206 c 331.969 470.742 330.934 471.828 330.711
466.206 c 330.484 460.585 331.996 402.706 330.797 386.706 c 329.891 374.621
330.555 355.859 330.977 349.074 c 331.398 342.289 330.441 338.007 328.109
326.406 c h
347.109 326.406 m 354.043 326.406 l 354.043 326.406 354.707 345.206 354.43
349.179 c 354.266 351.566 352.852 351.371 352.707 355.609 c 352.566 359.843
354.141 359.835 354.707 365.703 c 355.543 374.402 354.23 382.23 354.574
388.675 c 354.883 394.414 355.152 402.597 353.242 406.273 c 351.328 409.949
352.441 414.808 352.441 414.808 c 351.105 451.074 l 351.105 451.074 348.113
433.425 348.648 413.867 c 349.387 386.714 348.199 355.527 348.586 351.171
c 349.676 338.894 347.109 326.406 347.109 326.406 c h
394.508 378.007 m 411.109 367.808 l 411.109 367.808 412.039 349.789 411.207
344.214 c 411.055 343.187 397.652 347.46 394.91 355.523 c 393.332 360.167
394.508 378.007 394.508 378.007 c h
393.574 389.089 m 393.574 389.089 393.109 402.609 393.91 406.007 c 394.707
409.406 404.422 420.136 406.02 421.136 c 407.621 422.136 407.844 420.734
408.707 421.605 c 409.574 422.48 409.859 423.019 411.551 423.808 c 413.246
424.593 413.398 423.195 413.574 421.89 c 413.738 420.664 412.844 414.593
412.426 410.589 c 411.879 405.351 411.633 400.515 411.551 395.687 c 411.473
390.859 411.551 378.007 411.551 378.007 c h
393.574 389.089 m f
67.367 227.956 m 59.621 227.956 l 57.223 257.003 l 56.301 267.054 55.562
277.937 55.473 283.285 c 41.176 235.242 l 33.707 235.242 l 18.77 283.374
l 18.68 276.183 18.125 265.949 17.297 256.542 c 15.082 227.956 l 7.523
227.956 l 12.871 291.398 l 23.75 291.398 l 37.676 244.464 l 50.953 291.398
l 61.836 291.398 l h
115.688 284.941 m 90.699 284.941 l 90.699 263.55 l 112.367 263.55 l 112.367
257.093 l 90.699 257.093 l 90.699 234.41 l 117.258 234.41 l 117.258 227.956
l 82.77 227.956 l 82.77 291.398 l 116.609 291.398 l 115.691 284.941 l h
166.039 284.574 m 148.242 284.574 l 148.242 227.956 l 140.312 227.956 l
140.312 284.574 l 122.055 284.574 l 122.055 291.398 l 166.961 291.398 l
h
194.348 255.249 m 183.836 255.249 l 183.836 227.956 l 175.906 227.956 l
175.906 291.398 l 192.227 291.398 l 207.902 291.398 216.02 285.312 216.02
273.601 c 216.02 264.562 211.223 259.308 202.188 256.632 c 219.34 227.956
l 209.84 227.956 l h
193.148 261.429 m 202.277 261.429 207.535 264.839 207.535 273.601 c 207.535
281.621 202.926 285.124 192.133 285.124 c 183.836 285.124 l 183.836 261.429
l h
277.895 259.585 m 277.895 238.652 267.199 226.851 251.34 226.851 c 235.57
226.851 224.781 238.285 224.781 259.492 c 224.781 280.425 235.66 292.503
251.34 292.503 c 267.105 292.503 277.895 280.976 277.895 259.585 c h
233.266 259.492 m 233.266 241.05 240.641 233.488 251.336 233.488 c 262.402
233.488 269.41 241.05 269.41 259.585 c 269.41 278.121 262.496 285.867 251.336
285.867 c 240.457 285.867 233.266 278.117 233.266 259.492 c h
331.746 271.941 m 331.746 257.464 321.328 251.562 307.402 251.562 c 299.105
251.562 l 299.105 227.956 l 291.176 227.956 l 291.176 291.398 l 307.402
291.398 l 322.527 291.398 331.746 285.218 331.746 271.941 c h
323.266 271.847 m 323.266 281.621 317.086 285.124 307.312 285.124 c 299.105
285.124 l 299.105 257.925 l 307.129 257.925 l 316.812 257.925 323.266 260.874
323.266 271.847 c h
392.055 259.585 m 392.055 238.652 381.359 226.851 365.5 226.851 c 349.73
226.851 338.941 238.285 338.941 259.492 c 338.941 280.425 349.824 292.503
365.5 292.503 c 381.266 292.503 392.055 280.976 392.055 259.585 c h
347.426 259.492 m 347.426 241.05 354.801 233.488 365.5 233.488 c 376.566
233.488 383.57 241.05 383.57 259.585 c 383.57 278.121 376.656 285.867 365.5
285.867 c 354.617 285.867 347.426 278.117 347.426 259.492 c h
413.266 234.964 m 439.453 234.964 l 438.531 227.956 l 405.336 227.956 l
405.336 291.398 l 413.266 291.398 l h
457.344 227.956 m 449.414 227.956 l 449.414 291.398 l 457.344 291.398 l
h
509.352 285.218 m 505.02 280.331 l 500.223 284.206 495.797 285.867 490.449
285.867 c 483.719 285.867 478.645 282.636 478.645 276.456 c 478.645 270.835
481.32 268.16 492.754 264.656 c 503.176 261.519 511.383 257.464 511.383
245.566 c 511.383 234.503 503.082 226.847 489.156 226.847 c 480.121 226.847
473.113 229.89 467.859 234.964 c 472.375 240.035 l 477.078 235.98 482.059
233.488 489.066 233.488 c 496.812 233.488 503.082 237.453 503.082 245.289
c 503.082 251.839 499.945 254.695 489.066 258.015 c 476.617 261.796 470.438
266.499 470.438 276.179 c 470.438 285.679 478.555 292.503 490.078 292.503
c 498.746 292.499 504.188 289.917 509.352 285.214 c h
509.352 285.218 m f
374.285 326.406 m 361.91 326.406 l 361.91 326.406 363.109 419.808 362.707
423.206 c 362.309 426.609 367.285 428.808 370.098 428.808 c 372.91 428.808
380.82 427.898 382.309 428.808 c 383.797 429.718 388.711 432.406 391.91
432.406 c 395.109 432.406 399.758 432.355 406.719 433.206 c 413.676 434.058
416.109 434.609 423.109 434.808 c 430.109 435.007 436.508 433.609 441.91
434.007 c 447.309 434.406 446.711 437.535 449.109 438.472 c 451.508 439.406
452.309 438.335 454.711 439.273 c 457.109 440.206 458.309 442.808 462.711
443.609 c 467.109 444.406 474.91 453.206 477.508 453.206 c 480.109 453.206
491.816 460.206 500.91 461.808 c 510.004 463.406 517.574 462.808 517.574
462.808 c 517.574 456.007 l 517.574 456.007 494.91 457.609 477.109 441.609
c 459.309 425.609 468.684 423.917 472.598 413.765 c 473.965 410.214 473.48
408.433 473.375 405.874 c 473.184 401.109 472.223 396.328 472.309 391.206
c 472.445 383.343 470.445 373.742 471.512 369.41 c 472.578 365.074 469.777
366.14 469.711 362.007 c 469.645 357.874 473.562 354.792 473.309 349.206
c 473.059 343.621 472.445 337.874 472.711 335.808 c 472.977 333.742 474.445
332.808 475.512 335.808 c 476.578 338.808 477.191 399.269 476.789 407.203
c 476.391 415.136 475.777 430.675 483.645 436.941 c 490.52 442.421 494.176
445.206 499.91 447.609 c 505.641 450.007 507.738 448.218 506.711 444.007
c 505.684 439.796 504.711 435.609 504.711 431.808 c 504.711 428.007 504.574
424.941 504.711 420.609 c 504.844 416.273 503.75 416.542 503.711 414.206
c 503.645 410.273 505.777 411.609 507.508 411.808 c 509.242 412.007 510.574
411.074 511.309 407.609 c 512.043 404.14 512.445 351.804 511.867 348.253
c 511.344 345.07 511.609 341.882 512.105 339.027 c 512.602 336.175 513.262
336.742 513.312 334.007 c 513.379 330.273 511.91 326.406 511.91 326.406
c 490.312 326.406 l 490.312 326.406 489.91 346.007 488.512 352.808 c 487.812
356.206 488.621 365.605 488.844 376.808 c 489.07 388.011 488.711 401.023
488.711 401.023 c 488.445 425.074 l 488.445 425.074 488.445 438.675 486.91
437.007 c 485.379 435.343 484.312 428.609 484.312 428.609 c 484.312 428.609
482.977 421.874 482.512 415.808 c 482.043 409.742 485.246 407.906 484.711
401.023 c 484.176 394.14 480.977 394.675 481.91 385.609 c 482.844 376.542
483.512 366.808 483.512 363.007 c 483.512 359.21 485.207 360.019 485.109
356.21 c 485.016 352.398 484.312 344.007 484.711 340.21 c 485.109 336.41
485.246 335.476 485.512 332.609 c 485.777 329.742 484.711 326.41 484.711
326.41 c 464.711 326.41 l 464.711 326.41 464.312 402.144 464.312 405.41
c 464.312 408.675 462.844 410.277 461.711 406.41 c 460.578 402.542 461.891
401.683 461.312 399.41 c 460.734 397.136 460.844 393.742 458.512 388.41
c 456.176 383.074 457.312 326.41 457.312 326.41 c 389.711 326.41 l 389.711
326.41 391.574 330.906 392.031 335.636 c 392.523 340.749 392.523 341.546
393.312 346.41 c 393.59 348.136 398.176 335.742 404.512 331.609 c 409.23
328.531 414.043 326.8 422.312 326.996 c 430.93 327.199 439.562 331.433
440.312 333.609 c 441.777 337.874 441.512 419.078 440.512 422.41 c 439.512
425.742 428.441 431.14 416.91 430.808 c 398.312 430.277 382.164 414.792
381.965 404.273 c 381.73 391.824 380.445 389.078 379.711 381.011 c 378.977
372.945 374.289 369.476 374.289 359.808 c 374.289 326.41 l h
0 195.578 m 0 123.48 148.203 29.558 258.531 -0.001 c 368.859 29.558 517.059
123.48 517.059 195.578 c h
197.805 131.484 m 185.836 131.484 l 185.836 93.417 l 180.504 93.417 l 180.504
131.484 l 168.23 131.484 l 168.23 136.074 l 198.422 136.074 l h
233.203 93.417 m 227.812 93.417 l 227.812 113.628 l 209.273 113.628 l 209.273
93.417 l 203.941 93.417 l 203.941 136.074 l 209.273 136.074 l 209.273 118.093
l 227.812 118.093 l 227.812 136.074 l 233.203 136.074 l h
267.551 93.417 m 244.363 93.417 l 244.363 136.074 l 267.117 136.074 l 266.496
131.734 l 249.695 131.734 l 249.695 117.347 l 264.266 117.347 l 264.266
113.011 l 249.695 113.011 l 249.695 97.757 l 267.551 97.757 l h
308.223 93.417 m 306.609 112.949 l 305.988 119.706 305.492 127.023 305.434
130.617 c 295.824 98.316 l 290.801 98.316 l 280.758 130.679 l 280.695 125.843
280.324 118.96 279.766 112.636 c 278.277 93.417 l 273.191 93.417 l 276.789
136.074 l 284.105 136.074 l 293.465 104.515 l 302.395 136.074 l 309.711
136.074 l 313.43 93.417 l h
346.473 93.417 m 323.289 93.417 l 323.289 136.074 l 346.039 136.074 l 345.422
131.734 l 328.621 131.734 l 328.621 117.347 l 343.188 117.347 l 343.188
113.011 l 328.621 113.011 l 328.621 97.757 l 346.477 97.757 l 346.477 93.417
l h
346.473 93.417 m f
Q Q
showpage
%%Trailer
end restore
%%EOF

Binary file not shown.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@ -37,7 +37,7 @@
\suppressfontnotfounderror=0%
}
\newcommand{\iffontsexist}[3]{%
\newcommand{\iffontsavailable}[3]{%
\setcounter{fontsnotfound}{0}%
\expandafter\forcsvlist\expandafter%
\checkfont\expandafter{#1}%
@ -47,13 +47,13 @@
#3%
\fi%
}
\iffontsexist{Fira Sans Light,%
\iffontsavailable{Fira Sans Light,%
Fira Sans Light Italic,%
Fira Sans,%
Fira Sans Italic}{%
\setmainfont[BoldFont={Fira Sans}]{Fira Sans Light}%
}{%
\iffontsexist{Fira Sans Light OT,%
\iffontsavailable{Fira Sans Light OT,%
Fira Sans Light Italic OT,%
Fira Sans OT,%
Fira Sans Italic OT}{%
@ -65,10 +65,10 @@
}
}
}
\iffontsexist{Fira Mono, Fira Mono Bold}{%
\iffontsavailable{Fira Mono, Fira Mono Bold}{%
\setmonofont{Fira Mono}%
}{%
\iffontsexist{Fira Mono OT, Fira Mono Bold OT}{%
\iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{%
\setmonofont{Fira Mono OT}%
}{%
\typeout{%
@ -125,6 +125,7 @@
plain,setbeamercolor,metroset,setsansfont,setmonofont},
}
\lstMakeShortInline|
\usepackage{metalogo}
\usepackage[colorlinks=true,
linkcolor=mLightBrown,
@ -144,23 +145,25 @@
\newcommand{\themename}{\textbf{\textsc{metropolis}}\xspace}
\GetFileInfo{beamerthememetropolis.dtx}
\usepackage{readprov}
\ReadPackageInfos{beamerthememetropolis}
\title{Modern Beamer Presentations with the \themename package}
\author{Matthias Vogelgesang \\ \url{matthias.vogelgesang@gmail.com}}
\date{v1.0}
\date{\fileversion~---~\filedate}
\begin{document}
\maketitle
\tableofcontents
\section{Introduction}
Beamer is an awesome way to make presentations with LaTeX, but its theme
selection is surprisingly sparse. The stock themes share an aesthetic that is
now overused and can be a little cluttered, and the few distinctive custom
themes available are often specialized for a particular corporate or
institutional brand.
selection is surprisingly sparse. The stock themes share an aesthetic that can
be a little cluttered, while the few distinctive custom themes available are
often specialized for a particular corporate or institutional brand.
The goal of \themename is to provide a simple, modern Beamer theme suitable
for anyone to use. It tries to minimize noise and maximize space for content;
@ -171,7 +174,7 @@ By default, \themename uses
\href{https://www.mozilla.org/en-US/styleguide/products/firefox-os/typeface/}
{Fira Sans}, a gorgeous typeface commissioned by Mozilla and designed by
\href{http://www.carrois.com/fira-3-1/}{Carrois}. For best results, you will
need the Fira typeface installed and use Xe\LaTeX{} to typeset your slides.
need the Fira typeface installed and use \XeLaTeX\ to typeset your slides.
However, \themename can also be used with other typefaces and \LaTeX{} build
systems.
@ -185,25 +188,37 @@ the theme even better, please get in touch there. The
\section{Getting Started}
\subsection{Installing from CTAN}
For the regular user it is recommended to install \themename from
\href{https://www.ctan.org}{CTAN}. In case you keep your \TeX\ distribution
up-to-date, chances are good that \themename is already installed. If it is not,
you need to update your packages. For \TeX\ Live (or Mac\TeX\ on OS X) the
following command updates all packages.
For most users, we recommend installing \themename from
\href{https://www.ctan.org}{CTAN}. If you keep your \TeX\ distribution
up-to-date, chances are good that \themename is already installed. If it is
not, you need to update your packages. If your distribution is \TeX\ Live
(or Mac\TeX\ on OS X), the following command updates all packages.
\begin{lstlisting}
tlmgr update --all
\end{lstlisting}
If this results in an error, you may need to run it with administrative privileges:
\begin{lstlisting}
sudo tlmgr update --all
\end{lstlisting}
For any other distribution please refer to its documentation on how to update your
packages.
Mac\TeX\ on OS X also provides a graphical interface for |tlmgr| called
\TeX\ Live Utility.
For any other distribution please refer to its documentation on how to update
your packages.
To get the most out of the theme you should also install the |Fira| fonts.
However, this is not mandatory; \themename also works with the standard fonts.
To get the most out of the theme you should also install the |Fira| fonts. Yet this
is not mandatory. \themename also works with the standard fonts.
\subsection{Installing from GitHub}
Installing \themename, like any Beamer theme, involves four easy steps:
If you want to use the cutting-edge development version of \themename, you can
install it manually. Like any \LaTeX\ package, this involves four easy steps:
\begin{description}
\item[Download the source] with a |git clone| of the
\href{https://github.com/matze/mtheme}{\themename repository} or as a
@ -230,17 +245,12 @@ options for advanced users:
\item[|make doc|] builds this documentation manual.
\item[|make demo|] builds a demo presentation to test the features of
\themename.
\item[|make all|] builds the theme, manual, and demo presentation.
\item[|make all|] builds the theme and manual.
\item[|make clean|] removes the files generated by |make all|.
\item[|make install|] installs the theme into your local texmf folder.
\item[|make uninstall|] removes the theme from your local texmf folder.
\item[|make ctan|] creates a package for CTAN distribution.
\end{description}
\subsection{Installing the Debian Package}
As an alternative users of Debian or Ubuntu can also install this
\href{https://launchpad.net/\%7Eedd/+archive/ubuntu/misc/+files/latex-mtheme_0.1.0vidid1_all.deb}{.deb package}
containing the theme files as well as the Fira Sans font files.
\subsection{A Minimal Example}
@ -266,17 +276,28 @@ The following code shows a minimal example of a Beamer presentation using
\subsection{Dependencies}
\begin{itemize}
\item TikZ
\item XeLaTeX or LuaTeX
\item \href{https://github.com/mozilla/Fira}{Fira Sans} and Mono font
\end{itemize}
\themename depends on the |beamer| class and the following standard packages:
\begin{multicols}{3}
\begin{itemize}
\item |tikz|
\item |pgfopts|
\item |etoolbox|
\item |calc|
\item |ifxetex|
\item |ifluatex|
\end{itemize}
\end{multicols}
For best results, we recommend installing the fonts
\href{https://github.com/mozilla/Fira}{|Fira Sans|} and |Fira Mono|
and compiling with \themename using \XeLaTeX\ or \LuaTeX.
These are optional dependencies; \themename is compatible with (e.g.)
pdf\LaTeX\ and will fall back to standard fonts if |Fira Sans| or |Fira Mono|
is not installed.
The packaged name of |Fira Sans| is |Fira Sans OT| in some Linux
distributions; this case is automatically handled by \themename.
The |Fira Sans| font is not a hard dependency. \themename will try to load the
font and use it if it is installed, but if not it will just use the standard
font. Depending on the Linux distribution, the packaged name of |Fira Sans|
might be |Fira Sans OT| instead of |Fira Sans|. \themename will check for this
name too.
\subsection{Pandoc}
@ -284,118 +305,110 @@ To use this theme with \href{http://johnmacfarlane.net/pandoc/}{Pandoc}-based
presentations, you can run the following command
\begin{lstlisting}
$ pandoc -t beamer --latex-engine=xelatex -V theme:m -o output.pdf input.md
$ pandoc -t beamer --latex-engine=xelatex -V theme:metropolis -o output.pdf input.md
\end{lstlisting}
\section{Customization}
\subsection{Package options}
The theme provides a number of options. The options use a key=value interface.
So every option is controlled by a key its value. To use an option you can
either provide a comma separated list of options when invoking
\textsc{metropolis} in the preamble of the presentation.
The theme provides a number of options, which can be set using a key=value
interface. The primary way to set options is to provide a comma-separated list
of option-value pairs when loading \themename in the preamble:
\begin{lstlisting}
\usetheme[<key=value list>]{metropolis}
\usetheme[option1=value1, option2=value2, ...]{metropolis}
\end{lstlisting}
Or you can set them at any time with the |\metroset| macro.
Options can be changed at any time --- even mid-presentation! --- with the
|\metroset| macro.
\begin{lstlisting}
\metroset{<key=value list>}
\end{lstlisting}
To set an option on a specific sub-package only you have to add the
corresponding prefix (inner, outer, color), e.g.
\begin{lstlisting}
\metroset{inner/block=fill}
\metroset{option1=newvalue1, option2=newvalue2, ...}
\end{lstlisting}
The list of options is structured as shown in the following example.
\DescribeOption{key}{list of possible values}{default value}{
\DescribeOption{option key}{list of possible values}{default}{
A short description of the option.
}
Although the options are grouped into the corresponding packages every option
can and in most cases should be set on the main theme directly. If an option
is listed in multiple sub-packages, setting it on the main theme will set the
option on every sub-package accordingly.
\subsubsection{Main theme}
\DescribeOption{titleformat}%
{regular, smallcaps, allsmallcaps, allcaps}
{regular}{
Shortcut option to change the titleformat of all titles together. Please
refer to section \ref{sec:titleformats} for known issues.
Changes the format of titles, subtitles, section titles, frame titles, and
the text on ``standout'' frames. The available options produce
Regular, \textsc{SmallCaps}, \textsc{\MakeLowercase{AllSmallCaps}}, or
\MakeUppercase{AllCaps} titles. Please refer to
Section~\ref{sec:titleformats} for known issues with these options.
}
\DescribeOption{titleformat plain}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Control the titleformat of the plain title. Please refer to section
\ref{sec:titleformats} for known issues.
Changes the format of ``standout'' frames (see |titleformat|, above).
}
\subsubsection{Inner theme}
\DescribeOption{block}{transparent, fill}{transparent}{
This option controls the block background. It can either be filled with a
light grey or be transparent.
}
\DescribeOption{sectionpage}{none, simple, progressbar}{progressbar}{
Disable section pages at all, typeset centered section title or add a thin
progress bar below the centered section title.
Adds a slide at the start of each section (|simple|) with an optional thin
progress bar below the section title (|progressbar|). The |none| option
disables the section page.
}
\DescribeOption{titleformat title}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Control the titleformat of the title. Please refer to section
\ref{sec:titleformats} for known issues.
\DescribeOption{subsectionpage}{none, simple, progressbar}{none}{
Optionally adds a slide at the start of each subsection. If enabled with
the |simple| or |progressbar| options, the style of the |section page| will
be updated to match the style of the |subsection page|. Note that section
slides and subsection slides can appear consecutively if both are enabled;
you may want to use this option together with |sectionpage=none| depending
on the section structure of your presentation.
}
\DescribeOption{titleformat subtitle}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Control the titleformat of the subtitle. Please refer to section
\ref{sec:titleformats} for known issues.
}
\DescribeOption{titleformat section}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Control the titleformat of the section title. Please refer to section
\ref{sec:titleformats} for known issues.
}
\subsubsection{Outer theme}
\DescribeOption{numbering}{none, counter, fraction}{counter}{
In the bottom right corner of each frame the current frame number is
displayed. This can be disabled or the total framenumber can be added
additionally.
Controls whether the frame number at the bottom right of each slide is
omitted (|none|), shown (|counter|) or displayed as a fraction of the total
number of frames (|fraction|).
}
\DescribeOption{progressbar}{none, head, frametitle, foot}{none}{
Adds a progress bar to the top of each frame (|head|), the bottom of each
frame (|foot|), or directly below each frame title (|frametitle|).
}
\DescribeOption{titleformat frame}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Control the titleformat of the frame title. Please refer to section
\ref{sec:titleformats} for known issues.
Optionally adds a progress bar to the top of each frame (|head|),
the bottom of each frame (|foot|), or directly below each frame title
(|frametitle|).
}
\subsubsection{Color theme}
\DescribeOption{block}{transparent, fill}{transparent}{
This option controls the block background. It can either be filled with a
light grey or be transparent.
Optionally adds a light grey background to block environments like |theorem|
and |example|.
}
\DescribeOption{background}{dark, light}{light}{
This option defines whether the background shall be dark and the foreground
be light or vice versa.
Provides the option to have a dark background and light foreground instead
of the reverse.
}
\subsubsection{Font theme}
\DescribeMacro{titleformat title}
\DescribeMacro{titleformat subtitle}
\DescribeMacro{titleformat section}
\DescribeOption{titleformat frame}%
{regular, smallcaps, allsmallcaps, allcaps}%
{regular}{
Individually controls the format of titles, subtitles, section titles, and
frame titles (see |titleformat|, above).
}
\subsection{Color Customization}
The included \themename color theme is used by default, but its colors can be
@ -406,6 +419,7 @@ terms of three beamer colors:
\item |alerted text| (colored fg, should be visible against dark or light)
\item |example text| (colored fg, should be visible against dark or light)
\end{itemize}
An easy way to customize the theme is to redefine these colors using
\begin{lstlisting}
@ -422,24 +436,39 @@ 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}
The default font for \themename is |Fira|. Yet this can be easily changed using
The default font for \themename is |Fira|. This can be easily changed using
the standard font selection commands of the \textsf{fontspec} package. So if
you for example prefer the \href{http://font.ubuntu.com}{|Ubuntu|} font family
just add the following two commands after loading the \themename theme.
you prefer, for example, the \href{http://font.ubuntu.com}{|Ubuntu|} font family, just add the following two commands after loading the \themename theme.
\begin{lstlisting}
\setsansfont{Ubuntu}
\setmonofont{Ubuntu Mono}
\end{lstlisting}
If you are expecting to present in a large room or with an underpowered
projector, you may want to change the font to a heavier weight of Fira to
maximize readability.
\begin{lstlisting}
\setsansfont[BoldFont={Fira Sans SemiBold}]{Fira Sans Book}
\end{lstlisting}
\subsubsection{Old style figures}
The regular \textsf{fontspec} mechanism for changing glyph appearance applies
also to this theme. In case you want to have old style figures in the text but
regular lined figures for math, you have to add the following to your preamble:
also to this theme. If you want to have old style figures in the text but
regular lined figures for math, you could add the following to your preamble:
\begin{lstlisting}
\usefonttheme{professionalfonts} % required for mathspec
@ -452,41 +481,84 @@ regular lined figures for math, you have to add the following to your preamble:
\subsection{Commands}
\begin{macro}{\plain}
The \lstinline|\plain{title=[]}{<body>}| command sets a slide in with a plain
dark background, which can be useful to focus attention on a single sentence
or image.
\subsubsection{Standout frames}
The \themename inner theme offers a custom frame format with large, centered
text and an inverted background --- perfect for focusing attention on
single sentence or image. To use it, add the key |standout| to the frame:
\begin{lstlisting}
\begin{frame}[standout]
Thank you!
\end{frame}
\end{lstlisting}
\section{\texttt{pgfplots} integration}
\themename comes with a set of pre-defined pgfplots styles and a color theme
based on Paul Tol's color scheme.
\subsection{Styles}
Pass the following style keys to the axis environment to get the appropriate
effect:
\begin{macro}{mlineplot}
Plot regular line charts with reduced axis frames, less intrusive legend and
subdued grid.
\end{macro}
\begin{macro}{mbarplot}
Plot vertical bar charts in a similar way as |mlineplot| but reduce grid usage.
\end{macro}
\begin{macro}{horizontal mbarplot}
Plot horizontal bar charts.
\end{macro}
\begin{macro}{disable thousands separator}
Helper style to remove thousands separator.
\end{macro}
\subsection{Paul Tol's colors: a \texttt{pgfplots} theme}
A good presentation uses colors that are
\subsection{Paul Tol colors}
\begin{itemize}
\item distinct from each other as much as possible, and
\item distinct from black and white,
\item under many different lighting and display environments, and
\item to color-blind viewers,
\item all while matching well together.
\end{itemize}
A good presentation uses colors that are distinct from each other as much as
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. Use the |mlineplot| key to plot line data and |mbarplot|
or horizontal |mbarplot| to plot bar charts.
based on Tol's work.
\section{Tips \& Tricks}
\subsection{Backup Slides}
Speakers will often include extra slides at the end of their presentation to
refer to during audience questions. One easy way to do this is to include the
\verb|appendixnumberbeamer| package in your preamble and call \verb|\appendix| before your backup slides.
\themename will automatically turn off slide numbering and progress bars for
slides in the appendix.
\section{Known Issues}
\subsection{Titleformats}
\subsection{Title formats}
\label{sec:titleformats}
If you want to use either |smallcaps| or |allsmallcaps| be aware that not
every font supports small caps. So make sure the font you are using does.
|allsmallcaps| and |allcaps| are quite nice from an aesthetic point of view,
but they introduce some issues by using |\MakeLowercase| and |\MakeUppercase|,
respectively.
Be aware that not every font supports small caps, so the |smallcaps| or
|allsmallcaps| options may not work if you use a font other than |Fira Sans|.
In particular, the Computer Modern sans-serif typeface, which is used when
\themename is compiled with pdf\LaTeX, does not have a small-caps variant.
The title format options |allsmallcaps| and |allcaps| are quite nice from an
aesthetic point of view, but their use of |\MakeLowercase| and
|\MakeUppercase| can cause unexpected problems. For example:
\begin{itemize}
\item Some commands, like |\\|, do not work inside |\MakeLowercase| and
@ -505,19 +577,114 @@ respectively.
\href{https://github.com/matze/mtheme/issues/153}{\#153})
\end{itemize}
\subsection{Plain Frame}
The |\plain| command does not work if you override the \themename color theme
with the default beamer color theme |fly|.
The |allsmallcaps| and |allcaps| options are safe to use if your titles contain
only alphabetic characters and do not require the expansion of any macros.
\subsection{Interactions with other color themes}
\themename can be used along with any other Beamer color theme, such as
|crane| or |seahorse|. If you wish to do this, it is usually best to include
the \themename subpackages individually so the \themename color theme is
never loaded. This will prevent conflicts between the \themename color theme
and your preferred theme.
For example, overriding the color theme as follows may not work as expected because |\usetheme{metropolis}| loads the \themename color theme, which
defines a relationship between the frametitle background and the primary
palette of the theme. Since |seahorse| assumes a different relationship
between its palettes, the result is a grey, rather than periwinkle,
frametitle background.
\begin{lstlisting}
\usetheme{metropolis}
\usecolortheme{seahorse}
\end{lstlisting}
The correct colors are chosen if the \themename outer, inner, and font themes
are loaded seperately:
\begin{lstlisting}
\useoutertheme{metropolis}
\useinnertheme{metropolis}
\usefonttheme{metropolis}
\usecolortheme{seahorse} % or your preferred color theme
\end{lstlisting}
Please note that \themename may not use all the colors defined in your
favourite Beamer color theme. In particular, \themename does not set a
background color for the title; this will cause issues when using color themes
like |whale| which set a white foreground for the title.
\subsection{Notes on second screen}
If you use the |[show notes on second screen]| option built in to Beamer and
compile with \XeLaTeX, text on slides following the first section slide may
be rendered in white instead of the regular colour. This is due to
\href{http://tex.stackexchange.com/questions/288408/}{a bug} in Beamer
or \XeLaTeX\ itself. You can work around it either by compiling with \LuaTeX\
or by adding the following code to your preamble to reset the text color
on each slide.
\begin{lstlisting}
\makeatletter
\def\beamer@framenotesbegin{% at beginning of slide
\usebeamercolor[fg]{normal text}
\gdef\beamer@noteitems{}%
\gdef\beamer@notes{}%
}
\makeatother
\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}
The theme itself is licensed under a
\themename is licensed under a
\href{http://creativecommons.org/licenses/by-sa/4.0/}{Creative Commons
Attribution-ShareAlike 4.0 International License}. This means that if you change
the theme and re-distribute it, you must retain the copyright notice header and
license it under the same CC-BY-SA license. This does not affect the
presentation that you create with the theme.
Attribution-ShareAlike 4.0 International License}.
This means that if you change the theme and re-distribute it, you must retain
the copyright notice header and license it under the same CC-BY-SA license.
This does not affect any presentations that you create with the theme.
\section{Implementation}

Binary file not shown.

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://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

View File

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

View File

@ -10,16 +10,10 @@
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
% ------------------------------------------------------------------------- \fi
% \iffalse
%<driver> \ProvidesFile{beamercolorthememetropolis.dtx}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamercolorthememetropolis}[2015/12/04 Metropolis color theme]
\ProvidesPackage{beamercolorthememetropolis}[2017/01/23 Metropolis color theme]
%</package>
%<driver> \documentclass{ltxdoc}
%<driver> \usepackage{beamercolorthememetropolis}
%<driver> \begin{document}
%<driver> \DocInput{beamercolorthememetropolis.dtx}
%<driver> \end{document}
% \fi
% \CheckSum{0}
% \StopEventually{}
@ -27,9 +21,11 @@
%<*package>
% ------------------------------------------------------------------------- \fi
%
% \subsection{\textsc{metropolis} color theme}
% \subsection{\themename color theme}
%
% Load required packages.
%
%
% \subsubsection{Package dependencies}
% \begin{macrocode}
\RequirePackage{pgfopts}
% \end{macrocode}
@ -39,34 +35,35 @@
% \subsubsection{Options}
%
% \begin{macro}{block}
% This option controls whether the blocks are filled or transparent.
% Optionally adds a light grey background to block environments like
% |theorem| and |example|.
% \begin{macrocode}
\pgfkeys{
/metropolis/color/block/.cd,
.is choice,
transparent/.code=\@metropolis@block@transparent,
fill/.code=\@metropolis@block@fill,
transparent/.code=\metropolis@block@transparent,
fill/.code=\metropolis@block@fill,
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{colors}
% Defines whether the background shall be dark and the foreground be light or
% vice versa
% Provides the option to have a dark background and light foreground instead
% of the reverse.
% \begin{macrocode}
\pgfkeys{
/metropolis/color/background/.cd,
.is choice,
dark/.code=\@metropolis@colors@dark,
light/.code=\@metropolis@colors@light,
dark/.code=\metropolis@colors@dark,
light/.code=\metropolis@colors@light,
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@metropolis@color@setdefaults}
% Set default values for color theme options.
% \begin{macro}{\metropolis@color@setdefaults}
% Sets default values for color theme options.
% \begin{macrocode}
\newcommand{\@metropolis@color@setdefaults}{
\newcommand{\metropolis@color@setdefaults}{
\pgfkeys{/metropolis/color/.cd,
background=light,
block=transparent,
@ -90,17 +87,18 @@
%
% \subsubsection{Base styles}
%
% All colors in the \textsc{metropolis} theme are derived from the definitions
% of |normal text|, |alerted text|, and |example text|.
% All colors in \themename are derived from the definitions of |normal text|,
% |alerted text|, and |example text|.
%
% \begin{macrocode}
\newcommand{\@metropolis@colors@dark}{
\newcommand{\metropolis@colors@dark}{
\setbeamercolor{normal text}{%
fg=black!2,
bg=mDarkTeal
}
\usebeamercolor[fg]{normal text}
}
\newcommand{\@metropolis@colors@light}{
\newcommand{\metropolis@colors@light}{
\setbeamercolor{normal text}{%
fg=mDarkTeal,
bg=black!2
@ -133,8 +131,8 @@
% \end{macrocode}
%
% The “primary” palette should be used for the most important navigational
% elements, and possibly of other elements. The \textsc{metropolis} theme uses
% it for frame titles and slides.
% elements, and possibly of other elements. \themename uses it for frame
% titles and slides.
%
% \begin{macrocode}
\setbeamercolor{palette primary}{%
@ -148,7 +146,7 @@
}
% \end{macrocode}
%
% The \textsc{metropolis} inner or outer themes optionally display progress
% The \themename inner or outer themes optionally display progress
% bars in various locations. Their color is set by |progress bar| but the two
% different kinds can be customized separately. The horizontal rule on the
% title page is also set based on the progress bar color and can be customized
@ -174,18 +172,33 @@
}
% \end{macrocode}
%
% Blocks
% Block environments such as |theorem| and |example| have no background color
% by default. The option |block=fill| sets a background color based on the
% background and foreground of |normal text|. The option |block=transparent|
% reverts the block environments to an empty background, which can be useful
% if changing colors mid-presentation.
%
% \begin{macrocode}
\newcommand{\@metropolis@block@transparent}{
\setbeamercolor{block title}{use=normal text, parent=normal text}
\newcommand{\metropolis@block@transparent}{
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
bg=
}
\setbeamercolor{block body}{
bg=
}
}
\newcommand{\@metropolis@block@fill}{
\newcommand{\metropolis@block@fill}{
\setbeamercolor{block title}{%
use=normal text,
fg=normal text.fg,
bg=normal text.bg!80!fg
}
\setbeamercolor{block body}{
use={block title, normal text},
bg=block title.bg!50!normal text.bg
}
}
\setbeamercolor{block title alerted}{%
use={block title, alerted text},
@ -199,10 +212,6 @@
}
\setbeamercolor{block body alerted}{use=block body, parent=block body}
\setbeamercolor{block body example}{use=block body, parent=block body}
\setbeamercolor{block body}{
use={block title, normal text},
bg=block title.bg!50!normal text.bg
}
% \end{macrocode}
%
% Footnotes
@ -212,10 +221,23 @@
\setbeamercolor{footnote mark}{fg=.}
% \end{macrocode}
%
% Process package options
% 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}
\@metropolis@color@setdefaults
\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}
%
% \begin{macrocode}
\metropolis@color@setdefaults
\ProcessPgfPackageOptions{/metropolis/color}
% \end{macrocode}
%

View File

@ -10,45 +10,50 @@
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
% ------------------------------------------------------------------------- \fi
% \iffalse
%<driver> \ProvidesFile{beamerfontthememetropolis.dtx}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerfontthememetropolis}[2015/12/04 Metropolis font theme]
\ProvidesPackage{beamerfontthememetropolis}[2017/01/23 Metropolis font theme]
%</package>
%<driver> \documentclass{ltxdoc}
%<driver> \usepackage{beamerfontthememetropolis}
%<driver> \begin{document}
%<driver> \DocInput{beamerfontthememetropolis.dtx}
%<driver> \end{document}
% \fi
% \CheckSum{0}
% \StopEventually{}
% \iffalse
%<*package>
% ------------------------------------------------------------------------- \fi
% \subsection{\textsc{metropolis} font theme}
%
% \subsection{\themename font theme}
%
% A |beamer| font theme sets the style of the font used in the document.
%
%
% Load required packages.
%
% \subsubsection{Package dependencies}
%
% \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
\RequirePackage{pgfopts}
% \end{macrocode}
%
% \subsubsection{Load Fira font}
% If the presentation is compiled with XeLaTeX or LuaLaTeX the fontspec package
% will be loaded.
%
%
% \subsubsection{Load Fira fonts}
%
% If the presentation is compiled with Xe\LaTeX{} or Lua\LaTeX{}, the fontspec
% package is loaded and we search for the |Fira| fonts.
%
% \begin{macrocode}
\ifboolexpr{bool {xetex} or bool {luatex}}{
\RequirePackage[no-math]{fontspec}
\@ifpackageloaded{fontspec}{
\PassOptionsToPackage{no-math}{fontspec}
}{
\RequirePackage[no-math]{fontspec}
}
% \end{macrocode}
%
% To simplify the check whether the |Fira| fonts are installed, a set macros is
% defined.
%
% \begin{macro}{\checkfont}
% Checks if a font is installed and increases |fontsnotfound| counter if not.
% Checks if a font is installed; if not, |fontsnotfound| is increased.
% \begin{macrocode}
\newcounter{fontsnotfound}
\newcommand{\checkfont}[1]{%
@ -64,11 +69,11 @@
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\iffontexists}
% Resets the |fontsnotfound| counter and calls |\checkfont| for each font in
% the comma separated list in the first argument.
% \begin{macro}{\iffontsavailable}
% Resets the |fontsnotfound| counter and calls |\checkfont| for each font in
% the comma separated list in the first argument.
% \begin{macrocode}
\newcommand{\iffontsexist}[3]{%
\newcommand{\iffontsavailable}[3]{%
\setcounter{fontsnotfound}{0}%
\expandafter\forcsvlist\expandafter%
\checkfont\expandafter{#1}%
@ -81,34 +86,42 @@
% \end{macrocode}
% \end{macro}
%
% Using the previously defined macros it is tried to load the |Fira| fonts.
% First the default |Fira| name will be tried. Second the |Fira| fonts with
% the suffix OT -- used by some Linux distributions -- will be tried. If this
% also fails a warning will be displayed and the standard fonts will be used.
% We search for regular, italic, light, light italic, mono, and mono bold
% fonts under the default |Fira Sans| and |Fira Mono| names. If this fails,
% the suffix OT --- used by some Linux distributions --- will be tried. If this
% also fails, a warning will be displayed and the standard fonts will be used.
%
% \begin{macrocode}
\iffontsexist{Fira Sans Light,%
Fira Sans Light Italic,%
Fira Sans,%
Fira Sans Italic}{%
\setsansfont[BoldFont={Fira Sans}]{Fira Sans Light}%
\iffontsavailable{Fira Sans Light,%
Fira Sans Light Italic,%
Fira Sans,%
Fira Sans Italic}%
{%
\setsansfont[ItalicFont={Fira Sans Light Italic},%
BoldFont={Fira Sans},%
BoldItalicFont={Fira Sans Italic}]%
{Fira Sans Light}%
}{%
\iffontsexist{Fira Sans Light OT,%
Fira Sans Light Italic OT,%
Fira Sans OT,%
Fira Sans Italic OT}{%
\setsansfont[BoldFont={Fira Sans OT}]{Fira Sans Light OT}%
\iffontsavailable{Fira Sans Light OT,%
Fira Sans Light Italic OT,%
Fira Sans OT,%
Fira Sans Italic OT}%
{%
\setsansfont[ItalicFont={Fira Sans Light Italic OT},%
BoldFont={Fira Sans OT},%
BoldItalicFont={Fira Sans Italic OT}]%
{Fira Sans Light OT}%
}{%
\PackageWarning{beamerthememetropolis}{%
Could not find Fira Sans fonts%
}
}
}
\iffontsexist{Fira Mono, Fira Mono Bold}{%
\setmonofont{Fira Mono}%
\iffontsavailable{Fira Mono, Fira Mono Bold}{%
\setmonofont[BoldFont={Fira Mono Medium}]{Fira Mono}%
}{%
\iffontsexist{Fira Mono OT, Fira Mono Bold OT}{%
\setmonofont{Fira Mono OT}%
\iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{%
\setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}%
}{%
\PackageWarning{beamerthememetropolis}{%
Could not find Fira Mono fonts%
@ -125,6 +138,10 @@
}
% \end{macrocode}
%
% This concludes the portion of the code which is only run when compiled with
% Xe\LaTeX{} or Lua\LaTeX{}. The remainder of this package applies regardless
% of the compiling engine.
%
%
%
% \subsubsection{General font definitions}
@ -136,8 +153,6 @@
\setbeamerfont{date}{size=\small}
\setbeamerfont{section title}{size=\Large,%
series=\bfseries}
\setbeamerfont{plain title}{size=\Large,%
series=\bfseries}
\setbeamerfont{block title}{size=\normalsize,%
series=\bfseries}
\setbeamerfont{block title alerted}{size=\normalsize,%
@ -157,8 +172,277 @@
series=\normalfont}
\setbeamerfont{bibliography entry note}{size=\small,%
series=\normalfont}
\setbeamerfont{standout}{size=\Large,%
series=\bfseries}
% \end{macrocode}
%
%
%
% \subsubsection{Title format options}
%
% \begin{macro}{titleformat title}
% Controls the format of the title.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat title/.cd,
.is choice,
regular/.code={%
\let\metropolis@titleformat\@empty%
\setbeamerfont{title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@titleformat\@empty%
\setbeamerfont{title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@titleformat\lowercase%
\setbeamerfont{title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat title=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@titleformat\uppercase%
\setbeamerfont{title}{shape=\normalfont}
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat title=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titleformat subtitle}
% Control the format of the subtitle.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat subtitle/.cd,
.is choice,
regular/.code={%
\let\metropolis@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@subtitleformat\lowercase%
\setbeamerfont{subtitle}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@subtitleformat\uppercase%
\setbeamerfont{subtitle}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat subtitle=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titleformat section}
% Controls the format of the section title.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat section/.cd,
.is choice,
regular/.code={%
\let\metropolis@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@sectiontitleformat\MakeLowercase%
\setbeamerfont{section title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat section=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@sectiontitleformat\MakeUppercase%
\setbeamerfont{section title}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat section=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{frametitleformat}
% Control the format of the frame title.
% \begin{macrocode}
\pgfkeys{
/metropolis/font/titleformat frame/.cd,
.is choice,
regular/.code={%
\let\metropolis@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\metropolis@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\metropolis@frametitleformat\MakeLowercase%
\setbeamerfont{frametitle}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat frame=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\metropolis@frametitleformat\MakeUppercase%
\setbeamerfont{frametitle}{shape=\normalfont}
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat frame=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \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}
% Sets default values for font theme options.
% \begin{macrocode}
\newcommand{\metropolis@font@setdefaults}{
\pgfkeys{/metropolis/font/.cd,
titleformat title=regular,
titleformat subtitle=regular,
titleformat section=regular,
titleformat frame=regular,
}
}
% \end{macrocode}
% \end{macro}
%
% We first define hooks to change the case format of the titles.
%
% \begin{macrocode}
\def\metropolis@titleformat#1{#1}
\def\metropolis@subtitleformat#1{#1}
\def\metropolis@sectiontitleformat#1{#1}
\def\metropolis@frametitleformat#1{#1}
% \end{macrocode}
%
% To make the uppercase and lowercase macros work in the title, subtitle, etc.,
% we have to patch the appropriate |beamer| commands that set their values.
% This solution was suggested by Enrico Gregorio in an answer to
% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange
% question}.
%
% \begin{macrocode}
\patchcmd{\beamer@title}%
{\def\inserttitle{#2}}%
{\def\inserttitle{\metropolis@titleformat{#2}}}%
{}%
{\PackageError{beamerfontthememetropolis}{Patching title failed}\@ehc}
\patchcmd{\beamer@subtitle}%
{\def\insertsubtitle{#2}}%
{\def\insertsubtitle{\metropolis@subtitleformat{#2}}}%
{}%
{\PackageError{beamerfontthememetropolis}{Patching subtitle failed}\@ehc}
\patchcmd{\sectionentry}
{\def\insertsectionhead{#2}}
{\def\insertsectionhead{\metropolis@sectiontitleformat{#2}}}
{}
{\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}
{}
\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
% the frame title we have to patch |\beamer@@frametitle|.
%
% \begin{macrocode}
\patchcmd{\beamer@@frametitle}
{{%
\gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space%
\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{{%
\gdef\insertframetitle{{\metropolis@frametitleformat{#2}\ifnum%
\beamer@autobreakcount>0\relax{}\space%
\usebeamertemplate*{frametitle continuation}\fi}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{}
{\PackageError{beamerfontthememetropolis}{Patching frame title failed}\@ehc}
% \end{macrocode}
%
%
%
% \subsubsection{Process package options}
%
% \begin{macrocode}
\metropolis@font@setdefaults
\ProcessPgfPackageOptions{/metropolis/font}
% \end{macrocode}
% \iffalse
%</package>
% \fi

View File

@ -10,16 +10,10 @@
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
% ------------------------------------------------------------------------- \fi
% \iffalse
%<driver> \ProvidesFile{beamerinnerthememetropolis.dtx}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerinnerthememetropolis}[2015/12/04 Metropolis inner theme]
\ProvidesPackage{beamerinnerthememetropolis}[2017/01/23 Metropolis inner theme]
%</package>
%<driver> \documentclass{ltxdoc}
%<driver> \usepackage{beamerinnerthememetropolis}
%<driver> \begin{document}
%<driver> \DocInput{beamerinnerthememetropolis.dtx}
%<driver> \end{document}
% \fi
% \CheckSum{0}
% \StopEventually{}
@ -27,7 +21,7 @@
%<*package>
% ------------------------------------------------------------------------- \fi
%
% \subsection{\textsc{metropolis} inner theme}
% \subsection{\themename inner theme}
%
% A |beamer| inner theme dictates the style of the frame elements traditionally
% set in the ``body'' of each slide. These include:
@ -40,9 +34,13 @@
% \item footnotes and plain text.
% \end{itemize}
%
% Load required packages.
%
%
% \subsubsection{Package dependencies}
%
% \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{keyval}
\RequirePackage{calc}
\RequirePackage{pgfopts}
\RequirePackage{tikz}
@ -52,137 +50,43 @@
%
% \subsubsection{Options}
%
% \begin{macro}{block}
% This option controls the block style.
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/block/.cd,
.is choice,
transparent/.code=\setlength{\@metropolis@blockskip}{0ex},
fill/.code=\setlength{\@metropolis@blockskip}{1ex},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titleformat title}
% Control the titleformat of the title
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/titleformat title/.cd,
.is choice,
regular/.code={%
\let\@metropolis@titleformat\@empty%
\setbeamerfont{title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\@metropolis@titleformat\@empty%
\setbeamerfont{title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\@metropolis@titleformat\MakeLowercase%
\setbeamerfont{title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat title=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\@metropolis@titleformat\MakeUppercase%
\setbeamerfont{title}{shape=\normalfont}
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat title=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titleformat subtitle}
% Control the titleformat of the subtitle
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/titleformat subtitle/.cd,
.is choice,
regular/.code={%
\let\@metropolis@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\normalfont}%
},
smallcaps/.code={%
\let\@metropolis@subtitleformat\@empty%
\setbeamerfont{subtitle}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\@metropolis@subtitleformat\MakeLowercase%
\setbeamerfont{subtitle}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat subtitle=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\@metropolis@subtitleformat\MakeUppercase%
\setbeamerfont{subtitle}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat subtitle=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{titleformat section}
% Control the titleformat of the section title
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/titleformat section/.cd,
.is choice,
regular/.code={%
\let\@metropolis@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\normalfont}%
},
smallcaps/.code={%
\let\@metropolis@sectiontitleformat\@empty%
\setbeamerfont{section title}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\@metropolis@sectiontitleformat\MakeLowercase%
\setbeamerfont{section title}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat section=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\@metropolis@sectiontitleformat\MakeUppercase%
\setbeamerfont{section title}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat section=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{sectionpage}
% The |sectionpage| option defines the behaviour of the sectionpage.
% Optionally add a slide marking the beginning of each section.
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/sectionpage/.cd,
.is choice,
none/.code=\@metropolis@sectionpage@none,
simple/.code=\@metropolis@sectionpage@simple,
progressbar/.code=\@metropolis@sectionpage@progressbar,
none/.code=\metropolis@disablesectionpage,
simple/.code={\metropolis@enablesectionpage
\setbeamertemplate{section page}[simple]},
progressbar/.code={\metropolis@enablesectionpage
\setbeamertemplate{section page}[progressbar]},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@metropolis@inner@setdefaults}
% \begin{macro}{subsectionpage}
% Optionally add a slide marking the beginning of each subsection.
% \begin{macrocode}
\pgfkeys{
/metropolis/inner/subsectionpage/.cd,
.is choice,
none/.code=\metropolis@disablesubsectionpage,
simple/.code={\metropolis@enablesubsectionpage
\setbeamertemplate{section page}[simple]},
progressbar/.code={\metropolis@enablesubsectionpage
\setbeamertemplate{section page}[progressbar]},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\metropolis@inner@setdefaults}
% Set default values for inner theme options.
% \begin{macrocode}
\newcommand{\@metropolis@inner@setdefaults}{
\newcommand{\metropolis@inner@setdefaults}{
\pgfkeys{/metropolis/inner/.cd,
sectionpage=progressbar,
block=transparent,
titleformat title=regular,
titleformat subtitle=regular,
titleformat section=regular,
subsectionpage=none
}
}
% \end{macrocode}
@ -192,35 +96,6 @@
%
% \subsubsection{Title page}
%
% \begin{macro}{\@metropolis@titleformat}
% Define hooks to change the case format of the titles.
% \begin{macrocode}
\def\@metropolis@titleformat#1{#1}
\def\@metropolis@subtitleformat#1{#1}
\def\@metropolis@sectiontitleformat#1{#1}
% \end{macrocode}
% \end{macro}
%
% To make the |\MakeLowercase| and |\MakeUppercase| macros work in the
% sectiontitle we have to patch |\sectionentry| and |\beamer@section|. This
% solution was suggested by Enrico Gregorio in an answer to
% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange
% question}.
%
% \begin{macrocode}
\patchcmd{\sectionentry}
{\def\insertsectionhead{#2}}
{\def\insertsectionhead{\@metropolis@sectiontitleformat{#2}}}
{}
{\PackageError{beamerinnerthememetropolis}{Patching section title failed}}
\patchcmd{\beamer@section}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}}
{\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{%
\@metropolis@sectiontitleformat{#1}}}}
{}
{\PackageError{beamerinnerthememetropolis}{Patching section title failed}}
% \end{macrocode}
%
% \begin{macro}{title page}
% Template for the title page. Each element is only typset if it is defined
% by the user. If |\subtitle| is empty, for example, it won't leave a blank
@ -268,7 +143,7 @@
\ifbeamer@inframe
\titlepage
\else
\frame[plain]{\titlepage}
\frame[plain,noframenumbering]{\titlepage}
\fi
}
\def\titlepage{%
@ -298,7 +173,7 @@
\setbeamertemplate{title}{
\raggedright%
\linespread{1.0}%
\@metropolis@titleformat{\inserttitle}%
\inserttitle%
\par%
\vspace*{0.5em}
}
@ -309,7 +184,8 @@
% Set the subtitle on the title page.
% \begin{macrocode}
\setbeamertemplate{subtitle}{
\@metropolis@subtitleformat{\insertsubtitle}%
\raggedright%
\insertsubtitle%
\par%
\vspace*{0.5em}
}
@ -320,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}
@ -371,44 +251,73 @@
% Template for the section title slide at the beginning of each section.
%
% \begin{macrocode}
\newcommand{\@metropolis@sectionpage@none}{
\AtBeginSection{
% intenionally empty
}
}
\defbeamertemplate{section page}{simple}{
\centering
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\insertsectionhead\\
}
\newcommand{\@metropolis@sectionpage@simple}{
\setbeamertemplate{section page}[simple]
\AtBeginSection{
\ifbeamer@inframe
\sectionpage
\else
\frame[plain,c]{\sectionpage}
\begin{center}
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\insertsectionhead\par
\ifx\insertsubsectionhead\@empty\else
\usebeamercolor[fg]{subsection title}
\usebeamerfont{subsection title}
\insertsubsectionhead
\fi
}
\end{center}
}
\defbeamertemplate{section page}{progressbar}{
\centering
\begin{minipage}{22em}
\raggedright
\usebeamercolor[fg]{section title}
\usebeamerfont{section title}
\insertsectionhead\\[-1ex]
\usebeamertemplate*{progress bar in section page}
\par
\ifx\insertsubsectionhead\@empty\else%
\usebeamercolor[fg]{subsection title}%
\usebeamerfont{subsection title}%
\insertsubsectionhead
\fi
\end{minipage}
\par
\vspace{\baselineskip}
}
\newcommand{\@metropolis@sectionpage@progressbar}{
\setbeamertemplate{section page}[progressbar]
\newcommand{\metropolis@disablesectionpage}{
\AtBeginSection{
% intentionally empty
}
}
\newcommand{\metropolis@enablesectionpage}{
\AtBeginSection{
\ifbeamer@inframe
\sectionpage
\else
\frame[plain,c]{\sectionpage}
\frame[plain,c,noframenumbering]{\sectionpage}
\fi
}
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{subsection page}
%
% Template for the subsection title slide that can optionally be added to
% at the beginning of each subsection.
%
% \begin{macrocode}
\setbeamertemplate{subsection page}{%
\usebeamertemplate*{section page}
}
\newcommand{\metropolis@disablesubsectionpage}{
\AtBeginSubsection{
% intentionally empty
}
}
\newcommand{\metropolis@enablesubsectionpage}{
\AtBeginSubsection{
\ifbeamer@inframe
\subsectionpage
\else
\frame[plain,c,noframenumbering]{\subsectionpage}
\fi
}
}
@ -423,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}
%
@ -453,87 +366,113 @@
%
% \subsubsection{Block environments}
%
% Regular block environment
%
% \begin{macro}{block}
% \begin{macro}{block alerted}
% \begin{macro}{block example}
%
% The three different block environments differ only in their colours.
% Rather than repeat the essentially the same template three times, we use
% the auxiliary macro |\metropolis@block| to define all three templates.
%
% \begin{macrocode}
\newlength{\@metropolis@blockskip}
\setbeamertemplate{block begin}{%
\setlength{\parskip}{\@metropolis@parskip}
\vspace*{1ex}
\begin{beamercolorbox}[%
ht=2.4ex,
dp=1ex,
leftskip=\@metropolis@blockskip,
rightskip=\@metropolis@blockskip]{block title}
\usebeamerfont*{block title}\insertblocktitle%
\end{beamercolorbox}%
\vspace*{-1pt}
\usebeamerfont{block body}%
\begin{beamercolorbox}[%
dp=1ex,
leftskip=\@metropolis@blockskip,
rightskip=\@metropolis@blockskip,
vmode]{block body}%
\newlength{\metropolis@blocksep}
\newlength{\metropolis@blockadjust}
\setlength{\metropolis@blocksep}{0.75ex}
\setlength{\metropolis@blockadjust}{0.25ex}
\providecommand{\metropolis@strut}{%
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}%
}
\setbeamertemplate{block end}{%
\end{beamercolorbox}
\vspace*{0.2ex}
\newcommand{\metropolis@block}[1]{
\par\vskip\medskipamount%
\setlength{\parskip}{0pt}
% \end{macrocode}
%
% If a background color is defined for the block title or body, we need to
% add a little bit of padding to the corresponding box. Ideally, this would
% be accomplished by setting |colsep=0.75ex|, which is intended to add
% ``color separation space'' only when the box has a colored background.
% Unfortunately, |colsep| also adds this separation if the background color
% is inherited, even if the inherited color is actually empty.
% (The technical reason for this boils down to the fact that the |\ifx|
% directive does not expand macros.)
%
% To achieve the correct spacing for |alertblock|s and |exampleblock|s
% as well as for normal blocks, we have to begin the |beamercolorbox|
% differently based on whether |block title| has an empty background.
%
% If the |block title| background is empty, or the user has explicitly
% removed the background from (e.g.) |block title alerted|, we just need to
% set a rightskip for a nice ragged-right block title.
%
% \begin{macrocode}
\ifbeamercolorempty[bg]{block title#1}{%
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{%
\ifbeamercolorempty[bg]{block title}{%
\begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}%
}%
% \end{macrocode}
%
% Otherwise, if the |block title| has a background, we set the padding based
% on |\metropolis@blockskip|. However, we have to visually compensate for
% the |\metropolis@strut| added to the block title (see below) by
% subtracting |\metropolis@blockadjust| from the top and bottom padding.
%
% \begin{macrocode}
{%
\begin{beamercolorbox}[
sep=\dimexpr\metropolis@blocksep-\metropolis@blockadjust\relax,
leftskip=\metropolis@blockadjust,
rightskip=\dimexpr\metropolis@blockadjust plus 4em\relax
]{block title#1}%
}}%
% \end{macrocode}
%
% We can now set the contents of the |block title|. The zero-width but
% positive-height box |\metropolis@strut| ensures that the block title box
% has a consistent height, even if it lacks punctuation, ascenders, or
% descenders.
%
% \begin{macrocode}
\usebeamerfont*{block title#1}%
\metropolis@strut%
\insertblocktitle%
\metropolis@strut%
\end{beamercolorbox}%
% \end{macrocode}
%
% Next, we typeset the |block body|. This the code is similar to, but simpler
% than, the |block title| code since we don't need to adjust for any struts.
%
% \begin{macrocode}
\nointerlineskip%
\ifbeamercolorempty[bg]{block body#1}{%
\begin{beamercolorbox}[vmode]{block body#1}}{
\ifbeamercolorempty[bg]{block body}{%
\begin{beamercolorbox}[vmode]{block body#1}%
}{%
\begin{beamercolorbox}[sep=\metropolis@blocksep, vmode]{block body#1}%
\vspace{-\metropolis@parskip}
}}%
\usebeamerfont{block body#1}%
\setlength{\parskip}{\metropolis@parskip}%
}
% \end{macrocode}
%
% Alerted block environment
% This concludes the auxiliary macro |\metropolis@block|. Finally,
% we define the block beamer templates using this macro.
%
% \begin{macrocode}
\setbeamertemplate{block alerted begin}{%
\setlength{\parskip}{\@metropolis@parskip}
\vspace*{1ex}
\begin{beamercolorbox}[%
ht=2.4ex,
dp=1ex,
leftskip=\@metropolis@blockskip,
rightskip=\@metropolis@blockskip]{block title alerted}
\usebeamerfont*{block title alerted}\insertblocktitle%
\end{beamercolorbox}%
\vspace*{-1pt}
\usebeamerfont{block body alerted}%
\begin{beamercolorbox}[%
dp=1ex,
leftskip=\@metropolis@blockskip,
rightskip=\@metropolis@blockskip,
vmode]{block body alerted}%
}
\setbeamertemplate{block alerted end}{%
\end{beamercolorbox}
\vspace*{0.2ex}
}
% \end{macrocode}
%
% Example block environment
%
% \begin{macrocode}
\setbeamertemplate{block example begin}{%
\setlength{\parskip}{\@metropolis@parskip}
\vspace*{1ex}
\begin{beamercolorbox}[%
ht=2.4ex,
dp=1ex,
leftskip=\@metropolis@blockskip,
rightskip=\@metropolis@blockskip]{block title example}
\usebeamerfont*{block title example}\insertblocktitle%
\end{beamercolorbox}%
\vspace*{-1pt}
\usebeamerfont{block body example}%
\begin{beamercolorbox}[%
dp=1ex,
leftskip=\@metropolis@blockskip,
rightskip=\@metropolis@blockskip,
vmode]{block body example}%
}
\setbeamertemplate{block example end}{%
\end{beamercolorbox}
\vspace*{0.2ex}
}
\setbeamertemplate{block begin}{\metropolis@block{}}
\setbeamertemplate{block alerted begin}{\metropolis@block{ alerted}}
\setbeamertemplate{block example begin}{\metropolis@block{ example}}
\setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}}
\setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}}
\setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}}
% \end{macrocode}
% \end{macro}
% \end{macro}
% \end{macro}
%
%
%
@ -561,9 +500,9 @@
% \subsubsection{Text and spacing settings}
%
% \begin{macrocode}
\newlength{\@metropolis@parskip}
\setlength{\@metropolis@parskip}{0.5em}
\setlength{\parskip}{\@metropolis@parskip}
\newlength{\metropolis@parskip}
\setlength{\metropolis@parskip}{0.5em}
\setlength{\parskip}{\metropolis@parskip}
\linespread{1.15}
% \end{macrocode}
%
@ -584,10 +523,80 @@
}
% \end{macrocode}
%
% Process package options
%
%
% \subsubsection{Standout frames}
%
% \themename offers a custom frame format with large, centered text and an
% inverted background. To use it, add the key |standout| to the frame:
% |\begin{frame}[standout] ... \end{frame}|.
%
% \begin{macro}{standout}
%
% 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 set frame options.
%
% \begin{macrocode}
\@metropolis@inner@setdefaults
\providebool{metropolis@standout}
\define@key{beamerframe}{standout}[true]{%
\booltrue{metropolis@standout}
\begingroup
\setkeys{beamerframe}{c}
\setkeys{beamerframe}{noframenumbering}
\ifbeamercolorempty[bg]{palette primary}{
\setbeamercolor{background canvas}{
use=palette primary,
bg=-palette primary.fg
}
}{
\setbeamercolor{background canvas}{
use=palette primary,
bg=palette primary.bg
}
}
\setbeamercolor{local structure}{
fg=palette primary.fg
}
\usebeamercolor[fg]{palette primary}
}
% \end{macrocode}
%
% Then we just have to close the group after the standout slide is finished
% 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 prepend the |\endgroup| to |\beamer@reseteecodes|, which is run
% exactly once at the end of each slide.
%
% \begin{macrocode}
\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}
%
% \begin{macrocode}
\metropolis@inner@setdefaults
\ProcessPgfPackageOptions{/metropolis/inner}
% \end{macrocode}
%

View File

@ -10,16 +10,10 @@
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
% ------------------------------------------------------------------------- \fi
% \iffalse
%<driver> \ProvidesFile{beamerouterthememetropolis.dtx}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerouterthememetropolis}[2015/12/04 Metropolis outer theme]
\ProvidesPackage{beamerouterthememetropolis}[2017/01/23 Metropolis outer theme]
%</package>
%<driver> \documentclass{ltxdoc}
%<driver> \usepackage{beamerouterthememetropolis}
%<driver> \begin{document}
%<driver> \DocInput{beamerouterthememetropolis.dtx}
%<driver> \end{document}
% \fi
% \CheckSum{0}
% \StopEventually{}
@ -27,12 +21,15 @@
%<*package>
% ------------------------------------------------------------------------- \fi
%
% \subsection{\textsc{metropolis} outer theme}
% \subsection{\themename outer theme}
%
% A |beamer| outer theme dictates the style of the frame elements traditionally
% set outside the body of each slide: the head, footline, and frame title.
%
% Load required packages.
%
%
% \subsubsection{Package dependencies}
%
% \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{calc}
@ -44,7 +41,7 @@
% \subsubsection{Options}
%
% \begin{macro}{numbering}
% This option controls the page numbering.
% Adds slide numbers to the bottom right of each slide.
% \begin{macrocode}
\pgfkeys{
/metropolis/outer/numbering/.cd,
@ -57,7 +54,7 @@
% \end{macro}
%
% \begin{macro}{progressbar}
% This option controls the progressbar.
% Adds a progress bar to the top, bottom, or frametitle of each slide.
% \begin{macrocode}
\pgfkeys{
/metropolis/outer/progressbar/.cd,
@ -86,58 +83,13 @@
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{frametitleformat}
% Control the titleformat of the frame title
% \begin{macro}{\metropolis@outer@setdefaults}
% Sets default values for outer theme options.
% \begin{macrocode}
\pgfkeys{
/metropolis/outer/titleformat frame/.cd,
.is choice,
regular/.code={%
\let\@metropolis@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\normalfont}%
\renewcommand{\@metropolis@frametitlestrut}{%
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}%
}
},
smallcaps/.code={%
\let\@metropolis@frametitleformat\@empty%
\setbeamerfont{frametitle}{shape=\scshape}%
\renewcommand{\@metropolis@frametitlestrut}{%
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz}%
}
},
allsmallcaps/.code={%
\let\@metropolis@frametitleformat\MakeLowercase%
\setbeamerfont{frametitle}{shape=\scshape}%
\renewcommand{\@metropolis@frametitlestrut}{%
\vphantom{abcdefghijklmnopqrstuvwxyz}%
}
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat frame=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\@metropolis@frametitleformat\MakeUppercase%
\setbeamerfont{frametitle}{shape=\normalfont}
\renewcommand{\@metropolis@frametitlestrut}{%
\vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZ}%
}
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat frame=allcaps can lead to problems%
}
},
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\@metropolis@outer@setdefaults}
% Set default values for outer theme options.
% \begin{macrocode}
\newcommand{\@metropolis@outer@setdefaults}{
\newcommand{\metropolis@outer@setdefaults}{
\pgfkeys{/metropolis/outer/.cd,
numbering=counter,
progressbar=none,
titleformat frame=regular,
}
}
% \end{macrocode}%
@ -148,14 +100,19 @@
% \subsubsection{Head and footline}
%
% All good |beamer| presentations should already remove the navigation symbols,
% but \textsc{metropolis} removes them automatically (just in case).
% but \themename removes them automatically (just in case).
%
% \begin{macrocode}
\setbeamertemplate{navigation symbols}{}
% \end{macrocode}
%
% Templates for the frame number. Can be omitted, shown or displayed as a
% fraction of the total frames.
% \begin{macro}{frame numbering}
% Templates for the frame number. Can be omitted, shown or displayed as a
% fraction of the total frames.
% \begin{macrocode}
\defbeamertemplate{frame footer}{none}{}
\defbeamertemplate{frame footer}{custom}[1]{ #1 }
% \end{macrocode}
%
% \begin{macrocode}
\defbeamertemplate{frame numbering}{none}{}
@ -164,100 +121,113 @@
\insertframenumber/\inserttotalframenumber
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{headline}
% \begin{macro}{footline}
% Templates for the head- and footline at the top and bottom of each frame.
% \begin{macrocode}
\defbeamertemplate{headline}{plain}{}
\defbeamertemplate{footline}{plain}{%
\begin{beamercolorbox}[wd=\textwidth, sep=3ex]{footline}%
\hfill%
\usebeamerfont{page number in head/foot}%
\usebeamertemplate*{frame footer}
\hfill%
\usebeamertemplate*{frame numbering}
\end{beamercolorbox}%
}
% \end{macrocode}
% \end{macro}
% \end{macro}
%
%
%
% \subsubsection{Frametitle}
%
% \begin{macro}{\@metropolis@frametitleformat}
% Define a hook to change the case format of the frame title.
% \begin{macrocode}
\def\@metropolis@frametitleformat#1{#1}
% \end{macrocode}
% \end{macro}
%
% To make the |\MakeLowercase| and |\MakeUppercase| macros work in the
% frame title we have to patch |\beamer@@frametitle|. This solution was
% suggested by Enrico Gregorio in an answer to
% \href{http://tex.stackexchange.com/questions/112526/}{this StackExchange
% question}.
%
% \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}}%
\gdef\beamer@frametitle{#2}%
\gdef\beamer@shortframetitle{#1}%
}}
{}
{\PackageError{beamerouterthememetropolis}{Patching frame title failed}}
% \end{macrocode}
%
% \begin{macro}{frametitle}
%
% Templates for the frame title, which is optionally underlined with a
% progress bar.
%
% Templates for the frame title, which is optionally underlined with a
% progress bar.
% \begin{macrocode}
\newlength{\@metropolis@frametitlestrut}
\newlength{\metropolis@frametitle@padding}
\setlength{\metropolis@frametitle@padding}{2.2ex}
\newcommand{\metropolis@frametitlestrut@start}{
\rule{0pt}{\metropolis@frametitle@padding +%
\totalheightof{%
\ifcsdef{metropolis@frametitleformat}{\metropolis@frametitleformat X}{X}%
}%
}%
}
\newcommand{\metropolis@frametitlestrut@end}{
\rule[-\metropolis@frametitle@padding]{0pt}{\metropolis@frametitle@padding}
}
\defbeamertemplate{frametitle}{plain}{%
\nointerlineskip%
\begin{beamercolorbox}[%
wd=\paperwidth,%
sep=1.5ex,%
sep=0pt,%
leftskip=\metropolis@frametitle@padding,%
rightskip=\metropolis@frametitle@padding,%
]{frametitle}%
\@metropolis@frametitlestrut\insertframetitle\@metropolis@frametitlestrut%
\metropolis@frametitlestrut@start%
\insertframetitle%
\nolinebreak%
\metropolis@frametitlestrut@end%
\end{beamercolorbox}%
}
\setbeamertemplate{frametitle continuation}{%
\usebeamerfont{frametitle}
\romannumeral \insertcontinuationcount
}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{progress bar in head/foot}
%
% Template for the progress bar optionally displayed below the frame title
% on each page. Much of this code is duplicated in the inner theme's template
% |progress bar in section page|.
%
% Template for the progress bar optionally displayed below the frame title
% on each page. Much of this code is duplicated in the inner theme's
% 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}
% \end{macro}
%
% Process package options
%
%
% \begin{macro}{appendix}
% Removes page numbering and per-slide progress bars when |\appendix| is
% called. This makes it easier to include additional ``backup slides'' at
% the end of the presentation, especially in conjunction with the package
% |appendixnumberbeamer|.
% \begin{macrocode}
\AtBeginDocument{%
\apptocmd{\appendix}{%
\pgfkeys{%
/metropolis/outer/.cd,
numbering=none,
progressbar=none}
}{}{}
}
% \end{macrocode}
% \end{macro}
% \subsubsection{Process package options}
%
% \begin{macrocode}
\@metropolis@outer@setdefaults
\metropolis@outer@setdefaults
\ProcessPgfPackageOptions{/metropolis/outer}
% \end{macrocode}
%

View File

@ -10,16 +10,11 @@
% International License (https://creativecommons.org/licenses/by-sa/4.0/).
% ------------------------------------------------------------------------- \fi
% \iffalse
%<driver> \ProvidesFile{beamerthememetropolis.dtx}
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{beamerthememetropolis}[2015/12/04 Metropolis Beamer theme]
\ProvidesPackage{beamerthememetropolis}
[2017/01/23 v1.2 Metropolis Beamer theme]
%</package>
%<driver> \documentclass{ltxdoc}
%<driver> \usepackage{beamerthememetropolis}
%<driver> \begin{document}
%<driver> \DocInput{beamerthememetropolis.dtx}
%<driver> \end{document}
% \fi
% \CheckSum{0}
% \StopEventually{}
@ -27,28 +22,26 @@
%<*package>
% ------------------------------------------------------------------------- \fi
%
% \subsection{\textsc{metropolis} main theme}
% \subsection{\themename parent theme}
%
% The primary job of this package is to load the component sub-packages of the
% \textsc{metropolis} theme and route the theme options accordingly. It also
% \themename theme and route the theme options accordingly. It also
% provides some custom commands and environments for the user.
%
% Load the required packages.
%
%
% \subsubsection{Package dependencies}
%
% \begin{macrocode}
\RequirePackage{etoolbox}
\RequirePackage{pgfopts}
% \end{macrocode}
%
%
%
% \subsubsection{Options}
%
% \begin{macro}{\metroset}
% First of all we define a macro for the user to set options.
% \begin{macrocode}
\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}}
% \end{macrocode}
% \end{macro}
%
% Then we need to pass the unknown options to the sub-packages.
% Most options are passed off to the component sub-packages.
%
% \begin{macrocode}
\pgfkeys{/metropolis/.cd,
@ -56,43 +49,35 @@
/metropolis/inner,
/metropolis/outer,
/metropolis/color,
},
% \end{macrocode}
%
% We have to forwarded keys that affect multiple sub-packages manually.
%
% \begin{macrocode}
block/.code=\pgfkeysalso{
inner/block=#1,
color/block=#1,
},
/metropolis/font,
}
}
% \end{macrocode}
%
% \begin{macro}{titleformat plain}
% Control the titleformat of the plain title
% Controls the formatting of the text on standout ``plain'' frames.
% \begin{macrocode}
\pgfkeys{
/metropolis/titleformat plain/.cd,
.is choice,
regular/.code={%
\let\@metropolis@plaintitleformat\@empty%
\setbeamerfont{plain title}{shape=\normalfont}%
\let\metropolis@plaintitleformat\@empty%
\setbeamerfont{standout}{shape=\normalfont}%
},
smallcaps/.code={%
\let\@metropolis@plaintitleformat\@empty%
\setbeamerfont{plain title}{shape=\scshape}%
\let\metropolis@plaintitleformat\@empty%
\setbeamerfont{standout}{shape=\scshape}%
},
allsmallcaps/.code={%
\let\@metropolis@plaintitleformat\MakeLowercase%
\setbeamerfont{plain title}{shape=\scshape}%
\let\metropolis@plaintitleformat\MakeLowercase%
\setbeamerfont{standout}{shape=\scshape}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat plain=allsmallcaps can lead to problems%
}
},
allcaps/.code={%
\let\@metropolis@plaintitleformat\MakeUppercase%
\setbeamerfont{plain title}{shape=\normalfont}%
\let\metropolis@plaintitleformat\MakeUppercase%
\setbeamerfont{standout}{shape=\normalfont}%
\PackageWarning{beamerthememetropolis}{%
Be aware that titleformat plain=allcaps can lead to problems%
}
@ -102,14 +87,15 @@
% \end{macro}
%
% \begin{macro}{titleformat}
% Control the titleformat of every title type together
% Sets a standard format for titles, subtitles, section titles, frame
% titles, and the text on standout ``plain'' frames.
% \begin{macrocode}
\pgfkeys{
/metropolis/titleformat/.code=\pgfkeysalso{
inner/titleformat title=#1,
inner/titleformat subtitle=#1,
inner/titleformat section=#1,
outer/titleformat frame=#1,
font/titleformat title=#1,
font/titleformat subtitle=#1,
font/titleformat section=#1,
font/titleformat frame=#1,
titleformat plain=#1,
}
}
@ -133,19 +119,28 @@
% Set default values for options.
%
% \begin{macrocode}
\newcommand{\@metropolis@setdefaults}{
\newcommand{\metropolis@setdefaults}{
\pgfkeys{/metropolis/.cd,
titleformat plain=regular,
}
}
% \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}
%
% Having processed the options, we can now load the component sub-packages of
% the theme.
%
% \begin{macrocode}
\useinnertheme{metropolis}
\useoutertheme{metropolis}
@ -167,34 +162,30 @@
%
% \subsubsection{Custom commands}
%
% We define custom commands in this package as their proper usage may depend
% The parent theme defines custom commands as their proper usage may depend
% on multiple sub-packages.
%
% \begin{macro}{\@metropolis@plaintitleformat}
% Define a hook to change the case format of the plain title.
% \begin{macro}{\metroset}
% Allows the user to change options midway through a presentation.
% \begin{macrocode}
\def\@metropolis@plaintitleformat#1{#1}
\newcommand{\metroset}[1]{\pgfkeys{/metropolis/.cd,#1}}
% \end{macrocode}
% \end{macro}
%
% \begin{macro}{\plain}
% Creates a plain frame with dark background, suitable for displaying images
% or a few words.
% or a few words. The format of the text can be set with the
% |titleformat plain| option.
% \begin{macrocode}
\def\metropolis@plaintitleformat#1{#1}
\newcommand{\plain}[2][]{%
\begingroup
\setbeamercolor{background canvas}{
use=palette primary,
parent=palette primary
}
\begin{frame}[c]{#1}
\begin{center}
\usebeamercolor[fg]{palette primary}
\usebeamerfont{plain title}
\@metropolis@plaintitleformat{#2}
\end{center}
\end{frame}
\endgroup
\PackageWarning{beamerthememetropolis}{%
The syntax `\plain' may be deprecated in a future version of Metropolis.
Please use a frame with [standout] instead.
}
\begin{frame}[standout]{#1}
\metropolis@plaintitleformat{#2}
\end{frame}
}
% \end{macrocode}
% \end{macro}
@ -205,10 +196,12 @@
% \end{macrocode}
% \end{macro}
%
% Process package options
%
%
% \subsubsection{Process package options}
%
% \begin{macrocode}
\@metropolis@setdefaults
\metropolis@setdefaults
\ProcessPgfOptions{/metropolis}
% \end{macrocode}
%

View File

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

View File

@ -16,7 +16,7 @@
%<*package>
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{pgfplotsthemetol}
[2015/06/16 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}