diff --git a/Makefile b/Makefile index 1a5e3b7..aec60f5 100644 --- a/Makefile +++ b/Makefile @@ -42,6 +42,7 @@ pdf: markdown # Then symlink it: ln -s /path/to/pdflatex /usr/local/bin pandoc -s $(filename).md -o $(filename).pdf \ --title-prefix $(title) \ + --listings -H listings-setup.tex \ --template=template.tex \ --normalize \ --smart \ diff --git a/listings-setup.tex b/listings-setup.tex new file mode 100644 index 0000000..0236f1b --- /dev/null +++ b/listings-setup.tex @@ -0,0 +1,25 @@ +% Contents of listings-setup.tex +\usepackage{xcolor} + +\lstset{ + basicstyle=\ttfamily, + numbers=left, + keywordstyle=\color[rgb]{0.13,0.29,0.53}\bfseries, + stringstyle=\color[rgb]{0.31,0.60,0.02}, + commentstyle=\color[rgb]{0.56,0.35,0.01}\itshape, + numberstyle=\footnotesize, + stepnumber=1, + numbersep=5pt, + backgroundcolor=\color[RGB]{248,248,248}, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2, + captionpos=b, + breaklines=true, + breakatwhitespace=true, + breakautoindent=true, + escapeinside={\%*}{*)}, + linewidth=\textwidth, + basewidth=0.5em, +} \ No newline at end of file diff --git a/style.css b/style.css index 3c9be49..c5f392e 100644 --- a/style.css +++ b/style.css @@ -130,7 +130,7 @@ pre { line-height: 16px; font-size: 11px; border: 1px solid #d9d9d9; - white-space: pre-wrap; + white-space: pre-line; word-wrap: break-word; } @@ -139,8 +139,10 @@ pre code { color: #737373; font-size: 11px; padding: 0; + white-space: pre-wrap; } + figure img { display: block; margin: 0 auto;