10

tgpagella activates old-style numbers with small caps. I'm looking for a possibility to disable old-style numbers (as in the other cases like textbf, etc.)

\documentclass{article}
\usepackage{tgpagella}
\begin{document}
0123456789

\textsc{0123456789}
\end{document}
2
  • 3
    Looking at the package tgpagella and the font files, there seems no native support for this. There are lining numerals for regular, regular-italics, bold, bold-italics, but old-style numerals for each combination with small caps. Actually, the file qpl-hist.txt of this font mentions: "we are not going to introduce any extensions [...] (e.g., for more convenient handling of oldstyle/normal digits) -- in such cases we suggest using the OTF fonts versions". Since it is not explicitly stated in your question: Is it possible for you to use XeLaTeX or LuaLaTeX?
    – e-birk
    Mar 10, 2013 at 15:36
  • 1
    Or is it an alternative to switch to a similar font that supports lining numerals with small caps? For example \usepackage[sc]{mathpazo} provides lining numbers with small caps though it would not support bold font small caps....
    – e-birk
    Mar 10, 2013 at 15:44

2 Answers 2

6
+50

use xelatex or lualatex instead:

\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\begin{document}
0123456789 TeX Gyre Pagella

\textsc{0123456789 TeX Gyre Pagella}

\end{document}

enter image description here

4

If the problem occurs only in a few locations defining the macro \newstylenums and using it for each number might be enough.

\documentclass{article}
\usepackage{tgpagella}
\usepackage{etoolbox}
\makeatletter
\newcommand{\newstylenums}[1]{%
  \begingroup%
  \expandafter\ifstrequal\expandafter{\f@family}{qpl}{%
    \expandafter\ifstrequal\expandafter{\f@shape}{sc}{\fontshape{n}}{}%
  }{}%
  \selectfont%
  #1%
  \endgroup%
}
\makeatother
\begin{document}
abfg 0123456789

\textsc{abfg \newstylenums{0123456789}}

\textbf{\textsc{abfg \newstylenums{0123456789}}}

\textit{abfg \newstylenums{0123456789}}
\end{document}

output of MWE

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .