2015-06-25 08:18:01 +00:00
|
|
|
\usepackage{listings}%
|
|
|
|
\usepackage{courier}%
|
|
|
|
|
2016-05-17 08:32:51 +00:00
|
|
|
\newcommand{\lstsetdefault}
|
|
|
|
{\lstset
|
|
|
|
{
|
2017-01-05 16:29:23 +00:00
|
|
|
aboveskip=\baselineskip,
|
|
|
|
belowskip=\baselineskip,
|
2016-05-17 08:32:51 +00:00
|
|
|
language=bash,
|
|
|
|
tabsize=4,
|
|
|
|
frame=single,
|
2017-01-05 16:29:23 +00:00
|
|
|
%basicstyle=\ttfamily\small,
|
|
|
|
basicstyle=\ttfamily\scriptsize,
|
2016-05-17 08:32:51 +00:00
|
|
|
commentstyle=\color{black},
|
|
|
|
keywordstyle=\color{black}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-25 08:18:01 +00:00
|
|
|
\newcommand{\lstsetc}
|
|
|
|
{\lstset
|
|
|
|
{
|
2017-01-05 16:29:23 +00:00
|
|
|
aboveskip=\baselineskip,
|
|
|
|
belowskip=\baselineskip,
|
2015-06-25 08:18:01 +00:00
|
|
|
language=[ANSI]C,
|
|
|
|
numbers=left,
|
|
|
|
tabsize=4,
|
|
|
|
frame=single,
|
|
|
|
basicstyle=\ttfamily\small,
|
|
|
|
commentstyle=\color{green},
|
|
|
|
keywordstyle=\color{blue}\textbf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-03 13:35:47 +00:00
|
|
|
\newcommand{\lstsetmake}
|
|
|
|
{\lstset
|
|
|
|
{
|
2017-01-05 16:29:23 +00:00
|
|
|
aboveskip=\baselineskip,
|
|
|
|
belowskip=\baselineskip,
|
2015-12-03 13:35:47 +00:00
|
|
|
language=make,
|
|
|
|
numbers=left,
|
|
|
|
tabsize=4,
|
|
|
|
frame=single,
|
|
|
|
basicstyle=\ttfamily\small,
|
|
|
|
commentstyle=\color{green},
|
|
|
|
keywordstyle=\color{blue}\textbf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-02-18 08:02:00 +00:00
|
|
|
\newcommand{\lstsetbash}
|
|
|
|
{\lstset
|
|
|
|
{
|
2017-01-05 16:29:23 +00:00
|
|
|
aboveskip=\baselineskip,
|
|
|
|
belowskip=\baselineskip,
|
2016-02-18 08:02:00 +00:00
|
|
|
language=bash,
|
|
|
|
tabsize=4,
|
|
|
|
frame=single,
|
|
|
|
basicstyle=\ttfamily\small,
|
|
|
|
commentstyle=\color{green},
|
|
|
|
keywordstyle=\color{blue}\textbf
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-25 08:18:01 +00:00
|
|
|
\lstloadlanguages{[ISO]C++, [ANSI]C, bash, make, sh, Gnuplot}
|
|
|
|
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
% example usage:
|
|
|
|
%
|
|
|
|
% \input{config/sourcelst.tex}
|
|
|
|
% ...
|
|
|
|
% \lstsetc
|
|
|
|
% \begin{lstlisting}
|
|
|
|
% #include <stdio.h>
|
|
|
|
%
|
|
|
|
% int main(int argc, char *argv[])
|
|
|
|
% {
|
|
|
|
% printf("Hello World!\n");
|
|
|
|
% return 0;
|
|
|
|
% }
|
|
|
|
% \end{lstlisting}
|
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
|
|
|
|