forked from liuxinyu95/AlgoXY
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-en.tex
95 lines (81 loc) · 2.5 KB
/
common-en.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
94
95
%
% loading packages
%
\RequirePackage{ifpdf}
%
%
\ifpdf
\RequirePackage[pdftex,%
bookmarksnumbered,%
colorlinks,%
linkcolor=blue,%
hyperindex,%
plainpages=false,%
pdfstartview=FitH]{hyperref}
\else
\RequirePackage[dvipdfm,%
bookmarksnumbered,%
colorlinks,%
linkcolor=blue,%
hyperindex,%
plainpages=false,%
pdfstartview=FitH]{hyperref}
\fi
\usepackage{hyperref}
% other packages
%--------------------------------------------------------------------------
\usepackage{graphicx, color}
\usepackage{subfig}
\usepackage{amsmath, amsthm, amssymb} % for math
%
% for programming
%
\usepackage{verbatim}
\usepackage{listings}
%\usepackage{algorithmic} %old version; we can use algorithmicx instead
\usepackage{algorithm}
\usepackage[noend]{algpseudocode} %for pseudo code, include algorithmicsx automatically
\usepackage{makeidx} % for index support
\lstdefinelanguage{Smalltalk}{
morekeywords={self,super,true,false,nil,thisContext}, % This is overkill
morestring=[d]',
morecomment=[s]{"}{"},
alsoletter={\#:},
escapechar={!},
literate=
{BANG}{!}1
{UNDERSCORE}{\_}1
{\\st}{Smalltalk}9 % convenience -- in case \st occurs in code
% {'}{{\textquotesingle}}1 % replaced by upquote=true in \lstset
{_}{{$\leftarrow$}}1
{>>>}{{\sep}}1
{^}{{$\uparrow$}}1
{~}{{$\sim$}}1
{-}{{\sf -\hspace{-0.13em}-}}1 % the goal is to make - the same width as +
%{+}{\raisebox{0.08ex}{+}}1 % and to raise + off the baseline to match -
{-->}{{\quad$\longrightarrow$\quad}}3
, % Don't forget the comma at the end!
tabsize=2
}[keywords,comments,strings]
\lstloadlanguages{C++, Lisp, Haskell, Python, Smalltalk}
% ======================================================================
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
%
% mathematics
%
\newcommand{\be}{\begin{equation}}
\newcommand{\ee}{\end{equation}}
\newcommand{\bmat}[1]{\left( \begin{array}{#1} }
\newcommand{\emat}{\end{array} \right) }
\newcommand{\VEC}[1]{\mbox{\boldmath $#1$}}
% numbered equation array
\newcommand{\bea}{\begin{eqnarray}}
\newcommand{\eea}{\end{eqnarray}}
% equation array not numbered
\newcommand{\bean}{\begin{eqnarray*}}
\newcommand{\eean}{\end{eqnarray*}}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}