diff --git a/eisvogel.tex b/eisvogel.tex index c7fba87..05e3c68 100644 --- a/eisvogel.tex +++ b/eisvogel.tex @@ -43,7 +43,7 @@ % Options for packages loaded elsewhere \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} \PassOptionsToPackage{hyphens}{url} -\PassOptionsToPackage{dvipsnames,svgnames*,x11names*,table}{xcolor} +\PassOptionsToPackage{dvipsnames,svgnames,x11names,table}{xcolor} $if(dir)$ $if(latex-dir-rtl)$ \PassOptionsToPackage{RTLdocument}{bidi} @@ -144,14 +144,14 @@ $else$ \usepackage{setspace} \setstretch{1.2} $endif$ -\usepackage{ifxetex,ifluatex} -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex +\usepackage{iftex} +\ifPDFTeX \usepackage[$if(fontenc)$$fontenc$$else$T1$endif$]{fontenc} \usepackage[utf8]{inputenc} \usepackage{textcomp} % provide euro and other symbols \else % if luatex or xetex $if(mathspec)$ - \ifxetex + \ifXeTeX \usepackage{mathspec} \else \usepackage{unicode-math} @@ -175,7 +175,7 @@ $for(fontfamilies)$ $endfor$ $if(mathfont)$ $if(mathspec)$ - \ifxetex + \ifXeTeX \setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} \else \setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} @@ -185,23 +185,42 @@ $else$ $endif$ $endif$ $if(CJKmainfont)$ - \ifxetex + \ifXeTeX \usepackage{xeCJK} \setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} \fi $endif$ $if(luatexjapresetoptions)$ - \ifluatex + \ifLuaTeX \usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} \fi $endif$ $if(CJKmainfont)$ - \ifluatex + \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$ $if(beamer)$ $if(theme)$ \usetheme[$for(themeoptions)$$themeoptions$$sep$,$endfor$]{$theme$} @@ -277,10 +296,10 @@ $if(keywords)$ $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$, + 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$ @@ -385,6 +404,7 @@ $if(links-as-notes)$ \DeclareRobustCommand{\href}[2]{#2\footnote{\url{#1}}} $endif$ $if(strikeout)$ +$-- also used for underline \usepackage[normalem]{ulem} % Avoid problems with \sout in headers with hyperref \pdfstringdefDisableCommands{\renewcommand{\sout}{}} @@ -414,47 +434,49 @@ $endif$ $if(pagestyle)$ \pagestyle{$pagestyle$} $endif$ - -% Make use of float-package and set default placement for figures to H. -% The option H means 'PUT IT HERE' (as opposed to the standard h option which means 'You may put it here if you like'). -\usepackage{float} -\floatplacement{figure}{$if(float-placement-figure)$$float-placement-figure$$else$H$endif$} - +$if(csl-refs)$ +\newlength{\cslhangindent} +\setlength{\cslhangindent}{1.5em} +\newlength{\csllabelwidth} +\setlength{\csllabelwidth}{3em} +\newlength{\cslentryspacingunit} % times entry-spacing +\setlength{\cslentryspacingunit}{\parskip} +\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing + {% don't indent paragraphs + \setlength{\parindent}{0pt} + % turn on hanging indent if param 1 is 1 + \ifodd #1 + \let\oldpar\par + \def\par{\hangindent=\cslhangindent\oldpar} + \fi + % set entry spacing + \setlength{\parskip}{#2\cslentryspacingunit} + }% + {} +\usepackage{calc} +\newcommand{\CSLBlock}[1]{#1\hfill\break} +\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} +\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} +\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$endif$ $for(header-includes)$ $header-includes$ $endfor$ $if(lang)$ -\ifxetex - $if(mainfont)$ - $else$ - % See issue https://github.com/reutenauer/polyglossia/issues/127 - \renewcommand*\familydefault{\sfdefault} - $endif$ - % Load polyglossia as late as possible: uses bidi with RTL langages (e.g. Hebrew, Arabic) - \usepackage{polyglossia} - \setmainlanguage[$for(polyglossia-lang.options)$$polyglossia-lang.options$$sep$,$endfor$]{$polyglossia-lang.name$} -$for(polyglossia-otherlangs)$ - \setotherlanguage[$for(polyglossia-otherlangs.options)$$polyglossia-otherlangs.options$$sep$,$endfor$]{$polyglossia-otherlangs.name$} -$endfor$ -\else - \usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} +\usepackage[$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=$babel-lang$]{babel} % get rid of language-specific shorthands (see #6817): \let\LanguageShortHands\languageshorthands \def\languageshorthands#1{} -$if(babel-newcommands)$ - $babel-newcommands$ -$endif$ -\fi $endif$ -\ifluatex +\ifLuaTeX \usepackage{selnolig} % disable illegal ligatures \fi $if(dir)$ -\ifxetex +\ifXeTeX % Load bidi as late as possible as it modifies e.g. graphicx \usepackage{bidi} \fi -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex +\ifPDFTeX \TeXXeTstate=1 \newcommand{\RL}[1]{\beginR #1\endR} \newcommand{\LR}[1]{\beginL #1\endL} @@ -472,27 +494,8 @@ $for(bibliography)$ \addbibresource{$bibliography$} $endfor$ $endif$ -$if(csl-refs)$ -\newlength{\cslhangindent} -\setlength{\cslhangindent}{1.5em} -\newlength{\csllabelwidth} -\setlength{\csllabelwidth}{3em} -\newenvironment{CSLReferences}[2] % #1 hanging-ident, #2 entry spacing - {% don't indent paragraphs - \setlength{\parindent}{0pt} - % turn on hanging indent if param 1 is 1 - \ifodd #1 \everypar{\setlength{\hangindent}{\cslhangindent}}\ignorespaces\fi - % set entry spacing - \ifnum #2 > 0 - \setlength{\parskip}{#2\baselineskip} - \fi - }% - {} -\usepackage{calc} -\newcommand{\CSLBlock}[1]{#1\hfill\break} -\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{#1}} -\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{#1}\break} -\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} +$if(nocite-ids)$ +\nocite{$for(nocite-ids)$$it$$sep$, $endfor$} $endif$ $if(csquotes)$ \usepackage{csquotes} @@ -533,35 +536,6 @@ $endif$ %% added %% -% -% language specification -% -% If no language is specified, use English as the default main document language. -% -$if(lang)$$else$ -\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex - \usepackage[shorthands=off,$for(babel-otherlangs)$$babel-otherlangs$,$endfor$main=english]{babel} -$if(babel-newcommands)$ - $babel-newcommands$ -$endif$ -\else - $if(mainfont)$ - $else$ - % Workaround for bug in Polyglossia that breaks `\familydefault` when `\setmainlanguage` is used. - % See https://github.com/Wandmalfarbe/pandoc-latex-template/issues/8 - % See https://github.com/reutenauer/polyglossia/issues/186 - % See https://github.com/reutenauer/polyglossia/issues/127 - \renewcommand*\familydefault{\sfdefault} - $endif$ - % load polyglossia as late as possible as it *could* call bidi if RTL lang (e.g. Hebrew or Arabic) - \usepackage{polyglossia} - \setmainlanguage[]{english} -$for(polyglossia-otherlangs)$ - \setotherlanguage[$polyglossia-otherlangs.options$]{$polyglossia-otherlangs.name$} -$endfor$ -\fi -$endif$ - $if(page-background)$ \usepackage[pages=all]{background} $endif$ @@ -1009,12 +983,12 @@ $endif$ } $endif$ $endif$ -$if(lot)$ -\listoftables -$endif$ $if(lof)$ \listoffigures $endif$ +$if(lot)$ +\listoftables +$endif$ $if(linestretch)$ \setstretch{$linestretch$} $endif$ diff --git a/examples/basic-example/document.pdf b/examples/basic-example/document.pdf index 29aaed9..d5ea8cc 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 ce5db48..c6e0bdb 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 3bf4da0..c5a58c9 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 e559fcd..f1d6338 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 054e8d0..43d2431 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 b64bcc1..ef33c3b 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 886e6c8..25da108 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/code-blocks-without-listings/preview.png b/examples/code-blocks-without-listings/preview.png index 265818d..110cd75 100644 Binary files a/examples/code-blocks-without-listings/preview.png and b/examples/code-blocks-without-listings/preview.png differ diff --git a/examples/header-and-footer/document.pdf b/examples/header-and-footer/document.pdf index 919a944..3540ee7 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 0a7d673..1d7d6b9 100644 Binary files a/examples/images-and-tables/document.pdf and b/examples/images-and-tables/document.pdf differ diff --git a/examples/images-and-tables/preview.png b/examples/images-and-tables/preview.png index 1aa21b7..c007f57 100644 Binary files a/examples/images-and-tables/preview.png and b/examples/images-and-tables/preview.png differ diff --git a/examples/language-chinese/document.pdf b/examples/language-chinese/document.pdf index 845d231..a250906 100644 Binary files a/examples/language-chinese/document.pdf and b/examples/language-chinese/document.pdf differ diff --git a/examples/language-chinese/preview.png b/examples/language-chinese/preview.png index 1cc3490..89ca6e0 100644 Binary files a/examples/language-chinese/preview.png and b/examples/language-chinese/preview.png differ diff --git a/examples/language-german/document.pdf b/examples/language-german/document.pdf index 95503cc..db5c794 100644 Binary files a/examples/language-german/document.pdf and b/examples/language-german/document.pdf differ diff --git a/examples/language-japanese/document.pdf b/examples/language-japanese/document.pdf index 624780d..06e5d67 100644 Binary files a/examples/language-japanese/document.pdf and b/examples/language-japanese/document.pdf differ diff --git a/examples/language-japanese/preview.png b/examples/language-japanese/preview.png index 2fc6b15..6e3a8d4 100644 Binary files a/examples/language-japanese/preview.png and b/examples/language-japanese/preview.png differ diff --git a/examples/page-background/document.pdf b/examples/page-background/document.pdf index 17e640e..00dd22a 100644 Binary files a/examples/page-background/document.pdf and b/examples/page-background/document.pdf differ diff --git a/examples/title-page-background/document.pdf b/examples/title-page-background/document.pdf index 0c5cb04..a89911f 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 2b9822f..26c5c4f 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 c1ceb65..0e1b766 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 56b8d3d..ed46e24 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 669b8ac..852d9e1 100644 Binary files a/examples/title-page-logo/document.pdf and b/examples/title-page-logo/document.pdf differ