I have a document where the main font is Gotham Narrow Book but the numbers are set in Gotham Narrow Light, and this is set with commands provided by the mathspec package. I'd like to typeset a table where the digits come from a monospace font so that they'll line up better. But my invocation of \setmathtt has no effect.

Here is my sample document:

\setmainfont[BoldFont=Gotham Narrow Medium]{Gotham Narrow Book}
\setmathrm{Gotham Book}
\setmathfont(Latin){Gotham Narrow Book}
\setmathfont(Digits){Gotham Narrow Light}
%:FIXME seems to have no effect
 Normal         & TT \\
 $123456789$ & $\mathtt{123456789}$ \\
 $111111111$ & $\mathtt{111111111}$

Does \setmathfont(Digits){Gotham Narrow Light} preclude \setmathtt{Courier}?


There seems to be a bug in mathspec; if I ask for


I get 1841, i.e., "0731. It seems that 7 is the math group for Gotham Narrow Light, so the mathcode should be "7731. Indeed, if I say


I get the desired behavior.

  • Good work tracking this down. You saved my afternoon. +1 – ptomato Oct 26 '12 at 12:17

It works with \setmathtt{Courier New} and something like \mathtt{f(x)} because the digits are set with Gotham.

  • But that's the problem Matthew is describing. It seems like when you specify a math font for digits, using \setmathsfont that gets used no matter how you specify the mathtt font. – Alan Munn Jun 10 '11 at 19:41
  • I know, what's the problem ... – user2478 Jun 10 '11 at 19:44
  • Matthew wants his mathtt digits to be in the mathtt font. That's the problem. – Alan Munn Jun 10 '11 at 19:47
  • @Alan: I wrote that I know the problem ... – user2478 Jun 11 '11 at 6:35
  • 3
    Sorry, a little German/English linguistic mix-up there. Your comma after 'know' and the verb second in 'what's the problem' made me think that 'what's the problem' was a question. (But now I definitely don't understand your posted answer.) – Alan Munn Jun 11 '11 at 12:16

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.