The minted Package
Documentation | minted |
---|---|
Categories | code |
Description | The minted package creates nicely formatted and colorized code listings. It requires that you run |
Options |
\usepackage{minted} |
Examples |
To include a python code example, use the following:
\begin{minted}{python}
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
x = np.linspace(0,10,11)
ax.plot(x, np.sqrt(x))
plt.show()
\end{minted}