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

Complete transition away from minted

Note, there should now be no need to toggle the appendix
parent b0995d71
No related branches found
No related tags found
No related merge requests found
// .devcontainer/devcontainer.json
{
"name": "LaTeX&SageTex Devcontainer",
"image": "registry.gitlab.com/lukenaylor/latex/sagetex-image:latest",
"postCreateCommand": "sage -pip install pseudowalls --extra-index-url https://gitlab.com/api/v4/projects/43962374/packages/pypi/simple",
"name": "LaTeX&SageTex&Chromacode Devcontainer",
"dockerFile": "./Dockerfile",
"customizations": {
"vscode": {
"settings": {
......
# Requires GNU sed, a latex distribution, sage
# and sagetex.sty visible in TEXINPUTS
MAINTEXFILE = main.tex
#MAINTEXFILE = main.tex
PREAMBLEFILES = newcommands.tex packages.tex theoremstyles.tex dependency-packages.tex
CHAPTERDIRS = general-semi-homog-presentation max-destabilizer-rank
TEXFILES = main.tex ${PREAMBLEFILES} $(addsuffix /content.tex, ${CHAPTERDIRS})
BIBFILES = $(addsuffix /references.bib, ${CHAPTERDIRS})
#TEXFILES = main.tex ${PREAMBLEFILES} $(addsuffix /content.tex, ${CHAPTERDIRS})
#BIBFILES = $(addsuffix /references.bib, ${CHAPTERDIRS})
SAGESCRIPT = main.sagetex.sage
SAGEARTIFACT = main.sagetex.sout
main.pdf: ${TEXFILES} ${BIBFILES} ${PREAMBLEFILES} ${SAGEARTIFACT} tilt.rs notebook_tex
latexmk || echo this fails but seems to produce pdf correctly
${SAGEARTIFACT}: ${SAGESCRIPT} chapter_py_libs
${SAGEARTIFACT}: ${SAGESCRIPT} chapter_deps
PYTHONPATH=`echo $(CHAPTERDIRS) | sed 's/ \+/:/g'` sage ${SAGESCRIPT}
${SAGESCRIPT}: ${TEXFILES}
latexmk || echo this is meant to fail
#${SAGESCRIPT}: ${TEXFILES}
#latexmk || echo this is meant to fail
# seems to be a bug with sagetex, only works if patched:
sed -i -e 's;version_check=)$$;version_check=True);' $@
#sed -i -e 's;version_check=)$$;version_check=True);' $@
CHAPTERPACKAGES = $(addsuffix /packages.tex , ${CHAPTERDIRS})
CHAPTERNEWCOMMANDS = $(addsuffix /newcommands.tex , ${CHAPTERDIRS})
dependency-packages.tex: ${CHAPTERPACKAGES}
( \
echo "% Package list generated from chapters:"; \
cat $^ | sed -e '/^%/d' -e '/^$$/d' | sort | uniq \
) > $@
packages.tex: dependency-packages.tex
CHAPTERNEWCOMMANDS = $(addsuffix /newcommands.tex , ${CHAPTERDIRS})
dependency-newcommands.tex: ${CHAPTERNEWCOMMANDS}
( \
echo "% newcommands generated from chapters:"; \
cat $^ | sed -e '/^%/d' -e '/^$$/d' | sort | uniq \
) > $@
newcommands.tex: dependency-newcommands.tex
chapter_py_libs:
chapter_deps:
for dir in $(CHAPTERDIRS); do \
$(MAKE) -C $$dir notebook_py_libs; \
$(MAKE) -C $$dir pretex; \
done
# SYMBOLIC LINKS
......@@ -63,7 +61,6 @@ $(1).tex: $(1).ipynb
sed -e '/\\documentclass/,/\\maketitle/d' -e '/\\end{document}/d' -i $(1).tex
endef
NOTEBOOKBASENAMES=$(basename $(wildcard **/*.ipynb))
#plots_and_expressions examples characteristic_curves rank_zero_case other_P_choice
......@@ -71,21 +68,20 @@ $(foreach _base, $(NOTEBOOKBASENAMES), $(eval $(call NOTEBOOK_TO_TEX_RULE, $(_ba
notebook_tex: $(addsuffix .tex, $(NOTEBOOKBASENAMES))
# TEX FILES FROM RUST
define RUST_TO_TEX_RULE
$(1).tex: $(1).rs
chromacode -r -i $(1).rs -o $(1).tex
endef
RUSTBASENAMES=$(basename $(wildcard tilt.rs/src/**/*.rs))
$(foreach _base, $(RUSTBASENAMES), $(eval $(call RUST_TO_TEX_RULE, $(_base))))
rust_tex: $(addsuffix .tex, $(RUSTBASENAMES))
newcommands.tex: dependency-newcommands.tex
packages.tex: dependency-packages.tex
## TEX FILES FROM RUST
#
#define RUST_TO_TEX_RULE
#$(1).tex: $(1).rs
# chromacode -r -i $(1).rs -o $(1).tex
#endef
#
#RUSTBASENAMES=$(basename $(wildcard tilt.rs/src/**/*.rs))
#
#$(foreach _base, $(RUSTBASENAMES), $(eval $(call RUST_TO_TEX_RULE, $(_base))))
#
#rust_tex: $(addsuffix .tex, $(RUSTBASENAMES))
pretex: chapter_deps ${PREAMBLEFILES} tilt.rs nb-appendix notebook_tex
.PHONY: clean
clean:
......
......@@ -5,6 +5,26 @@
\input{newcommands.tex}
\input{max-destabilizer-rank/newunicodes.tex}
\input{notebook-preamble.tex}
\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\lstset{
escapeinside={<@}{@>},
inputencoding=utf8,
extendedchars=true,
basicstyle={\linespread{1.1}\scriptsize\ttfamily},
breaklines=true,
showstringspaces=false,
showspaces=false,
numbers=left,
numberstyle={\scriptsize\ttfamily\color{black!60}},
%numbersep=9pt,
backgroundcolor=\color{backcolour},
aboveskip=5mm,
tabsize=2,
breaklines=true,
showtabs=false,
captionpos=b,
literate={β}{{\beta}}1 {μ}{{\mu}}1 {ü}{{\"u}}1 {°}{\dg}1 {}{{b}}1 {}{{n}}1
}
\usepackage[
style=alphabetic,
......@@ -41,14 +61,7 @@ sorting=ynt
\chapter{Computing Pseudowalls Program}
\lstinputlisting[
escapeinside={<@}{@>},
caption=aou,
captionpos=b,
frame=single,
numbers=left,
numberstyle={\scriptsize\ttfamily\color{black!60}},
basicstyle={\linespread{0.9}\scriptsize\ttfamily},
aboveskip=5mm
caption={aou}
]{tilt.rs/src/main.tex}
......
Subproject commit 4f760f58da7bb150f93ae6dbd5d25c8204e4c276
Subproject commit 548d72e2c693373576571bc18e24325e0ff6a527
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