latex and xetex support

This commit is contained in:
Meik Hellmund 2021-06-16 17:55:59 +02:00
parent 36ebf609ff
commit 9252349a70
3 changed files with 30 additions and 8 deletions

Binary file not shown.

View File

@ -1,7 +1,9 @@
\documentclass[unibrief]{scrlttr2} \documentclass[unibrief]{scrlttr2}
\usepackage[ngerman]{babel} % change language here \usepackage[ngerman]{babel} % change language here
\usepackage[utf8]{inputenc} % whatever input encoding you use \ifpdftex
\usepackage[utf8]{inputenc} % whatever input encoding you use
\fi
\usepackage[math]{blindtext} % remove this line \usepackage[math]{blindtext} % remove this line
% (unless you need \blindtext) % (unless you need \blindtext)
\begin{document} \begin{document}

View File

@ -7,19 +7,39 @@
fontsize=10pt, fontsize=10pt,
foldmarks=MPvb, foldmarks=MPvb,
backaddress=plain, backaddress=plain,
% fromlogo,
% fromalign=right,
pagenumber=footright, pagenumber=footright,
refline=nodate refline=nodate
} }
% font stuff % font stuff
\RequirePackage[stretch=10]{microtype} \RequirePackage{iftex}
\RequirePackage{libertine} \ifpdftex
\RequirePackage[T1]{fontenc} \RequirePackage{libertine}
\RequirePackage[libertine]{newtxmath} \RequirePackage[libertine]{newtxmath}
\RequirePackage[T1]{fontenc}
\else\ifxetex
\RequirePackage{fontspec}
\RequirePackage{unicode-math}
\setmainfont[
Extension=.otf,
UprightFont={*-Regular},
BoldFont={*-Bold},
ItalicFont={*-Italic},
BoldItalicFont={*-BoldItalic}]{LibertinusSerif}
\setmathfont[Scale=MatchUppercase]{LibertinusMath-Regular.otf}
\else\ifluatex
\RequirePackage{fontspec}
\RequirePackage{unicode-math}
\setmainfont[
Extension=.otf,
UprightFont={*-Regular},
BoldFont={*-Bold},
ItalicFont={*-Italic},
BoldItalicFont={*-BoldItalic}]{LibertinusSerif}
\setmathfont[Scale=MatchUppercase]{LibertinusMath-Regular.otf}
\fi\fi\fi
\RequirePackage[stretch=10]{microtype}
\RequirePackage{lastpage} \RequirePackage{lastpage}
\RequirePackage{graphicx} \RequirePackage{graphicx}