Skip to content
Snippets Groups Projects
Commit a03a536d authored by Luke Naylor's avatar Luke Naylor
Browse files

Switch from lstlisting to minted for code block

parent c41141fd
No related branches found
No related tags found
No related merge requests found
Pipeline #26875 passed
main.* main.*
!main.tex !main.tex
filtered_sage.txt filtered_sage.txt
_minted-main/*
...@@ -6,7 +6,6 @@ TEXFILES = ${MAINTEXFILE} ...@@ -6,7 +6,6 @@ TEXFILES = ${MAINTEXFILE}
SAGETEXSCRIPT = main.sagetex.sage SAGETEXSCRIPT = main.sagetex.sage
main.pdf: ${TEXFILES} main.sagetex.sout.tmp filtered_sage.txt main.pdf: ${TEXFILES} main.sagetex.sout.tmp filtered_sage.txt
lualatex ${MAINTEXFILE}
latexmk latexmk
main.sagetex.sout.tmp: ${SAGETEXSCRIPT} ${PYPLOTFILES} main.sagetex.sout.tmp: ${SAGETEXSCRIPT} ${PYPLOTFILES}
......
@default_files = ('main.tex'); @default_files = ('main.tex');
$pdf_mode = 1; $pdf_mode = 1;
$pdflatex = 'lualatex -synctex=1 -interaction=nonstopmode'; $pdflatex = 'lualatex -shell-escape -synctex=1 -interaction=nonstopmode';
@generated_exts = (@generated_exts, 'synctex.gz'); @generated_exts = (@generated_exts, 'synctex.gz');
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
\usepackage{hyperref} \usepackage{hyperref}
\usepackage{color} \usepackage{color}
\usepackage{sagetex} \usepackage{sagetex}
\usepackage{minted}
\usepackage[]{breqn} \usepackage[]{breqn}
\newcommand{\QQ}{\mathbb{Q}} \newcommand{\QQ}{\mathbb{Q}}
...@@ -494,32 +495,8 @@ linear terms match those of the other bounds in the previous subsections. ...@@ -494,32 +495,8 @@ linear terms match those of the other bounds in the previous subsections.
\newpage \newpage
\section{Appendix - SageMath code} \section{Appendix - SageMath code}
\definecolor{codegreen}{rgb}{0,0.6,0} \usemintedstyle{tango}
\definecolor{codegray}{rgb}{0.5,0.5,0.5}
\definecolor{codepurple}{rgb}{0.58,0,0.82} \inputminted[obeytabs=true,tabsize=2]{python}{filtered_sage.txt}
%\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstdefinestyle{mystyle}{
%backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2
}
\lstset{style=mystyle}
\lstinputlisting[language=python]{filtered_sage.txt}
\end{document} \end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment