diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-04-19 15:20:48 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-04-19 15:20:48 +0200 |
commit | 6e70a46771d3b28edc80a88de22b98df47147dc1 (patch) | |
tree | 36a57af96167a027f4700e0a98032caa51e90189 | |
parent | d11b37a10cefd4b9b739008df49f06978fdefc11 (diff) | |
download | uni-6e70a46771d3b28edc80a88de22b98df47147dc1.tar uni-6e70a46771d3b28edc80a88de22b98df47147dc1.tar.gz uni-6e70a46771d3b28edc80a88de22b98df47147dc1.tar.bz2 uni-6e70a46771d3b28edc80a88de22b98df47147dc1.tar.xz uni-6e70a46771d3b28edc80a88de22b98df47147dc1.zip |
TeX preamble with listings & algorithms
-rwxr-xr-x | gup/pdf.gup | 2 | ||||
-rw-r--r-- | preamble.tex | 20 | ||||
-rw-r--r-- | shell.nix | 2 |
3 files changed, 22 insertions, 2 deletions
diff --git a/gup/pdf.gup b/gup/pdf.gup index f49ec39..7604813 100755 --- a/gup/pdf.gup +++ b/gup/pdf.gup | |||
@@ -3,6 +3,6 @@ | |||
3 | gup -u ${2%.pdf}.md | 3 | gup -u ${2%.pdf}.md |
4 | 4 | ||
5 | for i in 0 1; do | 5 | for i in 0 1; do |
6 | pandoc -t latex -o $2 -V "geometry=margin=2cm" -V "fontfamily=libertine" --listings --latex-engine=lualatex ${2%.pdf}.md >&2 | 6 | pandoc -t latex -o $2 -V "geometry=margin=2cm" -V "fontfamily=libertine" -H preamble.tex --listings --latex-engine=lualatex ${2%.pdf}.md >&2 |
7 | done | 7 | done |
8 | [[ -e $2 ]] && touch $2 | 8 | [[ -e $2 ]] && touch $2 |
diff --git a/preamble.tex b/preamble.tex new file mode 100644 index 0000000..3aeecda --- /dev/null +++ b/preamble.tex | |||
@@ -0,0 +1,20 @@ | |||
1 | \usepackage{listings} | ||
2 | \usepackage{algorithmic} | ||
3 | \usepackage{amsmath} | ||
4 | |||
5 | \renewcommand{\algorithmicrequire}{\textbf{Input:}} | ||
6 | \renewcommand{\algorithmicensure}{\textbf{Output:}} | ||
7 | |||
8 | \lstset{ | ||
9 | frame=tb, | ||
10 | numbers=left, | ||
11 | numberstyle=\tiny, | ||
12 | breaklines=true, | ||
13 | postbreak=\raisebox{0ex}[0ex][0ex]{\ensuremath{\color{red}\hookrightarrow\space}} | ||
14 | } | ||
15 | |||
16 | \DeclareMathOperator{\Hom}{Hom} | ||
17 | %\DeclareMathOperator{\P}{\frak{P}} | ||
18 | %\DeclareMathOperator{\exp}{exp} | ||
19 | %\DeclareMathOperator{\ln}{ln} | ||
20 | \newcommand{\N}{\ensuremath{\mathbb{N}}} | ||
@@ -14,7 +14,7 @@ pkgs.stdenv.mkDerivation rec { | |||
14 | with p; [ yesod yesod-bin pandoc monad-par persistent-sqlite | 14 | with p; [ yesod yesod-bin pandoc monad-par persistent-sqlite |
15 | ])) | 15 | ])) |
16 | (pkgs.texlive.combine { | 16 | (pkgs.texlive.combine { |
17 | inherit (pkgs.texlive) scheme-small libertine tipa cm-super context bussproofs mweights fontaxes backnaur enumitem varwidth beamer; | 17 | inherit (pkgs.texlive) scheme-small libertine tipa cm-super context bussproofs mweights fontaxes backnaur enumitem varwidth beamer ctablestack algorithms; |
18 | }) | 18 | }) |
19 | ]; | 19 | ]; |
20 | shellHook = '' | 20 | shellHook = '' |