feat: merge changes from pandoc 3.6 LaTeX template (#414)

* feat: merge changes from pandoc 3.6 LaTeX & Beamer template
* feat: merge changes from pandoc 3.6.1 LaTeX & Beamer template
* feat: add new partial `$font-settings.latex()$` to the release script
* chore: add changelog for version `3.1.0`
This commit is contained in:
Pascal Wagler 2025-01-18 19:52:01 +01:00 committed by GitHub
parent 5dddcb34f9
commit c250725762
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 147 additions and 139 deletions

View File

@ -2,6 +2,18 @@
All notable changes to this project are documented in this file. On the [releases page](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/) you can see all released versions of the Eisvogel template and download the [latest version](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest). All notable changes to this project are documented in this file. On the [releases page](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/) you can see all released versions of the Eisvogel template and download the [latest version](https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest).
## [3.1.0] - 2025-01-18
- feat: Merge changes from the pandoc default LaTeX template from version 3.6 ([f1c01b0](https://github.com/jgm/pandoc-templates/commit/f1c01b0ee3562f54bfe7730939e7ec0a48769953)).
- feat: Merge changes from the pandoc default LaTeX template from version 3.6.1 ([b033aa1](https://github.com/jgm/pandoc-templates/commit/b033aa1ff304a87b15866517938fc87a20077a16)).
- docs: add example `twoside` for a two-sided document (#412)
- docs: add example `columns` for a two column document (#411)
- docs: remove unneeded package `ulem` from the section *Required LaTeX Packages* in the README and from ci
- docs: fix typos and convert links to HTTPS (#400, deining)
- chore: update copyright year in LICENSE
- ci: bump GitHub action workflows to avoid deprecation warnings (#401, deining)
- fix: correct link to commit 2a6268d in CHANGELOG.md
## [3.0.0] - 2025-01-11 ## [3.0.0] - 2025-01-11
**This release contains breaking changes.** **This release contains breaking changes.**
@ -201,6 +213,7 @@ the [documentation on docker hub](https://hub.docker.com/r/pandoc/extra).
- First release of the template as a ZIP file with the examples. - First release of the template as a ZIP file with the examples.
[3.1.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v3.0.0...v3.1.0
[3.0.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.5.0...v3.0.0 [3.0.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.5.0...v3.0.0
[2.5.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.2...v2.5.0 [2.5.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.2...v2.5.0
[2.4.2]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.1...v2.4.2 [2.4.2]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.1...v2.4.2

View File

@ -6,7 +6,6 @@ $else$
\usepackage{setspace} \usepackage{setspace}
\setstretch{1.2} \setstretch{1.2}
$endif$ $endif$
$-- $--
$-- paragraph formatting $-- paragraph formatting
$-- $--
@ -51,14 +50,12 @@ $if(block-headings)$
\makeatother \makeatother
$endif$ $endif$
$endif$ $endif$
$-- $--
$-- verbatim in notes $-- verbatim in notes
$-- $--
$if(verbatim-in-note)$ $if(verbatim-in-note)$
\usepackage{fancyvrb} \usepackage{fancyvrb}
$endif$ $endif$
$-- highlighting $-- highlighting
$if(listings)$ $if(listings)$
\usepackage{listings} \usepackage{listings}
@ -88,7 +85,6 @@ $highlighting-macros$
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}} \DefineVerbatimEnvironment{Highlighting}{Verbatim}{breaklines,fontsize=$if(code-block-font-size)$$code-block-font-size$$else$\small$endif$,commandchars=\\\{\}}
$endif$ $endif$
$-- $--
$-- tables $-- tables
$-- $--
@ -115,7 +111,6 @@ $else$
\makesavenoteenv{longtable} \makesavenoteenv{longtable}
$endif$ $endif$
$endif$ $endif$
$-- $--
$-- graphics $-- graphics
$-- $--
@ -142,7 +137,6 @@ $endif$
$if(svg)$ $if(svg)$
\usepackage{svg} \usepackage{svg}
$endif$ $endif$
$-- $--
$-- strikeout/underline $-- strikeout/underline
$-- $--
@ -170,7 +164,6 @@ $if(CJKmainfont)$
$endif$ $endif$
\fi \fi
$endif$ $endif$
$-- $--
$-- CSL citations $-- CSL citations
$-- $--
@ -209,7 +202,6 @@ $if(csl-refs)$
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}} \newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}}
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} \newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
$endif$ $endif$
$-- $--
$-- Babel language support $-- Babel language support
$-- $--
@ -243,32 +235,27 @@ $if(selnolig-langs)$
\fi \fi
$endif$ $endif$
$endif$ $endif$
$-- $--
$-- pagestyle $-- pagestyle
$-- $--
$if(pagestyle)$ $if(pagestyle)$
\pagestyle{$pagestyle$} \pagestyle{$pagestyle$}
$endif$ $endif$
$-- $--
$-- prevent overfull lines $-- prevent overfull lines
$-- $--
\setlength{\emergencystretch}{3em} % prevent overfull lines \setlength{\emergencystretch}{3em} % prevent overfull lines
$-- $--
$-- tight lists $-- tight lists
$-- $--
\providecommand{\tightlist}{% \providecommand{\tightlist}{%
\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
$-- $--
$-- subfigure support $-- subfigure support
$-- $--
$if(subfigure)$ $if(subfigure)$
\usepackage{subcaption} \usepackage{subcaption}
$endif$ $endif$
$-- $--
$-- text direction support for pdftex $-- text direction support for pdftex
$-- $--
@ -281,7 +268,6 @@ $if(dir)$
\newenvironment{LTR}{\beginL}{\endL} \newenvironment{LTR}{\beginL}{\endL}
\fi \fi
$endif$ $endif$
$-- $--
$-- bibliography support support for natbib and biblatex $-- bibliography support support for natbib and biblatex
$-- $--
@ -295,10 +281,6 @@ $for(bibliography)$
\addbibresource{$bibliography$} \addbibresource{$bibliography$}
$endfor$ $endfor$
$endif$ $endif$
$if(nocite-ids)$
\nocite{$for(nocite-ids)$$it$$sep$, $endfor$}
$endif$
$-- $--
$-- csquotes $-- csquotes
$-- $--

View File

@ -103,6 +103,24 @@ $endif$
$for(beameroption)$ $for(beameroption)$
\setbeameroption{$beameroption$} \setbeameroption{$beameroption$}
$endfor$ $endfor$
% Prevent slide breaks in the middle of a paragraph
\widowpenalties 1 10000
\raggedbottom
$if(section-titles)$
\AtBeginPart{
\frame{\partpage}
}
\AtBeginSection{
\ifbibliography
\else
\frame{\sectionpage}
\fi
}
\AtBeginSubsection{
\frame{\subsectionpage}
}
$endif$
$fonts.latex()$
$-- Set Beamer theme before user font settings so they can override theme $-- Set Beamer theme before user font settings so they can override theme
$if(theme)$ $if(theme)$
\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
@ -122,24 +140,7 @@ $endif$
$if(outertheme)$ $if(outertheme)$
\useoutertheme[$for(outerthemeoptions)$$outerthemeoptions$$sep$,$endfor$]{$outertheme$} \useoutertheme[$for(outerthemeoptions)$$outerthemeoptions$$sep$,$endfor$]{$outertheme$}
$endif$ $endif$
% Prevent slide breaks in the middle of a paragraph $font-settings.latex()$
\widowpenalties 1 10000
\raggedbottom
$if(section-titles)$
\AtBeginPart{
\frame{\partpage}
}
\AtBeginSection{
\ifbibliography
\else
\frame{\sectionpage}
\fi
}
\AtBeginSubsection{
\frame{\subsectionpage}
}
$endif$
$fonts.latex()$
$common.latex()$ $common.latex()$
$for(header-includes)$ $for(header-includes)$
$header-includes$ $header-includes$
@ -221,6 +222,9 @@ $else$
$endif$ $endif$
$endif$ $endif$
\begin{frame}[allowframebreaks]{$biblio-title$} \begin{frame}[allowframebreaks]{$biblio-title$}
$if(nocite-ids)$
\nocite{$for(nocite-ids)$$it$$sep$, $endfor$}
$endif$
\bibliographytrue \bibliographytrue
\bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$} \bibliography{$for(bibliography)$$bibliography$$sep$,$endfor$}
\end{frame} \end{frame}
@ -229,6 +233,9 @@ $endif$
$endif$ $endif$
$if(biblatex)$ $if(biblatex)$
\begin{frame}[allowframebreaks]{$biblio-title$} \begin{frame}[allowframebreaks]{$biblio-title$}
$if(nocite-ids)$
\nocite{$for(nocite-ids)$$it$$sep$, $endfor$}
$endif$
\bibliographytrue \bibliographytrue
\printbibliography[heading=none] \printbibliography[heading=none]
\end{frame} \end{frame}

View File

@ -92,6 +92,7 @@ $else$
\setcounter{secnumdepth}{-\maxdimen} % remove section numbering \setcounter{secnumdepth}{-\maxdimen} % remove section numbering
$endif$ $endif$
$fonts.latex()$ $fonts.latex()$
$font-settings.latex()$
$common.latex()$ $common.latex()$
$for(header-includes)$ $for(header-includes)$
$header-includes$ $header-includes$
@ -174,6 +175,9 @@ $body$
$if(has-frontmatter)$ $if(has-frontmatter)$
\backmatter \backmatter
$endif$ $endif$
$if(nocite-ids)$
\nocite{$for(nocite-ids)$$it$$sep$, $endfor$}
$endif$
$if(natbib)$ $if(natbib)$
$if(bibliography)$ $if(bibliography)$
$if(biblio-title)$ $if(biblio-title)$

View File

@ -0,0 +1,103 @@
$-- User font settings (must come after default font and Beamer theme)
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$endif$
\ifPDFTeX\else
% xetex/luatex font selection
$if(mainfont)$
$if(mainfontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("mainfontfallback",{
$for(mainfontfallback)$"$mainfontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$}
$endif$
$if(sansfont)$
$if(sansfontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("sansfontfallback",{
$for(sansfontfallback)$"$sansfontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$$if(sansfontfallback)$,RawFeature={fallback=sansfontfallback}$endif$]{$sansfont$}
$endif$
$if(monofont)$
$if(monofontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("monofontfallback",{
$for(monofontfallback)$"$monofontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$if(monofontfallback)$,RawFeature={fallback=monofontfallback}$endif$]{$monofont$}
$endif$
$for(fontfamilies)$
\newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
$endfor$
$if(mathfont)$
$if(mathspec)$
\ifXeTeX
\setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\else
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\fi
$else$
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
$endif$
$endif$
$if(CJKmainfont)$
\ifXeTeX
\usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
$if(CJKsansfont)$
\setCJKsansfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKsansfont$}
$endif$
$if(CJKmonofont)$
\setCJKmonofont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmonofont$}
$endif$
\fi
$endif$
$if(luatexjapresetoptions)$
\ifLuaTeX
\usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
\fi
$endif$
$if(CJKmainfont)$
\ifLuaTeX
\usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
\setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
\fi
$endif$
\fi
$if(zero-width-non-joiner)$
%% Support for zero-width non-joiner characters.
\makeatletter
\def\zerowidthnonjoiner{%
% Prevent ligatures and adjust kerning, but still support hyphenating.
\texorpdfstring{%
\TextOrMath{\nobreak\discretionary{-}{}{\kern.03em}%
\ifvmode\else\nobreak\hskip\z@skip\fi}{}%
}{}%
}
\makeatother
\ifPDFTeX
\DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner}
\else
\catcode`^^^^200c=\active
\protected\def ^^^^200c{\zerowidthnonjoiner}
\fi
%% End of ZWNJ support
$endif$
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}

View File

@ -21,106 +21,3 @@ $else$
$-- Set default font before Beamer theme so the theme can override it $-- Set default font before Beamer theme so the theme can override it
\usepackage{lmodern} \usepackage{lmodern}
$endif$ $endif$
$-- User font settings (must come after default font and Beamer theme)
$if(fontfamily)$
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
$endif$
\ifPDFTeX\else
% xetex/luatex font selection
$if(mainfont)$
$if(mainfontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("mainfontfallback",{
$for(mainfontfallback)$"$mainfontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$}
$endif$
$if(sansfont)$
$if(sansfontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("sansfontfallback",{
$for(sansfontfallback)$"$sansfontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$$if(sansfontfallback)$,RawFeature={fallback=sansfontfallback}$endif$]{$sansfont$}
$endif$
$if(monofont)$
$if(monofontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("monofontfallback",{
$for(monofontfallback)$"$monofontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$if(monofontfallback)$,RawFeature={fallback=monofontfallback}$endif$]{$monofont$}
$endif$
$for(fontfamilies)$
\newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
$endfor$
$if(mathfont)$
$if(mathspec)$
\ifXeTeX
\setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\else
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
\fi
$else$
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$}
$endif$
$endif$
$if(CJKmainfont)$
\ifXeTeX
\usepackage{xeCJK}
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
$if(CJKsansfont)$
\setCJKsansfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKsansfont$}
$endif$
$if(CJKmonofont)$
\setCJKmonofont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmonofont$}
$endif$
\fi
$endif$
$if(luatexjapresetoptions)$
\ifLuaTeX
\usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset}
\fi
$endif$
$if(CJKmainfont)$
\ifLuaTeX
\usepackage[$for(luatexjafontspecoptions)$$luatexjafontspecoptions$$sep$,$endfor$]{luatexja-fontspec}
\setmainjfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$}
\fi
$endif$
\fi
$if(zero-width-non-joiner)$
%% Support for zero-width non-joiner characters.
\makeatletter
\def\zerowidthnonjoiner{%
% Prevent ligatures and adjust kerning, but still support hyphenating.
\texorpdfstring{%
\TextOrMath{\nobreak\discretionary{-}{}{\kern.03em}%
\ifvmode\else\nobreak\hskip\z@skip\fi}{}%
}{}%
}
\makeatother
\ifPDFTeX
\DeclareUnicodeCharacter{200C}{\zerowidthnonjoiner}
\else
\catcode`^^^^200c=\active
\protected\def ^^^^200c{\zerowidthnonjoiner}
\fi
%% End of ZWNJ support
$endif$
% Use upquote if available, for straight quotes in verbatim environments
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
\IfFileExists{microtype.sty}{% use microtype if available
\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype}
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
}{}

View File

@ -28,6 +28,7 @@ cp "template-multi-file/eisvogel.latex" "${distFolderName}/eisvogel.latex"
# replace partials (latex) # replace partials (latex)
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex" sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$font-settings\.latex()\$/ {' -e 'r template-multi-file/font-settings.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex" sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$eisvogel-added\.latex()\$/ {' -e 'r template-multi-file/eisvogel-added.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex" sed -e '/\$eisvogel-added\.latex()\$/ {' -e 'r template-multi-file/eisvogel-added.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
sed -e '/\$eisvogel-title-page\.latex()\$/ {' -e 'r template-multi-file/eisvogel-title-page.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex" sed -e '/\$eisvogel-title-page\.latex()\$/ {' -e 'r template-multi-file/eisvogel-title-page.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.latex"
@ -40,6 +41,7 @@ cp "template-multi-file/eisvogel.beamer" "${distFolderName}/eisvogel.beamer"
# replace partials (beamer) # replace partials (beamer)
sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer" sed -e '/\$fonts\.latex()\$/ {' -e 'r template-multi-file/fonts.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$font-settings\.latex()\$/ {' -e 'r template-multi-file/font-settings.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer" sed -e '/\$common\.latex()\$/ {' -e 'r template-multi-file/common.latex' -e 'd' -e '}' $SEDOPTION "${distFolderName}/eisvogel.beamer"
# The beamer template has no eisvogel block $eisvogel-added.latex()$ # The beamer template has no eisvogel block $eisvogel-added.latex()$
# The beamer template has no eisvogel titlepage $eisvogel-titlepage.latex()$ # The beamer template has no eisvogel titlepage $eisvogel-titlepage.latex()$