[Tex/LaTex] OldStyle Numbers in Body Text Only—Lining Numbers Otherwise

#enumeratefootnotesoldstylenumspage-numberingtitles

My main font numbers are set to OldStyle. How can I set Lining numbers for:

  • Titles (chapter, section, subsection, &c…),
  • Beginning of enumeration,
  • Page number, and
  • Footnote numbers (but not footnote itself)?

MWE:

\documentclass{article}

\usepackage{fontspec}
\usepackage{enumerate}
\usepackage{biblatex}

\setmainfont[Scale=1.0,Numbers={OldStyle,Proportional},Ligatures=TeX]{Minion Pro}

\begin{document}

\section{Section}
Text with numbers; 123 456 seven \& eight.

\begin{enumerate}
\item Item1 with footnote.\footcite{001}
\end{enumerate}

\end{document}

Current Output:
Current output
Note:

  1. Ignore that the actual footnote has not been properly compiled.
  2. This is my first post; I apologise if it doesn't comply with guidelines. Please let me know if anything is wrong and I will make note for future reference.

Best Answer

Define a font family with the same font name, but with the Numbers=Lining option and change all places where lining numbers are desired.

I don't think you really want this, though. I used Linux Libertine because I don't have Minion Pro.

\documentclass{book}

\usepackage{fontspec}
\usepackage{enumitem}
\usepackage{biblatex}
%\usepackage{etoolbox} % already loaded by biblatex

\setmainfont[Numbers={OldStyle,Proportional},Ligatures=TeX]{Linux Libertine O}
\newfontfamily{\liningmainfont}[Numbers=Lining,Ligatures=TeX]{Linux Libertine O}

\setlist[enumerate]{font=\liningmainfont}
\makeatletter
\renewcommand{\@makefnmark}{%
  \hbox{\@textsuperscript{\normalfont\liningmainfont\@thefnmark}}%
}
\renewcommand\@seccntformat[1]{{\liningmainfont\@nameuse{the#1}\quad}}
\patchcmd{\@makechapterhead}{\thechapter}{{\liningmainfont\thechapter}}{}{}
\patchcmd{\chaptermark}{\thechapter}{{\liningmainfont\thechapter}}{}{}
\patchcmd{\sectionmark}{\thesection}{{\liningmainfont\thesection}}{}{}
\patchcmd{\ps@plain}{\thepage}{{\liningmainfont\thepage}}{}{}
\patchcmd{\@oddhead}{\thepage}{{\liningmainfont\thepage}}{}{}
\patchcmd{\@evenhead}{\thepage}{{\liningmainfont\thepage}}{}{}
\makeatother

\begin{document}

\chapter{Chapter}

\section{Section}
Text with numbers; 123 456 seven \& eight.

\begin{enumerate}
\item Item1 with footnote.\footcite{001}
\end{enumerate}

\clearpage
Even page
\clearpage
Odd page

\end{document}

Maybe there are other places where oldstyle numbers pop out; follow the same pattern: find the command that prints the number and patch it.

Related Question