Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Merge changes from pandoc 3.4 LaTeX template #395

Merged
merged 5 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup pandoc
env:
PANDOC_VERSION: "3.1.7"
PANDOC_VERSION: "3.4"
run: |
wget -qO- https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz | sudo tar xzf - --strip-components 1 -C /usr/local/
- name: Setup TexLive
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11'
python-version: '3.12'
- name: Install python filters
run: |
python -m pip install --upgrade pip
Expand All @@ -56,7 +56,7 @@ jobs:
- name: Build examples
run: cd examples && bash build-examples.sh && cd ..
- name: Add generated example files
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build-files
path: |
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [2.5.0] - 2024-10-03

- Merge changes from the pandoc default LaTeX template from version 3.4 ([7e8aafa](https://github.com/jgm/pandoc-templates/commit/7e8aafa049700a849b41c53cf1afeb17324040c7)).

## [2.4.2] - 2023-11-25

- Merge changes from the pandoc default LaTeX template from version 3.1.9 ([f7d8b62](https://github.com/jgm/pandoc-templates/commit/f7d8b629330074a4400d1f2795b101d14491c968)).
Expand Down Expand Up @@ -175,6 +179,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.

[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.1]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.4.0...v2.4.1
[2.4.0]: https://github.com/Wandmalfarbe/pandoc-latex-template/compare/v2.3.0...v2.4.0
Expand Down
88 changes: 72 additions & 16 deletions eisvogel.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%%
% Copyright (c) 2017 - 2023, Pascal Wagler;
% Copyright (c) 2014 - 2023, John MacFarlane
% Copyright (c) 2017 - 2024, Pascal Wagler;
% Copyright (c) 2014 - 2024, John MacFarlane
%
% All rights reserved.
%
Expand Down Expand Up @@ -65,6 +65,9 @@
$if(aspectratio)$
aspectratio=$aspectratio$,
$endif$
$if(babel-lang)$
$babel-lang$,
$endif$
$endif$
$for(classoption)$
$classoption$$sep$,
Expand Down Expand Up @@ -100,13 +103,13 @@
}
\setbeamertemplate{section page}{
\centering
\begin{beamercolorbox}[sep=12pt,center]{part title}
\begin{beamercolorbox}[sep=12pt,center]{section title}
\usebeamerfont{section title}\insertsection\par
\end{beamercolorbox}
}
\setbeamertemplate{subsection page}{
\centering
\begin{beamercolorbox}[sep=8pt,center]{part title}
\begin{beamercolorbox}[sep=8pt,center]{subsection title}
\usebeamerfont{subsection title}\insertsubsection\par
\end{beamercolorbox}
}
Expand Down Expand Up @@ -187,13 +190,37 @@
\ifPDFTeX\else
% xetex/luatex font selection
$if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$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)$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$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)$
\setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$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$}
Expand Down Expand Up @@ -392,6 +419,15 @@
\usepackage[soul]{lua-ul}
\else
\usepackage{soul}
$if(beamer)$
\makeatletter
\let\HL\hl
\renewcommand\hl{% fix for beamer highlighting
\let\set@color\beamerorig@set@color
\let\reset@color\beamerorig@reset@color
\HL}
\makeatother
$endif$
$if(CJKmainfont)$
\ifXeTeX
% soul's \st doesn't work for CJK:
Expand All @@ -416,14 +452,28 @@
$else$
$if(block-headings)$
% Make \paragraph and \subparagraph free-standing
\makeatletter
\ifx\paragraph\undefined\else
\let\oldparagraph\paragraph
\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
\renewcommand{\paragraph}{
\@ifstar
\xxxParagraphStar
\xxxParagraphNoStar
}
\newcommand{\xxxParagraphStar}[1]{\oldparagraph*{#1}\mbox{}}
\newcommand{\xxxParagraphNoStar}[1]{\oldparagraph{#1}\mbox{}}
\fi
\ifx\subparagraph\undefined\else
\let\oldsubparagraph\subparagraph
\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
\renewcommand{\subparagraph}{
\@ifstar
\xxxSubParagraphStar
\xxxSubParagraphNoStar
}
\newcommand{\xxxSubParagraphStar}[1]{\oldsubparagraph*{#1}\mbox{}}
\newcommand{\xxxSubParagraphNoStar}[1]{\oldsubparagraph{#1}\mbox{}}
\fi
\makeatother
$endif$
$endif$
$if(pagestyle)$
Expand Down Expand Up @@ -475,7 +525,7 @@
$if(mainfont)$
\ifPDFTeX
\else
\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$}
\fi
$endif$
$endif$
Expand All @@ -488,13 +538,15 @@
% get rid of language-specific shorthands (see #6817):
\let\LanguageShortHands\languageshorthands
\def\languageshorthands#1{}
$if(selnolig-langs)$
\ifLuaTeX
\usepackage[$for(selnolig-langs)$$it$$sep$,$endfor$]{selnolig} % disable illegal ligatures
\fi
$endif$
$endif$
$for(header-includes)$
$header-includes$
$endfor$
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
$if(dir)$
\ifPDFTeX
\TeXXeTstate=1
Expand All @@ -520,7 +572,7 @@
$if(csquotes)$
\usepackage{csquotes}
$endif$
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
\usepackage{bookmark}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{$if(urlstyle)$$urlstyle$$else$same$endif$}
$if(links-as-notes)$
Expand Down Expand Up @@ -552,8 +604,11 @@
filecolor={$if(filecolor)$$filecolor$$else$default-filecolor$endif$},
citecolor={$if(citecolor)$$citecolor$$else$default-citecolor$endif$},
urlcolor={$if(urlcolor)$$urlcolor$$else$default-urlcolor$endif$},
$else$
$if(boxlinks)$
$else$
hidelinks,
$endif$
$endif$
breaklinks=true,
pdfcreator={LaTeX via pandoc with the Eisvogel template}}
Expand All @@ -579,7 +634,7 @@
\institute{$for(institute)$$institute$$sep$ \and $endfor$}
$endif$
$if(titlegraphic)$
\titlegraphic{\includegraphics{$titlegraphic$}}
\titlegraphic{\includegraphics$if(titlegraphicoptions)$[$for(titlegraphicoptions)$$titlegraphicoptions$$sep$, $endfor$]$endif${$titlegraphic$}}
$endif$
$if(logo)$
\logo{\includegraphics{$logo$}}
Expand Down Expand Up @@ -1027,7 +1082,8 @@
$if(toc-title)$
\frametitle{$toc-title$}
$endif$
\tableofcontents[hideallsubsections]
\setcounter{tocdepth}{$toc-depth$}
\tableofcontents
\end{frame}
$if(toc-own-page)$
\newpage
Expand Down
Binary file modified examples/basic-example/document.pdf
Binary file not shown.
Binary file modified examples/beamer/document.pdf
Binary file not shown.
Binary file modified examples/book/document.pdf
Binary file not shown.
Binary file modified examples/book/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file modified examples/code-blocks-listings/document.pdf
Binary file not shown.
Binary file modified examples/code-blocks-without-listings/document.pdf
Binary file not shown.
Binary file modified examples/header-and-footer/document.pdf
Binary file not shown.
Binary file modified examples/images-and-tables/document.pdf
Binary file not shown.
Binary file modified examples/language-german/document.pdf
Binary file not shown.
Binary file modified examples/page-background/document.pdf
Binary file not shown.
Binary file modified examples/table-of-contents/document.pdf
Binary file not shown.
Binary file modified examples/title-page-background/document.pdf
Binary file not shown.
Binary file modified examples/title-page-custom/document.pdf
Binary file not shown.
Binary file modified examples/title-page-default/document.pdf
Binary file not shown.
Binary file modified examples/title-page-green/document.pdf
Binary file not shown.
Binary file modified examples/title-page-logo/document.pdf
Binary file not shown.
Loading