The result (computer modern: cm) is:
In this page, I try using all mathtext fontset in python and matplotlib.pyplot. It seems that the resulting text of \mathbb{hogehoge}, \mathrm{\mathbb{hogehgoe}}, \mathfrak{hogehoge}, \mathsf{hogehoge}, and \mathrm{\mathsf{hogehoge}} are same.
In [1]:
%matplotlib inline
import matplotlib.pyplot as plt
Check the options for rcParams['mathtext.fontset']
In [2]:
plt.rcParams['mathtext.fontset'] = 'hoge'
So, we have fololowing 5 (+1 for further geek person) options: 'dejavusans', 'dejavuserif', 'cm', 'stix', and 'stixsans'.
dejavuserif¶
In [3]:
plt.rcParams["mathtext.fontset"] = "dejavuserif"
plt.figure(figsize=(12,10))
plt.plot(range(11),color="0.9")
plt.text(0.2,9,r"$\mathrm{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,8,r"$\mathit{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,7,r"$\mathtt{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,6,r"$\mathcal{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,5,r"$\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,4,r"$\mathrm{\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.text(0.2,3,r"$\mathfrak{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,2,r"$\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,1,r"$\mathrm{\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.show()
dejavusans¶
In [4]:
plt.rcParams["mathtext.fontset"] = "dejavusans"
plt.figure(figsize=(12,10))
plt.plot(range(11),color="0.9")
plt.text(0.2,9,r"$\mathrm{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,8,r"$\mathit{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,7,r"$\mathtt{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,6,r"$\mathcal{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,5,r"$\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,4,r"$\mathrm{\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.text(0.2,3,r"$\mathfrak{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,2,r"$\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,1,r"$\mathrm{\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.show()
cm¶
In [5]:
plt.rcParams["mathtext.fontset"] = "cm"
plt.figure(figsize=(12,10))
plt.plot(range(11),color="0.9")
plt.text(0.2,9,r"$\mathrm{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,8,r"$\mathit{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,7,r"$\mathtt{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,6,r"$\mathcal{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,5,r"$\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,4,r"$\mathrm{\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.text(0.2,3,r"$\mathfrak{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,2,r"$\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,1,r"$\mathrm{\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.show()
stix¶
In [6]:
plt.rcParams["mathtext.fontset"] = "stix"
plt.figure(figsize=(12,10))
plt.plot(range(11),color="0.9")
plt.text(0.2,9,r"$\mathrm{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,8,r"$\mathit{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,7,r"$\mathtt{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,6,r"$\mathcal{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,5,r"$\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,4,r"$\mathrm{\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.text(0.2,3,r"$\mathfrak{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,2,r"$\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,1,r"$\mathrm{\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.show()
stixsans¶
In [7]:
plt.rcParams["mathtext.fontset"] = "stixsans"
plt.figure(figsize=(12,10))
plt.plot(range(11),color="0.9")
plt.text(0.2,9,r"$\mathrm{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,8,r"$\mathit{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,7,r"$\mathtt{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,6,r"$\mathcal{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,5,r"$\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,4,r"$\mathrm{\mathbb{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.text(0.2,3,r"$\mathfrak{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,2,r"$\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}$",size=23)
plt.text(0.2,1,r"$\mathrm{\mathsf{The\ quick\ red\ dog\ jumped\ over\ the\ lazy\ brown\ fox}}$",size=23)
plt.show()