From 614de9963564f1201c52ae586122b30ee58c330e Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 28 May 2021 22:06:39 -0700 Subject: Updated templates for pandoc 2.14 --- default.context | 10 +++-- default.dzslides | 2 +- default.latex | 132 ++++++++++++++++++++++++++++++++----------------------- default.revealjs | 16 +++++-- default.s5 | 3 ++ default.slideous | 7 +++ default.slidy | 5 +++ 7 files changed, 112 insertions(+), 63 deletions(-) diff --git a/default.context b/default.context index 1588406..df39130 100644 --- a/default.context +++ b/default.context @@ -51,6 +51,7 @@ $endif$ % use microtypography \definefontfeature[default][default][script=latn, protrusion=quality, expansion=quality, itlc=yes, textitalics=yes, onum=yes, pnum=yes] +\definefontfeature[default:tnum][default][tnum=yes, pnum=no] \definefontfeature[smallcaps][script=latn, protrusion=quality, expansion=quality, smcp=yes, onum=yes, pnum=yes] \setupalign[hz,hanging] \setupitaliccorrection[global, always] @@ -97,6 +98,9 @@ $endif$ \setupitemize[autointro] % prevent orphan list intro \setupitemize[indentnext=no] +\defineitemgroup[enumerate] +\setupenumerate[each][fit][itemalign=left,distance=.5em,style={\feature[+][default:tnum]}] + \setupfloat[figure][default={here,nonumber}] \setupfloat[table][default={here,nonumber}] @@ -160,12 +164,12 @@ $endfor$ $if(toc)$ \completecontent $endif$ -$if(lot)$ -\completelistoftables -$endif$ $if(lof)$ \completelistoffigures $endif$ +$if(lot)$ +\completelistoftables +$endif$ $body$ diff --git a/default.dzslides b/default.dzslides index 11103ab..5e2749b 100644 --- a/default.dzslides +++ b/default.dzslides @@ -171,7 +171,7 @@ $if(subtitle)$

$subtitle$

