mirror of
https://github.com/benedictdudel/pandoc-letter-din5008.git
synced 2024-08-16 10:19:49 +02:00
Merge pull request #17 from drupol/patch-1
Add support for custom fonts
This commit is contained in:
commit
78cb69210d
1 changed files with 49 additions and 0 deletions
49
letter.latex
49
letter.latex
|
@ -6,6 +6,55 @@ $for(letteroption)$
|
||||||
$endfor$
|
$endfor$
|
||||||
]{scrlttr2}
|
]{scrlttr2}
|
||||||
|
|
||||||
|
% Fonts
|
||||||
|
% Inspired from https://github.com/aaronwolen/pandoc-letter
|
||||||
|
$if(fontfamily)$
|
||||||
|
\usepackage[$for(fontfamilyoptions)$$fontfamilyoptions$$sep$,$endfor$]{$fontfamily$}
|
||||||
|
$else$
|
||||||
|
\usepackage{lmodern}
|
||||||
|
$endif$
|
||||||
|
$for(fontfamilies)$
|
||||||
|
\newfontfamily{$fontfamilies.name$}[$fontfamilies.options$]{$fontfamilies.font$}
|
||||||
|
$endfor$
|
||||||
|
$if(mainfont)$
|
||||||
|
\setmainfont[$for(mainfontoptions)$$mainfontoptions$$sep$,$endfor$]{$mainfont$}
|
||||||
|
$endif$
|
||||||
|
$if(sansfont)$
|
||||||
|
\setsansfont[$for(sansfontoptions)$$sansfontoptions$$sep$,$endfor$]{$sansfont$}
|
||||||
|
$endif$
|
||||||
|
$if(monofont)$
|
||||||
|
\setmonofont[Mapping=tex-ansi$if(monofontoptions)$,$for(monofontoptions)$$monofontoptions$$sep$,$endfor$$endif$]{$monofont$}
|
||||||
|
$endif$
|
||||||
|
$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$}
|
||||||
|
\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$
|
||||||
|
% End of Fonts
|
||||||
|
|
||||||
\usepackage[ngerman]{babel}
|
\usepackage[ngerman]{babel}
|
||||||
\usepackage[T1]{fontenc}
|
\usepackage[T1]{fontenc}
|
||||||
\usepackage[utf8]{inputenc}
|
\usepackage[utf8]{inputenc}
|
||||||
|
|
Loading…
Reference in a new issue