mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2024-12-24 00:22:22 +00:00
Merge changes from the pandoc default latex template (#307)
- Merged with 144bf90ab9/data/templates/default.latex
- Rebuild the examples
- Rebuild the tests
- Add packages `hardwrap` and `catchfile` to build the broken example `title-page-background`
- Build with the latest pandoc 2.19.2
This commit is contained in:
parent
3bc65a27fb
commit
c255d9d4c5
4
.github/workflows/build-examples.yml
vendored
4
.github/workflows/build-examples.yml
vendored
@ -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: "2.11.2"
|
||||
PANDOC_VERSION: "2.19.2"
|
||||
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
|
||||
@ -44,7 +44,7 @@ jobs:
|
||||
pip install pandoc-latex-environment
|
||||
- name: Install LaTeX packages
|
||||
run: |
|
||||
tlmgr install adjustbox background bidi csquotes footmisc footnotebackref fvextra mdframed pagecolor sourcecodepro sourcesanspro titling ulem upquote xurl
|
||||
tlmgr install adjustbox background bidi csquotes footmisc footnotebackref fvextra mdframed pagecolor sourcecodepro sourcesanspro titling ulem upquote xurl hardwrap catchfile
|
||||
# trial and error
|
||||
tlmgr install letltxmacro zref everypage framed collectbox
|
||||
# packages needed for the template
|
||||
|
@ -3,7 +3,7 @@ dist: bionic
|
||||
language: java
|
||||
before_install:
|
||||
# default pandoc is too old -> install a newer version manually
|
||||
- PANDOC_VERSION="2.11.2"
|
||||
- PANDOC_VERSION="2.19.2"
|
||||
- pandoc_deb="pandoc-${PANDOC_VERSION}-1-amd64.deb"
|
||||
- wget "https://github.com/jgm/pandoc/releases/download/${PANDOC_VERSION}/${pandoc_deb}"
|
||||
- sudo dpkg -i ${pandoc_deb}
|
||||
@ -43,7 +43,7 @@ before_install:
|
||||
|
||||
- sudo chown -hR $(whoami) "$TEXLIVE_DIR"
|
||||
# packages specified in the template
|
||||
- tlmgr install adjustbox background bidi csquotes footmisc footnotebackref fvextra mdframed pagecolor sourcecodepro sourcesanspro titling ulem upquote xurl
|
||||
- tlmgr install adjustbox background bidi csquotes footmisc footnotebackref fvextra mdframed pagecolor sourcecodepro sourcesanspro titling ulem upquote xurl hardwrap catchfile
|
||||
|
||||
# trial and error
|
||||
- tlmgr install letltxmacro zref everypage framed collectbox
|
||||
|
183
eisvogel.tex
183
eisvogel.tex
@ -44,11 +44,6 @@
|
||||
\PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref}
|
||||
\PassOptionsToPackage{hyphens}{url}
|
||||
\PassOptionsToPackage{dvipsnames,svgnames,x11names,table}{xcolor}
|
||||
$if(dir)$
|
||||
$if(latex-dir-rtl)$
|
||||
\PassOptionsToPackage{RTLdocument}{bidi}
|
||||
$endif$
|
||||
$endif$
|
||||
$if(CJKmainfont)$
|
||||
\PassOptionsToPackage{space}{xeCJK}
|
||||
$endif$
|
||||
@ -57,9 +52,6 @@ $endif$
|
||||
$if(fontsize)$
|
||||
$fontsize$,
|
||||
$endif$
|
||||
$if(lang)$
|
||||
$babel-lang$,
|
||||
$endif$
|
||||
$if(papersize)$
|
||||
$papersize$paper,
|
||||
$else$
|
||||
@ -133,14 +125,11 @@ $if(beamerarticle)$
|
||||
\usepackage{beamerarticle} % needs to be loaded first
|
||||
$endif$
|
||||
\usepackage{amsmath,amssymb}
|
||||
$if(fontfamily)$
|
||||
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
|
||||
$else$
|
||||
\usepackage{lmodern}
|
||||
$endif$
|
||||
$if(linestretch)$
|
||||
\usepackage{setspace}
|
||||
$else$
|
||||
% Use setspace anyway because we change the default line spacing.
|
||||
% The spacing is changed early to affect the titlepage and the TOC.
|
||||
\usepackage{setspace}
|
||||
\setstretch{1.2}
|
||||
$endif$
|
||||
@ -152,15 +141,48 @@ $endif$
|
||||
\else % if luatex or xetex
|
||||
$if(mathspec)$
|
||||
\ifXeTeX
|
||||
\usepackage{mathspec}
|
||||
\usepackage{mathspec} % this also loads fontspec
|
||||
\else
|
||||
\usepackage{unicode-math}
|
||||
\usepackage{unicode-math} % this also loads fontspec
|
||||
\fi
|
||||
$else$
|
||||
\usepackage{unicode-math}
|
||||
\usepackage{unicode-math} % this also loads fontspec
|
||||
$endif$
|
||||
\defaultfontfeatures{Scale=MatchLowercase}
|
||||
\defaultfontfeatures{Scale=MatchLowercase}$-- must come before Beamer theme
|
||||
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1}
|
||||
\fi
|
||||
$if(fontfamily)$
|
||||
$else$
|
||||
$-- Set default font before Beamer theme so the theme can override it
|
||||
\usepackage{lmodern}
|
||||
$endif$
|
||||
$-- Set Beamer theme before user font settings so they can override theme
|
||||
$if(beamer)$
|
||||
$if(theme)$
|
||||
\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
|
||||
$endif$
|
||||
$if(colortheme)$
|
||||
\usecolortheme{$colortheme$}
|
||||
$endif$
|
||||
$if(fonttheme)$
|
||||
\usefonttheme{$fonttheme$}
|
||||
$endif$
|
||||
$if(mainfont)$
|
||||
\usefonttheme{serif} % use mainfont rather than sansfont for slide text
|
||||
$endif$
|
||||
$if(innertheme)$
|
||||
\useinnertheme{$innertheme$}
|
||||
$endif$
|
||||
$if(outertheme)$
|
||||
\useoutertheme{$outertheme$}
|
||||
$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)$
|
||||
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
|
||||
$endif$
|
||||
@ -208,7 +230,7 @@ $if(zero-width-non-joiner)$
|
||||
\def\zerowidthnonjoiner{%
|
||||
% Prevent ligatures and adjust kerning, but still support hyphenating.
|
||||
\texorpdfstring{%
|
||||
\textormath{\nobreak\discretionary{-}{}{\kern.03em}%
|
||||
\TextOrMath{\nobreak\discretionary{-}{}{\kern.03em}%
|
||||
\ifvmode\else\nobreak\hskip\z@skip\fi}{}%
|
||||
}{}%
|
||||
}
|
||||
@ -221,26 +243,6 @@ $if(zero-width-non-joiner)$
|
||||
\fi
|
||||
%% End of ZWNJ support
|
||||
$endif$
|
||||
$if(beamer)$
|
||||
$if(theme)$
|
||||
\usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$}
|
||||
$endif$
|
||||
$if(colortheme)$
|
||||
\usecolortheme{$colortheme$}
|
||||
$endif$
|
||||
$if(fonttheme)$
|
||||
\usefonttheme{$fonttheme$}
|
||||
$endif$
|
||||
$if(mainfont)$
|
||||
\usefonttheme{serif} % use mainfont rather than sansfont for slide text
|
||||
$endif$
|
||||
$if(innertheme)$
|
||||
\useinnertheme{$innertheme$}
|
||||
$endif$
|
||||
$if(outertheme)$
|
||||
\useoutertheme{$outertheme$}
|
||||
$endif$
|
||||
$endif$
|
||||
% Use upquote if available, for straight quotes in verbatim environments
|
||||
\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
|
||||
\IfFileExists{microtype.sty}{% use microtype if available
|
||||
@ -268,7 +270,6 @@ $endif$
|
||||
\definecolor{default-filecolor}{HTML}{A50000}
|
||||
\definecolor{default-citecolor}{HTML}{4077C0}
|
||||
\definecolor{default-urlcolor}{HTML}{4077C0}
|
||||
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
|
||||
$if(footnotes-pretty)$
|
||||
% load footmisc in order to customize footnotes (footmisc has to be loaded before hyperref, cf. https://tex.stackexchange.com/a/169124/144087)
|
||||
\usepackage[hang,flushmargin,bottom,multiple]{footmisc}
|
||||
@ -277,38 +278,6 @@ $if(footnotes-pretty)$
|
||||
\setlength{\skip\footins}{0.3cm} % set space between page content and footnote
|
||||
\setlength{\footskip}{0.9cm} % set space between footnote and page bottom
|
||||
$endif$
|
||||
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
|
||||
\hypersetup{
|
||||
$if(title-meta)$
|
||||
pdftitle={$title-meta$},
|
||||
$endif$
|
||||
$if(author-meta)$
|
||||
pdfauthor={$author-meta$},
|
||||
$endif$
|
||||
$if(lang)$
|
||||
pdflang={$lang$},
|
||||
$endif$
|
||||
$if(subject)$
|
||||
pdfsubject={$subject$},
|
||||
$endif$
|
||||
$if(keywords)$
|
||||
pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
|
||||
$endif$
|
||||
$if(colorlinks)$
|
||||
colorlinks=true,
|
||||
linkcolor={$if(linkcolor)$$linkcolor$$else$default-linkcolor$endif$},
|
||||
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$
|
||||
hidelinks,
|
||||
$endif$
|
||||
breaklinks=true,
|
||||
pdfcreator={LaTeX via pandoc with the Eisvogel template}}
|
||||
\urlstyle{same} % disable monospaced font for URLs
|
||||
$if(verbatim-in-note)$
|
||||
\VerbatimFootnotes % allow verbatim text in footnotes
|
||||
$endif$
|
||||
$if(geometry)$
|
||||
$if(beamer)$
|
||||
\geometry{$for(geometry)$$geometry$$sep$,$endfor$}
|
||||
@ -399,15 +368,12 @@ $if(graphics)$
|
||||
\def\fps@figure{htbp}
|
||||
\makeatother
|
||||
$endif$
|
||||
$if(links-as-notes)$
|
||||
% Make links footnotes instead of hotlinks:
|
||||
\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
|
||||
$if(svg)$
|
||||
\usepackage{svg}
|
||||
$endif$
|
||||
$if(strikeout)$
|
||||
$-- also used for underline
|
||||
\usepackage[normalem]{ulem}
|
||||
% Avoid problems with \sout in headers with hyperref
|
||||
\pdfstringdefDisableCommands{\renewcommand{\sout}{}}
|
||||
\usepackage{soul}
|
||||
$endif$
|
||||
\setlength{\emergencystretch}{3em} % prevent overfull lines
|
||||
\providecommand{\tightlist}{%
|
||||
@ -459,23 +425,29 @@ $if(csl-refs)$
|
||||
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break}
|
||||
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1}
|
||||
$endif$
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
$if(lang)$
|
||||
\usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel}
|
||||
\ifLuaTeX
|
||||
\usepackage[bidi=basic]{babel}
|
||||
\else
|
||||
\usepackage[bidi=default]{babel}
|
||||
\fi
|
||||
$if(babel-lang)$
|
||||
\babelprovide[main,import]{$babel-lang$}
|
||||
$endif$
|
||||
$for(babel-otherlangs)$
|
||||
\babelprovide[import]{$babel-otherlangs$}
|
||||
$endfor$
|
||||
% get rid of language-specific shorthands (see #6817):
|
||||
\let\LanguageShortHands\languageshorthands
|
||||
\def\languageshorthands#1{}
|
||||
$endif$
|
||||
$for(header-includes)$
|
||||
$header-includes$
|
||||
$endfor$
|
||||
\ifLuaTeX
|
||||
\usepackage{selnolig} % disable illegal ligatures
|
||||
\fi
|
||||
$if(dir)$
|
||||
\ifXeTeX
|
||||
% Load bidi as late as possible as it modifies e.g. graphicx
|
||||
\usepackage{bidi}
|
||||
\fi
|
||||
\ifPDFTeX
|
||||
\TeXXeTstate=1
|
||||
\newcommand{\RL}[1]{\beginR #1\endR}
|
||||
@ -500,7 +472,43 @@ $endif$
|
||||
$if(csquotes)$
|
||||
\usepackage{csquotes}
|
||||
$endif$
|
||||
|
||||
\IfFileExists{bookmark.sty}{\usepackage{bookmark}}{\usepackage{hyperref}}
|
||||
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
|
||||
\urlstyle{$if(urlstyle)$$urlstyle$$else$same$endif$}
|
||||
$if(links-as-notes)$
|
||||
% Make links footnotes instead of hotlinks:
|
||||
\DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}}
|
||||
$endif$
|
||||
$if(verbatim-in-note)$
|
||||
\VerbatimFootnotes % allow verbatim text in footnotes
|
||||
$endif$
|
||||
\hypersetup{
|
||||
$if(title-meta)$
|
||||
pdftitle={$title-meta$},
|
||||
$endif$
|
||||
$if(author-meta)$
|
||||
pdfauthor={$author-meta$},
|
||||
$endif$
|
||||
$if(lang)$
|
||||
pdflang={$lang$},
|
||||
$endif$
|
||||
$if(subject)$
|
||||
pdfsubject={$subject$},
|
||||
$endif$
|
||||
$if(keywords)$
|
||||
pdfkeywords={$for(keywords)$$keywords$$sep$, $endfor$},
|
||||
$endif$
|
||||
$if(colorlinks)$
|
||||
colorlinks=true,
|
||||
linkcolor={$if(linkcolor)$$linkcolor$$else$default-linkcolor$endif$},
|
||||
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$
|
||||
hidelinks,
|
||||
$endif$
|
||||
breaklinks=true,
|
||||
pdfcreator={LaTeX via pandoc with the Eisvogel template}}
|
||||
$if(title)$
|
||||
\title{$title$$if(thanks)$\thanks{$thanks$}$endif$}
|
||||
$endif$
|
||||
@ -949,6 +957,9 @@ $endif$
|
||||
$if(title)$
|
||||
$if(beamer)$
|
||||
\frame{\titlepage}
|
||||
% don't generate the default title
|
||||
% $else$
|
||||
% \maketitle
|
||||
$endif$
|
||||
$if(abstract)$
|
||||
\begin{abstract}
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 228 KiB After Width: | Height: | Size: 227 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user