-
Notifications
You must be signed in to change notification settings - Fork 970
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: merge changes from pandoc 3.6 LaTeX template (#414)
* feat: merge changes from pandoc 3.6 LaTeX & Beamer template * feat: merge changes from pandoc 3.6.1 LaTeX & Beamer template * feat: add new partial `$font-settings.latex()$` to the release script * chore: add changelog for version `3.1.0`
- Loading branch information
1 parent
5dddcb3
commit c250725
Showing
7 changed files
with
147 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
$-- 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)$ | ||
$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)$ | ||
$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)$ | ||
$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$} | ||
$endfor$ | ||
$if(mathfont)$ | ||
$if(mathspec)$ | ||
\ifXeTeX | ||
\setmathfont(Digits,Latin,Greek)[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} | ||
\else | ||
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} | ||
\fi | ||
$else$ | ||
\setmathfont[$for(mathfontoptions)$$mathfontoptions$$sep$,$endfor$]{$mathfont$} | ||
$endif$ | ||
$endif$ | ||
$if(CJKmainfont)$ | ||
\ifXeTeX | ||
\usepackage{xeCJK} | ||
\setCJKmainfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmainfont$} | ||
$if(CJKsansfont)$ | ||
\setCJKsansfont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKsansfont$} | ||
$endif$ | ||
$if(CJKmonofont)$ | ||
\setCJKmonofont[$for(CJKoptions)$$CJKoptions$$sep$,$endfor$]{$CJKmonofont$} | ||
$endif$ | ||
\fi | ||
$endif$ | ||
$if(luatexjapresetoptions)$ | ||
\ifLuaTeX | ||
\usepackage[$for(luatexjapresetoptions)$$luatexjapresetoptions$$sep$,$endfor$]{luatexja-preset} | ||
\fi | ||
$endif$ | ||
$if(CJKmainfont)$ | ||
\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$ | ||
% Use upquote if available, for straight quotes in verbatim environments | ||
\IfFileExists{upquote.sty}{\usepackage{upquote}}{} | ||
\IfFileExists{microtype.sty}{% use microtype if available | ||
\usepackage[$for(microtypeoptions)$$microtypeoptions$$sep$,$endfor$]{microtype} | ||
\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts | ||
}{} | ||
|
Oops, something went wrong.