-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathbraph2_dev.sty
More file actions
117 lines (98 loc) · 3.49 KB
/
braph2_dev.sty
File metadata and controls
117 lines (98 loc) · 3.49 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{braph2_dev}[2023/07/05 BRAPH 2 developer documentation style]
\author[The BRAPH~2 Developers]{The BRAPH~2 Developers}
%%
% new commands
\newcommand{\code}[1]{{\tt #1}} % inline code
\newcommand{\fn}[1]{{\tt #1}} % file name
\newcommand{\Coderef}[1]{Code~\ref{#1}}
\newcommand{\Codesref}[1]{Codes~\ref{#1}}
%%
%
\RequirePackage{graphicx}
% \setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\RequirePackage{bm} % bold math
\RequirePackage{amsmath} % extended mathematics
\RequirePackage{hyperref} % add hypertext capabilities
\hypersetup{colorlinks=true, linkcolor=blue, filecolor=magenta, urlcolor=cyan}
\usepackage{parskip}
\usepackage{float}
%\usepackage{booktabs} % book-quality tables
%\usepackage{units} % non-stacked fractions and better unit spacing
%\usepackage{multicol} % multiple column layout facilities
%\usepackage{lipsum} % filler text
%\usepackage{fancyvrb} % extended verbatim environments
% \fvset{fontsize=\normalsize}% default font size for fancy-verbatim environments
%%
% colors
\RequirePackage[usenames,dvipsnames]{xcolor}
\newcommand*\C[1]{\textcolor{green}{#1}} % internal comment
\newcommand*\E[1]{\textcolor{BurntOrange}{#1}} % exercise
\definecolor{backcolour}{rgb}{1,1,1}
\definecolor{codedark}{rgb}{.2,.2,1}
\definecolor{codelight}{rgb}{.7,.7,.7}
\definecolor{codegreen}{rgb}{0,.6,0}
\definecolor{codepurple}{rgb}{.58,0,.82}
\definecolor{highlight}{rgb}{.98,.97,.10}
%%
% code enviroment and commands
\RequirePackage[utf8]{inputenc}
\RequirePackage{listings}
\lstset{
literate={¡}{{\textexclamdown}}1
}
\lstdefinestyle{mystyle}{
language=Matlab,
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{codedark},
stringstyle=\color{codepurple},
basicstyle=\ttfamily\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=t,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
frame=lines, %single,
caption=\relax,
escapechar=¥,
moredelim=[is][\color{lightgray}]{¤}{¤},
}
\lstset{style=mystyle}
\renewcommand{\lstlistingname}{Code}
\newcommand*\G[1]{\color{codelight}{#1}}
\newcommand*\expand[1]{\color{codedark}{$\leftarrow$ \Coderef{#1}}}
\newcommand*\expands[1]{\color{codedark}{$\leftarrow$ \Codesref{#1}}}
%%
% circled notes
\usepackage{tikz}
\newcommand*\circled[1]{\tikz[baseline=(char.base)]{\node[shape=circle,draw,inner sep=2pt] (char) {#1};}}
\newcommand*\circlednote[2]{\marginnote{\circled{#1}#2}}
\newcommand*\twocirclednotes[3]{\marginnote{\circled{#1} and \circled{#2} #3}}
\newcommand*\threecirclednotes[4]{\marginnote{\circled{#1}, \circled{#2}, and \circled{#3} #4}}
\newcommand*\fourcirclednotes[5]{\marginnote{\circled{#1}, \circled{#2}, \circled{#3}, and \circled{#4} #5}}
\newcommand*\rangecirclednotes[3]{\marginnote{\circled{#1}---\circled{#2} #3}}
%%
% For graphics / images
\usepackage{graphicx}
\setkeys{Gin}{width=\linewidth,totalheight=\textheight,keepaspectratio}
\newcommand{\fig}[5]
{
\begin{#1}
#3
\caption[#4]{{\bf #4.} #5}
\label{#2}
\end{#1}
}
\newcommand{\Figref}[1]{Figure~\ref{#1}}
\newcommand{\Figsref}[1]{Figures~\ref{#1}}
\newcommand{\Eqref}[1]{Eq.~\eqref{#1}}
\newcommand{\Eqsref}[1]{Eqs.~\eqref{#1}}
% Colored boxes
\usepackage{tcolorbox}