$endif$ $endif$ diff --git a/default.latex b/default.latex index 830bf80..60f9972 100644 --- a/default.latex +++ b/default.latex @@ -2,7 +2,7 @@ \PassOptionsToPackage{unicode$for(hyperrefoptions)$,$hyperrefoptions$$endfor$}{hyperref} \PassOptionsToPackage{hyphens}{url} $if(colorlinks)$ -\PassOptionsToPackage{dvipsnames,svgnames*,x11names*}{xcolor} +\PassOptionsToPackage{dvipsnames,svgnames,x11names}{xcolor} $endif$ $if(dir)$ $if(latex-dir-rtl)$ @@ -36,6 +36,35 @@ $for(classoption)$ $classoption$$sep$, $endfor$ ]{$documentclass$} +$if(title)$ +\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} +$endif$ +$if(subtitle)$ +$if(beamer)$ +$else$ +\usepackage{etoolbox} +\makeatletter +\providecommand{\subtitle}[1]{% add subtitle to \maketitle + \apptocmd{\@title}{\par {\large #1 \par}}{}{} +} +\makeatother +$endif$ +\subtitle{$subtitle$} +$endif$ +\author{$for(author)$$author$$sep$ \and $endfor$} +\date{$date$} +$if(beamer)$ +$if(institute)$ +\institute{$for(institute)$$institute$$sep$ \and $endfor$} +$endif$ +$if(titlegraphic)$ +\titlegraphic{\includegraphics{$titlegraphic$}} +$endif$ +$if(logo)$ +\logo{\includegraphics{$logo$}} +$endif$ +$endif$ + $if(beamer)$ $if(background-image)$ \usebackgroundtemplate{% @@ -156,6 +185,25 @@ $if(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$} @@ -325,6 +373,31 @@ $endif$ $if(pagestyle)$ \pagestyle{$pagestyle$} $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$ @@ -375,61 +448,10 @@ $endif$ $if(nocite-ids)$ \nocite{$for(nocite-ids)$$it$$sep$, $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} -$endif$ $if(csquotes)$ \usepackage{csquotes} $endif$ -$if(title)$ -\title{$title$$if(thanks)$\thanks{$thanks$}$endif$} -$endif$ -$if(subtitle)$ -$if(beamer)$ -$else$ -\usepackage{etoolbox} -\makeatletter -\providecommand{\subtitle}[1]{% add subtitle to \maketitle - \apptocmd{\@title}{\par {\large #1 \par}}{}{} -} -\makeatother -$endif$ -\subtitle{$subtitle$} -$endif$ -\author{$for(author)$$author$$sep$ \and $endfor$} -\date{$date$} -$if(beamer)$ -$if(institute)$ -\institute{$for(institute)$$institute$$sep$ \and $endfor$} -$endif$ -$if(titlegraphic)$ -\titlegraphic{\includegraphics{$titlegraphic$}} -$endif$ -$if(logo)$ -\logo{\includegraphics{$logo$}} -$endif$ -$endif$ - \begin{document} $if(has-frontmatter)$ \frontmatter @@ -472,12 +494,12 @@ $endif$ } $endif$ $endif$ -$if(lot)$ -\listoftables -$endif$ $if(lof)$ \listoffigures $endif$ +$if(lot)$ +\listoftables +$endif$ $if(linestretch)$ \setstretch{$linestretch$} $endif$ diff --git a/default.revealjs b/default.revealjs index e6d6939..8a77674 100644 --- a/default.revealjs +++ b/default.revealjs @@ -52,6 +52,9 @@ $endif$ $for(author)$

$author$

$endfor$ +$for(institute)$ +

$institute$

+$endfor$ $if(date)$

$date$

$endif$ @@ -59,7 +62,12 @@ $endif$ $endif$ $if(toc)$
+
$endif$ @@ -116,17 +124,17 @@ $if(showSlideNumber)$ // 'all', 'print', or 'speaker' showSlideNumber: '$showSlideNumber$', $endif$ -$if(hash)$ // Add the current slide number to the URL hash so that reloading the // page/copying the URL will return you to the same slide - hash: $hash$, -$endif$ + hash: $if(hash)$$hash$$else$true$endif$, $if(hashOneBasedIndex)$ // Start with 1 for the hash rather than 0 hashOneBasedIndex: $hashOneBasedIndex$, $endif$ +$if(history)$ // Push each slide change to the browser history - history: $if(history)$$history$$else$true$endif$, + history: $history$, +$endif$ $if(keyboard)$ // Enable keyboard shortcuts for navigation keyboard: $keyboard$, diff --git a/default.s5 b/default.s5 index d761112..27e681f 100644 --- a/default.s5 +++ b/default.s5 @@ -61,6 +61,9 @@ $endif$ $if(author)$

$for(author)$$author$$sep$
$endfor$

$endif$ +$if(institute)$ +

$for(institute)$$institute$$sep$
$endfor$

+$endif$ $if(date)$

$date$

$endif$ diff --git a/default.slideous b/default.slideous index ebf582d..70d144b 100644 --- a/default.slideous +++ b/default.slideous @@ -63,9 +63,16 @@ $if(title)$ $if(subtitle)$

$subtitle$

$endif$ +$if(author)$

$for(author)$$author$$sep$
$endfor$

+$endif$ +$if(institute)$ +

+$for(institute)$$institute$$sep$
$endfor$ +

+$endif$ $if(date)$

$date$

$endif$ diff --git a/default.slidy b/default.slidy index 6b97768..a4ac97f 100644 --- a/default.slidy +++ b/default.slidy @@ -52,6 +52,11 @@ $if(author)$ $for(author)$$author$$sep$
$endfor$

$endif$ +$if(institute)$ +

+$for(institute)$$institute$$sep$
$endfor$ +

+$endif$ $if(date)$

$date$

$endif$ -- cgit v1.2.3