[Tex/LaTex] How to change the standard “math font”

fontstypewriter

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.

Best Answer

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:

\documentclass{article}
\usepackage{mathastext}
\begin{document}
Hello, Pythagoras. $a^2 + b^2 = c^2$. Goodbye, mathematics.
\end{document}

enter image description here