Skip to content

Commit

Permalink
Updated templates for pandoc 3.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Feb 15, 2024
1 parent bc7a16b commit 2021932
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 4 deletions.
10 changes: 10 additions & 0 deletions default.context
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ $endif$

\setupbodyfontenvironment[default][em=italic] % use italic as em, not slanted

$-- set up font fallbacks
$for(mainfontfallback)$
\definefallbackfamily[mainface][rm][$mainfontfallback$][range=0x0000-0xFFFF, check=yes, force=no]
$endfor$
$for(sansfontfallback)$
\definefallbackfamily[mainface][ss][$sansfontfallback$][range=0x0000-0xFFFF, check=yes, force=no]
$endfor$
$for(monofontfallback)$
\definefallbackfamily[mainface][tt][$monofontfallback$][range=0x0000-0xFFFF, check=yes, force=no]
$endfor$
\definefallbackfamily[mainface][rm][CMU Serif][preset=range:greek, force=yes]
\definefontfamily[mainface][rm][$if(mainfont)$$mainfont$$else$Latin Modern Roman$endif$]
\definefontfamily[mainface][mm][$if(mathfont)$$mathfont$$else$Latin Modern Math$endif$]
Expand Down
27 changes: 27 additions & 0 deletions default.djot
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
$if(title)$
# $title$

$endif$
$if(author)$
$for(author)$
$author$
$endfor$

$endif$
$if(date)$
$date$

$endif$
$for(header-includes)$
$header-includes$

$endfor$
$for(include-before)$
$include-before$

$endfor$
$body$
$for(include-after)$
$include-after$

$endfor$
41 changes: 37 additions & 4 deletions default.latex
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,37 @@ $endif$
\ifPDFTeX\else
% xetex/luatex font selection
$if(mainfont)$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
$if(mainfontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("mainfontfallback",{
$for(mainfontfallback)$"$mainfontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$}
$endif$
$if(sansfont)$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
$if(sansfontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("sansfontfallback",{
$for(sansfontfallback)$"$sansfontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$$if(sansfontfallback)$,RawFeature={fallback=sansfontfallback}$endif$]{$sansfont$}
$endif$
$if(monofont)$
\setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$]{$monofont$}
$if(monofontfallback)$
\ifLuaTeX
\usepackage{luaotfload}
\directlua{luaotfload.add_fallback("monofontfallback",{
$for(monofontfallback)$"$monofontfallback$"$sep$,$endfor$
})}
\fi
$endif$
\setmonofont[$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$if(monofontfallback)$,RawFeature={fallback=monofontfallback}$endif$]{$monofont$}
$endif$
$for(fontfamilies)$
\newfontfamily{$fontfamilies.name$}[$for(fontfamilies.options)$$fontfamilies.options$$sep$,$endfor$]{$fontfamilies.font$}
Expand Down Expand Up @@ -297,6 +321,15 @@ $-- also used for underline
\usepackage[soul]{lua-ul}
\else
\usepackage{soul}
$if(beamer)$
\makeatletter
\let\HL\hl
\renewcommand\hl{% fix for beamer highlighting
\let\set@color\beamerorig@set@color
\let\reset@color\beamerorig@reset@color
\HL}
\makeatother
$endif$
$if(CJKmainfont)$
\ifXeTeX
% soul's \st doesn't work for CJK:
Expand Down Expand Up @@ -380,7 +413,7 @@ $if(babel-lang)$
$if(mainfont)$
\ifPDFTeX
\else
\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
\babelfont{rm}[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$$if(mainfontfallback)$,RawFeature={fallback=mainfontfallback}$endif$]{$mainfont$}
\fi
$endif$
$endif$
Expand Down

0 comments on commit 2021932

Please sign in to comment.