13

I'm using the Palatino font in combination with Euler Math. In most cases, digits in math mode appear as standard lined figures. However, in tables, they appear as oldstyle figures. Here's an example:

enter image description here

Why are these numbers rendered differently? How can I make the digits in the table match the other math digits?

Here's the code for the screenshot above:

\documentclass[12pt]{article}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[sc,osf]{mathpazo}
\linespread{1.025}
\usepackage[euler-digits,small]{eulervm}
\usepackage[usenames, dvipsnames]{color}

\begin{document}

\begin{center}
Normally, math digits appear as lined figures:
\[
    x = 1234567890
\]

However in a table, numbers appear as oldstyle figures:
\[
    x  =  
    \left \{
        \begin{tabular}{cc}
            0123 & 4567 \\
            8910 & 0101
        \end{tabular}
    \right \}
\]

\end{center}

\end{document}
3
  • 11
    tabular switches to textmode, use array in math. Sep 3, 2018 at 19:08
  • Thanks, @UlrikeFischer, that worked! If you add your comment as an answer, I'll accept. Sep 3, 2018 at 20:28
  • On a side note, there’s also the eulerpx package for a Euler/Palatino mashup, or Khaled Hosny’s OpenType math font Neo Euler, usable with unicode-math.
    – Davislor
    Sep 4, 2018 at 4:37

1 Answer 1

15

tabular switches to textmode, use array in math:

\documentclass[12pt]{article}
\usepackage{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage[sc,osf]{mathpazo}
\linespread{1.025}
\usepackage[euler-digits,small]{eulervm}
\usepackage[usenames, dvipsnames]{color}

\begin{document}

\begin{center}
Normally, math digits appear as lined figures:
\[
    x = 1234567890
\]

and in an array too:
\[
    x  =  
    \left \{
        \begin{array}{cc}
            0123 & 4567 \\
            8910 & 0101
        \end{array}
    \right \}
\]

\end{center}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.