-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtutorial_preamble.tex
94 lines (87 loc) · 3.35 KB
/
tutorial_preamble.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
\usepackage{fancyvrb}
\usepackage{color, colortbl}
\usepackage{listings}
\usepackage{url}
\usepackage{array}
\usepackage{calc}
\usepackage{ctable}
\usepackage{amsmath}
\usepackage{cite}
\usepackage{graphicx}
\usepackage{listings}
\usepackage{xspace}
\usepackage{hyperref}
\usepackage{subfigure}
\usepackage{multicol}
\definecolor{lightgray}{rgb}{0.9,0.9,0.9}
\lstset{ %
language=C++, % choose the language of the code
basicstyle=\tiny, % the size of the fonts that are used for the code
%numbers=left, % where to put the line-numbers
numbers=none, % where to put the line-numbers
numberstyle=\scriptsize, % the size of the fonts that are used for the line-numbers
stepnumber=1, % the step between two line-numbers. If it's 1 each line will be numbered
numbersep=15pt, % how far the line-numbers are from the code
backgroundcolor=\color{lightgray}, % choose the background color. You must add \usepackage{color}
%backgroundcolor=none, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=single, % adds a frame around the code
%frame=none, % adds a frame around the code
tabsize=2, % sets default tabsize to 2 spaces
%captionpos=b, % sets the caption-position to bottom
captionpos=n,
%basicstyle=\small,
%basicstyle=\small\sffamily,
basicstyle=\sffamily\small,
%basicstyle=\ttfamily\small,
breaklines=true, % sets automatic line breaking
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
columns=fullflexible,
title=\lstname, % show the filename of files included with \lstinputlisting; also try caption instead of title
escapeinside={\%*}{*)}, % if you want to add a comment within your code
morekeywords={chare,mainchare,module,mainmodule,entry,readonly,array,serial,for,when,if,then,else,overlap,while,forall,threaded,sync,message},
aboveskip=2pt,
belowskip=2pt,
lineskip=0pt,
xleftmargin=1em,
xrightmargin=1em,
%xleftmargin=10pt
abovecaptionskip=0pt,
belowcaptionskip=0pt,
}
\newcommand{\code}[1]{\colorbox{lightgray}{\texttt{#1}}}
\newcommand{\transition}[1]{\begin{frame}[plain]\begin{center}\LARGE #1\end{center}\end{frame}}
\newcommand{\comment}[1]{ }
\DefineVerbatimEnvironment{codeverb}{Verbatim}{fontsize=\small}
\hypersetup{
colorlinks,%
citecolor=black,%
filecolor=black,%
linkcolor=black,%
urlcolor=magenta
}
\usefonttheme{professionalfonts}
\usetheme{Boadilla}
%\usetheme{Warsaw}
\usecolortheme{beaver}
%\AtBeginSubsection[]
%{
% \begin{frame}{Outline}
% \tableofcontents[currentsection,currentsubsection]
% \end{frame}
%}
\AtBeginSection[]{
% \setbeamercolor{section in toc shaded}{use=structure,fg=structure.fg}
% \setbeamercolor{section in toc}{fg=mycolor}
% \setbeamercolor{subsection in toc shaded}{fg=black}
% \setbeamercolor{subsection in toc}{fg=mycolor}
\frame<beamer>{\begin{multicols}{2}
\frametitle{Outline}
\setcounter{tocdepth}{2}
% \tableofcontents[currentsection,subsections]
\tableofcontents[currentsection,currentsubsection]
\end{multicols}
}
}