diff options
| author | mo khan <mo@mokhan.ca> | 2016-02-08 10:28:14 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-02-08 10:28:14 -0700 |
| commit | d1d2732afd598135850f932449516c48c59a3673 (patch) | |
| tree | b7f3ab93457846a5de9fcafc3abea3d06c0d314b /report | |
| parent | 8af61bdcef2a16724d125723a5297f9ffef7ed76 (diff) | |
add inline code listing.
Diffstat (limited to 'report')
| -rw-r--r-- | report/template.tex | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/report/template.tex b/report/template.tex index 2aa33d8..6d1f129 100644 --- a/report/template.tex +++ b/report/template.tex @@ -1,12 +1,29 @@ \documentclass{article} \usepackage{amsmath} \usepackage{booktabs} +\usepackage{color} \usepackage{graphicx} +\usepackage{listings} \usepackage{pgfplotstable} \usepackage{pgfplots} \usepackage{siunitx} \usepackage{tikz} +\lstset{ + language=Perl, + basicstyle=\small\sffamily, + numbers=left, + numberstyle=\tiny, + frame=tb, + tabsize=4, + columns=fixed, + showstringspaces=false, + showtabs=false, + keepspaces, + commentstyle=\color{red}, + keywordstyle=\color{blue} +} + \pgfplotsset{compat=newest} % place the legend below the plot \usepgfplotslibrary{units} % display units nicely @@ -152,6 +169,12 @@ I'm referring to footnote~\ref{myfootnote}. \end{figure} \newpage +\begin{lstlisting} +#!/usr/bin/perl +print S(@ARGV);sub S{$r=(@_[0]%4==0&&@_[0]%100!=0)||@_[0]%400=0;} +\end{lstlisting} + +\newpage \begin{appendix} \listoffigures \listoftables |
