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.

| improve this question | | | | |

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

| improve this answer | | | | |

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.

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

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

| improve this answer | | | | |
  • option defaultmathsizes would tell mathastext to use the standard choices of sizes for sub and sub-sub-scriptstyle. – user4686 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.

| 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

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.