Math formatting "Pro tips" edition: Fonts for math text! - "?"

Aug 5, 2017

Examples of fonts that you can use for math text.

Explanation:

It didn't occur to me to write this answer when I first found out about these because I don't use different fonts in my answers, but I think that some of you would make good use of them in your answers.

The basic font that we have for math text looks like this

• without hashtags

"Sample text"

• with hashtags

$\text{Sample text}$

Now, you have $5$ different fonts to choose from for math text. You can get these fonts by using one of the following font commands: bb(), bbb(), sf(), fr(), and tt().

You can thus have

• without hashtags

bb("Sample text using bb()")

• with hashtags

$\boldsymbol{\text{Sample text using bb()}}$

• without hashtags

bbb("Sample text using bbb()")

• with hashtags

$\mathbb{\text{Sample text using bbb()}}$

• without hashtags

sf("Sample text using sf()")

• with hashtags

$\textsf{\text{Sample text using sf()}}$

• without hashtags

fr("Sample text using fr()")

• with hashtags

$\mathfrak{\text{Sample text using fr()}}$

• without hashtags

tt("Sample text using tt()")

• with hashtags

$\texttt{\text{Sample text using tt()}}$

You can use different fonts for math expressions and equations. For example, you can have

• without hashtags

bb( (-b +- sqrt(b^2 - 4ac))/(2a) )

• with hashtags

$\boldsymbol{\frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}}$

• without hashtags

bbb( (-b +- sqrt(b^2 - 4ac))/(2a) )

• with hashtags

$\mathbb{\frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}}$

• without hashtags

sf( (-b +- sqrt(b^2 - 4ac))/(2a) )

• with hashtags

$\textsf{\frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}}$

• without hashtags

fr( (-b +- sqrt(b^2 - 4ac))/(2a) )

• with hashtags

$\mathfrak{\frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}}$

• without hashtags

tt( (-b +- sqrt(b^2 - 4ac))/(2a) )

• with hashtags

$\texttt{\frac{- b \pm \sqrt{{b}^{2} - 4 a c}}{2 a}}$

You can also combine different fonts with color to get things like

• without hashtags

bb(color(red)("Sample text using bb() and color(red)()")

• with hashtags

bb(color(red)("Sample text using bb() and color(red)()")

• without hashtags

tt(color(blue)("Sample text using tt() and color(blue)()")

• with hashtags

tt(color(blue)("Sample text using tt() and color(blue)()")

And so on and so forth.

You can even use different combinations of fonts if you want. For example, you can have things like

• without hashtags

overbrace( bb("something over here") )^(sf(color(green)("something un top"))) = underbrace( bb("something over there") )_ (sf(color(darkorange)("something on the bottom")))

• with hashtags

overbrace(bb("something over here"))^(sf(color(green)("something on top"))) = underbrace(bb("something over there"))_ (sf(color(darkorange)("something on the bottom")))