Browse Source

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
pull/309/head
Pascal Wagler 2 years ago
committed by GitHub
parent
commit
c255d9d4c5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      .github/workflows/build-examples.yml
  2. 4
      .travis.yml
  3. 183
      eisvogel.tex
  4. BIN
      examples/basic-example/document.pdf
  5. BIN
      examples/beamer/document.pdf
  6. BIN
      examples/book/document.pdf
  7. BIN
      examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf
  8. BIN
      examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf
  9. BIN
      examples/code-blocks-listings/document.pdf
  10. BIN
      examples/code-blocks-without-listings/document.pdf
  11. BIN
      examples/header-and-footer/document.pdf
  12. BIN
      examples/images-and-tables/document.pdf
  13. BIN
      examples/language-german/document.pdf
  14. BIN
      examples/language-german/preview.png
  15. BIN
      examples/page-background/document.pdf
  16. BIN
      examples/table-of-contents/document.pdf
  17. BIN
      examples/title-page-background/document.pdf
  18. BIN
      examples/title-page-custom/document.pdf
  19. BIN
      examples/title-page-default/document.pdf
  20. BIN
      examples/title-page-green/document.pdf
  21. BIN
      examples/title-page-logo/document.pdf
  22. BIN
      tests/heading/document.pdf
  23. BIN
      tests/horizontal-rule/document.pdf
  24. BIN
      tests/list-definition/document.pdf
  25. BIN
      tests/list-ordered/document.pdf
  26. BIN
      tests/list-task/document.pdf
  27. BIN
      tests/list-unordered/document.pdf

8
.github/workflows/build-examples.yml

@ -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
@ -43,8 +43,8 @@ jobs:
python -m pip install --upgrade pip
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
run: |
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
@ -52,7 +52,7 @@ jobs:
# packages only needed for some examples (that include packages via header-includes)
tlmgr install awesomebox fontawesome5
# packages only needed for some examples (example boxes-with-pandoc-latex-environment-and-tcolorbox)
tlmgr install tcolorbox pgf etoolbox environ trimspaces
tlmgr install tcolorbox pgf etoolbox environ trimspaces
- name: Build pdf files
run: cd examples && bash build-examples.sh && cd ..
- name: Archive production artifacts

4
.travis.yml

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

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

BIN
examples/basic-example/document.pdf

Binary file not shown.

BIN
examples/beamer/document.pdf

Binary file not shown.

BIN
examples/book/document.pdf

Binary file not shown.

BIN
examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf

Binary file not shown.

BIN
examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf

Binary file not shown.

BIN
examples/code-blocks-listings/document.pdf

Binary file not shown.

BIN
examples/code-blocks-without-listings/document.pdf

Binary file not shown.

BIN
examples/header-and-footer/document.pdf

Binary file not shown.

BIN
examples/images-and-tables/document.pdf

Binary file not shown.

BIN
examples/language-german/document.pdf

Binary file not shown.

BIN
examples/language-german/preview.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

After

Width:  |  Height:  |  Size: 227 KiB

BIN
examples/page-background/document.pdf

Binary file not shown.

BIN
examples/table-of-contents/document.pdf

Binary file not shown.

BIN
examples/title-page-background/document.pdf

Binary file not shown.

BIN
examples/title-page-custom/document.pdf

Binary file not shown.

BIN
examples/title-page-default/document.pdf

Binary file not shown.

BIN
examples/title-page-green/document.pdf

Binary file not shown.

BIN
examples/title-page-logo/document.pdf

Binary file not shown.

BIN
tests/heading/document.pdf

Binary file not shown.

BIN
tests/horizontal-rule/document.pdf

Binary file not shown.

BIN
tests/list-definition/document.pdf

Binary file not shown.

BIN
tests/list-ordered/document.pdf

Binary file not shown.

BIN
tests/list-task/document.pdf

Binary file not shown.

BIN
tests/list-unordered/document.pdf

Binary file not shown.
Loading…
Cancel
Save