fix: Moved font ordinals to Thesis.tex.

Since most fonts do not support this feature, it should be chosen by the
user and not be enforced by the class.  See also #14.
pull/25/head
Holger Dell 2021-09-19 18:29:54 +02:00
parent f39b7644d8
commit d9a8ed4d5e
2 changed files with 9 additions and 11 deletions

View File

@ -58,6 +58,11 @@
\ifxetexorluatex
\setmainfont{Minion Pro}
% Most fonts don't support ordinals, but if yours does, this may give better results:
\renewcommand{\st}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{st}}\xspace}
\renewcommand{\rd}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{rd}}\xspace}
\renewcommand{\nd}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{nd}}\xspace}
\renewcommand{\th}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{th}}\xspace}
\else
\usepackage[lf]{ebgaramond}
\usepackage[oldstyle,scale=0.7]{sourcecodepro}

View File

@ -201,17 +201,10 @@
% Ordinals
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\ifxetexorluatex
\newcommand {\st}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{st}}\xspace}
\newcommand {\rd}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{rd}}\xspace}
\newcommand {\nd}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{nd}}\xspace}
\renewcommand{\th}{{\addfontfeatures{VerticalPosition=Ordinal}\textup{th}}\xspace}
\else
\newcommand {\st}{\textsuperscript{\textup{st}}\xspace}
\newcommand {\rd}{\textsuperscript{\textup{rd}}\xspace}
\newcommand {\nd}{\textsuperscript{\textup{nd}}\xspace}
\renewcommand{\th}{\textsuperscript{\textup{th}}\xspace}
\fi
\newcommand {\st}{\textsuperscript{\textup{st}}\xspace}
\newcommand {\rd}{\textsuperscript{\textup{rd}}\xspace}
\newcommand {\nd}{\textsuperscript{\textup{nd}}\xspace}
\renewcommand{\th}{\textsuperscript{\textup{th}}\xspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Penalties