TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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}?

share|improve this question
up vote 5 down vote accepted

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.

share|improve this answer
Thanks, it works fine now! – Matthew Leingang Jun 14 '11 at 23:56
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.

share|improve this answer
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 ... – Herbert 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 ... – Herbert Jun 11 '11 at 6:35
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 posting your answer, you agree to the privacy policy and terms of service.

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