1

For my section headings, I like the look of using shorter numbers (they detract less from the section title), and get by with using the \smaller command. However, they are a smaller font size so skinnier as well, which looks a bit strange. I'm not requesting old-style numbers (hang below baseline). Any ideas on how I could achieve this? Perhaps vertically shrink text?

Edit:

Perhaps one solution is to use scalebox (top) vs. smaller (bottom)

\scalebox{1}[0.8]{1} Intro\\
{\smaller 1} Intro\\

enter image description here

  • 2
    It would be nice if you provided some minimal code to play with... – campa Oct 27 '20 at 13:49
  • By the way, these are called text/hanging/lowercase/old-style figures. "Old-style" is the most used in CTAN package descriptions, I believe. ClassicThesis uses them by default, IIRC. Also https://tex.stackexchange.com/questions/41095/which-latex-fonts-have-old-style-numbers. – homocomputeris Oct 28 '20 at 21:21

1 Answers1

1

Since you didn’t want old-style numbers, here is a solution that scales the height of the numbers to the x-height of the current font, but leaves the width unchanged. This should result in strokes the same thickness.

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{cmbright}

\usepackage{xfp} % For \fpeval \usepackage{graphicx} % For \scalebox

\providecommand\liningnums[1]{#1}

\newlength{\capsheight} \newlength{\xheight} \newcommand\smallnums[1]{% \settoheight{\capsheight}{X}% \settoheight{\xheight}{x}% \scalebox{1.0}[\fpeval{\the\xheight / \the\capsheight}]{\liningnums{#1}}% }

\begin{document} \smallnums{12} Drummers Drumming *

\oldstylenums{11} Pipers Piping

10 Lords a-Leaping

\fontfamily{lmss}\itshape\selectfont \smallnums{9} Ladies Dancing *

\oldstylenums{8} Maids a-Milking

7 Swans a-Swimming

\fontfamily{lmtt}\upshape\bfseries\selectfont \smallnums{6} Geese a-Laying *

\oldstylenums{5} Golden Rings

4 Calling Birds

\normalfont\fontfamily{lmr}\selectfont \smallnums{3} French Hens *

\oldstylenums{2} Turtledoves

And 1 Partridge in 1 Pear Tree

\end{document}

font sample

Davislor
  • 44,045