diff --git a/.github/workflows/build-examples.yml b/.github/workflows/build-examples.yml index 5b051e1..e4acd68 100644 --- a/.github/workflows/build-examples.yml +++ b/.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 diff --git a/.travis.yml b/.travis.yml index 9af02ce..b6d17c1 100644 --- a/.travis.yml +++ b/.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 diff --git a/eisvogel.tex b/eisvogel.tex index 85fa44b..fb791b8 100644 --- a/eisvogel.tex +++ b/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} diff --git a/examples/basic-example/document.pdf b/examples/basic-example/document.pdf index f126250..9dc7525 100644 Binary files a/examples/basic-example/document.pdf and b/examples/basic-example/document.pdf differ diff --git a/examples/beamer/document.pdf b/examples/beamer/document.pdf index 621f94f..084ea99 100644 Binary files a/examples/beamer/document.pdf and b/examples/beamer/document.pdf differ diff --git a/examples/book/document.pdf b/examples/book/document.pdf index 1bec505..33935fe 100644 Binary files a/examples/book/document.pdf and b/examples/book/document.pdf differ diff --git a/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf b/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf index 0df3838..57cb39a 100644 Binary files a/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf and b/examples/boxes-with-pandoc-latex-environment-and-awesomebox/document.pdf differ diff --git a/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf b/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf index b2b35d2..095bbce 100644 Binary files a/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf and b/examples/boxes-with-pandoc-latex-environment-and-tcolorbox/document.pdf differ diff --git a/examples/code-blocks-listings/document.pdf b/examples/code-blocks-listings/document.pdf index 2ded6ea..d54e390 100644 Binary files a/examples/code-blocks-listings/document.pdf and b/examples/code-blocks-listings/document.pdf differ diff --git a/examples/code-blocks-without-listings/document.pdf b/examples/code-blocks-without-listings/document.pdf index 98be140..abcda00 100644 Binary files a/examples/code-blocks-without-listings/document.pdf and b/examples/code-blocks-without-listings/document.pdf differ diff --git a/examples/header-and-footer/document.pdf b/examples/header-and-footer/document.pdf index 0d290ff..43b194b 100644 Binary files a/examples/header-and-footer/document.pdf and b/examples/header-and-footer/document.pdf differ diff --git a/examples/images-and-tables/document.pdf b/examples/images-and-tables/document.pdf index 086d5d9..63eae63 100644 Binary files a/examples/images-and-tables/document.pdf and b/examples/images-and-tables/document.pdf differ diff --git a/examples/language-german/document.pdf b/examples/language-german/document.pdf index aea79fb..649428e 100644 Binary files a/examples/language-german/document.pdf and b/examples/language-german/document.pdf differ diff --git a/examples/language-german/preview.png b/examples/language-german/preview.png index 74441a4..e2e4a85 100644 Binary files a/examples/language-german/preview.png and b/examples/language-german/preview.png differ diff --git a/examples/page-background/document.pdf b/examples/page-background/document.pdf index 6bc71a1..23c3764 100644 Binary files a/examples/page-background/document.pdf and b/examples/page-background/document.pdf differ diff --git a/examples/table-of-contents/document.pdf b/examples/table-of-contents/document.pdf index 3b3cf3d..1e76ae5 100644 Binary files a/examples/table-of-contents/document.pdf and b/examples/table-of-contents/document.pdf differ diff --git a/examples/title-page-background/document.pdf b/examples/title-page-background/document.pdf index 79ad9ab..cdfc46e 100644 Binary files a/examples/title-page-background/document.pdf and b/examples/title-page-background/document.pdf differ diff --git a/examples/title-page-custom/document.pdf b/examples/title-page-custom/document.pdf index 99b9395..e15e553 100644 Binary files a/examples/title-page-custom/document.pdf and b/examples/title-page-custom/document.pdf differ diff --git a/examples/title-page-default/document.pdf b/examples/title-page-default/document.pdf index e511c7a..08db644 100644 Binary files a/examples/title-page-default/document.pdf and b/examples/title-page-default/document.pdf differ diff --git a/examples/title-page-green/document.pdf b/examples/title-page-green/document.pdf index dab4a3e..49a1bcd 100644 Binary files a/examples/title-page-green/document.pdf and b/examples/title-page-green/document.pdf differ diff --git a/examples/title-page-logo/document.pdf b/examples/title-page-logo/document.pdf index ccd1c6b..4d89e22 100644 Binary files a/examples/title-page-logo/document.pdf and b/examples/title-page-logo/document.pdf differ diff --git a/tests/heading/document.pdf b/tests/heading/document.pdf index a5a1a47..342f291 100644 Binary files a/tests/heading/document.pdf and b/tests/heading/document.pdf differ diff --git a/tests/horizontal-rule/document.pdf b/tests/horizontal-rule/document.pdf index 37acbb1..ecda89e 100644 Binary files a/tests/horizontal-rule/document.pdf and b/tests/horizontal-rule/document.pdf differ diff --git a/tests/list-definition/document.pdf b/tests/list-definition/document.pdf index 1f55333..04c3d19 100644 Binary files a/tests/list-definition/document.pdf and b/tests/list-definition/document.pdf differ diff --git a/tests/list-ordered/document.pdf b/tests/list-ordered/document.pdf index 9025551..2e06493 100644 Binary files a/tests/list-ordered/document.pdf and b/tests/list-ordered/document.pdf differ diff --git a/tests/list-task/document.pdf b/tests/list-task/document.pdf index b3a3d4e..97534f3 100644 Binary files a/tests/list-task/document.pdf and b/tests/list-task/document.pdf differ diff --git a/tests/list-unordered/document.pdf b/tests/list-unordered/document.pdf index 9ac01d6..a838e82 100644 Binary files a/tests/list-unordered/document.pdf and b/tests/list-unordered/document.pdf differ