diff options
| author | mo khan <mo@mokhan.ca> | 2016-02-08 11:24:22 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2016-02-08 11:24:22 -0700 |
| commit | b7c2b8475afc2d44e63995ddeb3365f9dae4de19 (patch) | |
| tree | 0b4736c02920c90c015b9ae69bc2b0af1c1010b5 /report | |
| parent | d1d2732afd598135850f932449516c48c59a3673 (diff) | |
add external code listings.
Diffstat (limited to 'report')
| -rwxr-xr-x | report/script.pl | 2 | ||||
| -rw-r--r-- | report/script.rb | 2 | ||||
| -rw-r--r-- | report/script.sh | 3 | ||||
| -rw-r--r-- | report/template.tex | 12 |
4 files changed, 15 insertions, 4 deletions
diff --git a/report/script.pl b/report/script.pl new file mode 100755 index 0000000..6f2b764 --- /dev/null +++ b/report/script.pl @@ -0,0 +1,2 @@ +#!/usr/bin/perl +print S(@ARGV);sub S{$r=(@_[0]%4==0&&@_[0]%100!=0)||@_[0]%400=0;} diff --git a/report/script.rb b/report/script.rb new file mode 100644 index 0000000..cf24b1d --- /dev/null +++ b/report/script.rb @@ -0,0 +1,2 @@ +#!/usr/bin/env ruby +puts "Hello World" diff --git a/report/script.sh b/report/script.sh new file mode 100644 index 0000000..8997733 --- /dev/null +++ b/report/script.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +echo "hello world" diff --git a/report/template.tex b/report/template.tex index 6d1f129..d2a730c 100644 --- a/report/template.tex +++ b/report/template.tex @@ -169,10 +169,14 @@ 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} +Perl code +\lstinputlisting[language=Perl]{script.pl} + +Ruby code +\lstinputlisting[language=Ruby]{script.rb} + +Bash script +\lstinputlisting[language=Bash]{script.sh} \newpage \begin{appendix} |
