# Change Font of Numbers Using Baskerville

I am using the a Baskerville font, via

\usepackage{lmodern} % monospace font
\usepackage[scale=0.89]{tgheros} % Helvetica is too big
\usepackage[osf]{Baskervaldx} % tosf in text, tlf in math
\usepackage[cal=boondoxo]{mathalfa} % mathcal from STIX, unslanted a bit


However, I'm not a fan of the numbers in textmode, but I am in mathmode. So I want to change the numbers to be in the maths format; this saves me from writing $1$ every time, but also citations and the bibliography would then use the maths format.

There are various related questions:

However, I have not been able to successfully adapt any of these answers into a solution for my problem. I'd rather stick with pdflatex rather than xelatex... although I can't think of a rigorous justification for that!

Remove the osf option to not have oldstyle figures in text:

\documentclass{article}

\usepackage{lmodern} % monospace font
\usepackage[scale=0.89]{tgheros} % Helvetica is too big
\usepackage[]{Baskervaldx} % tosf in text, tlf in math
\usepackage[cal=boondoxo]{mathalfa} % mathcal from STIX, unslanted a bit

\begin{document}

1234567890

$1234567890$

\end{document}

• Well that was easy, thanks! +1 -- I got the Baskerville code from another question (tex.stackexchange.com/a/241202/81928), and didn't understand what osf was. Thanks very much! (I'll accept once the time limit has passed...) – Sam T Jul 31 '19 at 11:20