I am wondering if there is a way to change the math font temporarily, similar to the way it can be done in text mode:
{\ttfamily Some text in typewriter font.}
Is there a way to do $\ttfamily a + b = c$
for example?
I know I could do $\mathtt{a + b = c}$
, just like I could do \texttt{text}
, but sometimes the other way results in cleaner code.
Please mind I am not looking for something like $\texttt{monospace} \textit{ in math.}$
I want to be able to write complicated formulas without having to mention the font in every word, as I would do in, for example, $\Sigma_{\mathtt{i} = 1}^{\mathtt{n}}$
.
Best Answer
If all you need is to use the monospaced alphabet for variables:
For a more complete setup, you can complement the monospaced text font with the concrete fonts (however, they are only available in bitmap format).