Section 14 LaTeX Packages
To use a LaTeX package
name
, put the following line below
\documentclass{...}.
\begin{framed}
This is framed.
\end{framed}
This is framed.
\href{https://en.wikipedia.org/wiki/Law_of_large_numbers}{Law of large numbers}
Law of large numbers \mintinline{python}{s = "hello"}
s = "hello"
\begin{minted}{python}
def sum(n):
s = 0
for i in range(1, n + 1):
s = s + i
return s
\end{minted}
def sum(n):
s = 0
for i in range(1, n + 1):
s = s + i
return s
\newminted{python}{}
\begin{pythoncode}
def sum(n):
s = 0
for i in range(1, n + 1):
s = s + i
return s
\end{pythoncode}
def sum(n):
s = 0
for i in range(1, n + 1):
s = s + i
return s
\newenvironment{python}{\VerbatimEnvironment\begin{displaycode}{python}}{\end{displaycode}}
\begin{python}
2**10
\end{python}
It is recommended to use the
external library to speed up compilation and to display TikZ graphics on the web.
\usetikzlibrary{external}
\tikzexternalize
When using the external library, you must compile your LaTeX document with the -shell-escape option.
xelatex -shell-escape mybook.tex
This will generate PDF files for each TikZ figure. You must upload these PDF files together with your book source files to MathPage.