-
Notifications
You must be signed in to change notification settings - Fork 5
/
minted.tex
executable file
·35 lines (30 loc) · 941 Bytes
/
minted.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
\documentclass[border=0.5 cm]{standalone}
%%%%%%%%%%%%%%
\usepackage{xcolor}
\usepackage{minted}
\usepackage{tcolorbox}
\usepackage{etoolbox}
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
% minted settings, for code typesetting
% minted requires several things:
% - the Pygments package must be installed -> pip install Pygments
% - the --shell-escape must be added to the pdflatex command line
%%%%%%%%%%%%%%%%%%%%%%%%
\usemintedstyle{solarized-dark}
\setminted{fontsize=\footnotesize}
\definecolor{mintedbg}{RGB}{33,44,49}
\newtcolorbox{mintedbox}{colframe = mintedbg, colback = mintedbg, coltitle = mintedbg}
\BeforeBeginEnvironment{minted}{\begin{mintedbox}}
\AfterEndEnvironment{minted}{\end{mintedbox}}
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
%%%%%%%%%%%%%%
\begin{document}
%%%%%%%%%%%%%%
\begin{minted}{python}
from stable_baselines import PPO2
model = PPO2("MlpPolicy", "CartPole-v1").learn(10000)
\end{minted}
%%%%%%%%%%%%%%
\end{document}