From 43f67bcdd5dd088d6eb5d75fe592a2ee9e6ecc2c Mon Sep 17 00:00:00 2001 From: Holger Dell Date: Sun, 19 Sep 2021 18:29:54 +0200 Subject: [PATCH] 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. --- Thesis.tex | 5 +++++ mimosis.cls | 15 ++++----------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/Thesis.tex b/Thesis.tex index 9952cd4..182d82f 100644 --- a/Thesis.tex +++ b/Thesis.tex @@ -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} diff --git a/mimosis.cls b/mimosis.cls index 307e801..ce755a3 100644 --- a/mimosis.cls +++ b/mimosis.cls @@ -199,17 +199,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