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

What I can tell, the font you get, it looks like the standard, "bookish" font, only tilted. How can I get a monospace font with a straight spine, e.g., the font you get with texttt?

I'm happy with everything else, including the interface, so, when set up, I don't want to invoke this in any other way than the standard $ ... $ dance.

share|improve this question

You could put


in the preamble of your document. Though I'm not certain why you would want to use this as the default math font. Also, by making this declaration some symbols get rendered incorrectly:


Hello world:
    x^2 + y^2 = \tan(\theta)

which gets rendered as:

enter image description here

There is another approach. But it requires a bit more work.

First, declare a symbol font name


But this is not sufficient to enact the changes you want. Now you've got to go through for every symbol you want set in this style and declare it:


etc., and then


etc. It's a lot of work. You'll be losing a lot work others have already done.

At this point, I find my answer bordering on the questionable. For example, even in the original solution I posted \tan got type-set in the usual default font, and none of the changes I'm suggesting above seem to change that.

share|improve this answer
I don't like the tilted bookish font, nothin' more advanced as that. – Emanuel Berg Dec 13 '12 at 3:35

The mathastext package might meet your needs. The package will give you, by default, an upright roman font for math material, but otherwise it may do exactly what you're looking for.

The following MWE illustrates the package's default behavior:

Hello, Pythagoras. $a^2 + b^2 = c^2$. Goodbye, mathematics.

enter image description here

share|improve this answer

To get a typewriter font for the letters, digits, and a few symbols in math mode, you can use mathastext as advised in Mico's answer, with some additional set-up:

\MTfamily{\ttdefault}\Mathastext % this tells mathastext to use typewriter
Hello, Pythagoras. $a^2 + b^2 = c^2$. Goodbye, mathematics.

mathastext tt

share|improve this answer
option defaultmathsizes would tell mathastext to use the standard choices of sizes for sub and sub-sub-scriptstyle. – jfbu Mar 11 '14 at 12:39

You can also take a look at this font survey for (La)TeX: http://mirror.ctan.org/info/Free_Math_Font_Survey/survey.html

There you will find a lot of math (and text) fonts. Maybe some of them will suit your needs.

share|improve this answer
please don't give direct links like that; we're trying to distribute ctan's load. the “correct” address for that file is http://mirror.ctan.org/info/Free_Math_Font_Survey/survey.html – wasteofspace Mar 11 '14 at 15:32
I think this list should be kept up to date. – marczellm Mar 11 '14 at 15:54
thanks wasteofspace, I fixed it. – Alexis Mar 11 '14 at 20:31

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.