-
Notifications
You must be signed in to change notification settings - Fork 5
/
sample.tex
44 lines (34 loc) · 1.04 KB
/
sample.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
\documentclass{article}
% packages
\usepackage{color}
\usepackage{listings}
\definecolor{codeblue}{rgb}{0.29296875, 0.51953125, 0.68359375}
\definecolor{codegreen}{rgb}{0.47265625, 0.62890625, 0.40234375}
\definecolor{codegray}{rgb}{0.95703125, 0.95703125, 0.95703125}
\definecolor{codecrimson}{rgb}{0.87109375,0.3984375,0.3984375}
\lstset{frame=tb,
backgroundcolor=\color{codegray},
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\ttfamily},
numbers=left,
numberstyle=\tiny\color{gray},
keywordstyle=\color{codeblue},
commentstyle=\color{codegreen},
stringstyle=\color{codecrimson},
breaklines=true,
breakatwhitespace=true,
tabsize=4,
frame=tlbr,framesep=4pt,framerule=0pt
}
\input{stata-lstlistings.tex}
\begin{document}
\noindent Here's some Stata code, with syntax highlighted using the \texttt{listings} package:\\
\begin{lstlisting}[language=Stata, numbers=none]
. display binomialp(4, 2, 1/6)
.11574074
. regress exp age ownrent income incomesq
\end{lstlisting}
\end{document}