-
Notifications
You must be signed in to change notification settings - Fork 0
/
commands.tex
49 lines (40 loc) · 1.12 KB
/
commands.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
% Change glossary color to black
\renewcommand*{\glstextformat}[1]{\textcolor{black}{#1}}
% inner product command
\newcommand{\innerprod}[2]{\langle #1, #2 \rangle}
% Prettier `C++`
\def\CC{{C\nolinebreak[4]\hspace{-.05em}\raisebox{.4ex}{\tiny\bf ++}}}
% Change Require and Ensure in algorithmic
\algrenewcommand\algorithmicrequire{\textbf{Input:}}
\algrenewcommand\algorithmicensure{\textbf{Output:}}
% Change algorithmic comment style
\newcommand{\LineComment}[1]{\texttt{ \# #1}}
% GS routines names
\newcommand{\cgs}[0]{\texttt{CGS} }
\newcommand{\cgsi}[0]{\texttt{CGS2} }
\newcommand{\mgs}[0]{\texttt{MGS} }
\newcommand{\bcgs}[0]{\texttt{BCGS} }
\newcommand{\bcgsi}[0]{\texttt{BCGS2} }
\newcommand{\bmgs}[0]{\texttt{BMGS} }
% Set color of \refeq
\newcommand*{\SavedEqref}{}
\let\SavedEqref\eqref
\renewcommand*{\eqref}[1]{%
\begingroup
\hypersetup{
linkcolor=blue,
linkbordercolor=blue,
}%
\SavedEqref{#1}%
\endgroup
}
% Set color of ref for algorithms
\newcommand*{\refalg}[1]{%
\begingroup
\hypersetup{
linkcolor=green,
linkbordercolor=green,
}%
(\ref{#1})%
\endgroup
}