-
Notifications
You must be signed in to change notification settings - Fork 3
/
macros.tex
116 lines (89 loc) · 3.04 KB
/
macros.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
%%% macros.tex
%%% Import packages, define utility commands and define macros
%%% Version 1.2.0
%%%----------
%%% Imports
%%% Text Formatting
\usepackage{xspace}
\usepackage{xcolor}
\usepackage{graphicx}
\usepackage[normalem]{ulem} % normalem do not replace \emph to underline
\usepackage{amsmath}
\usepackage{enumitem}
%%% Reference, Citation and Link
\usepackage[linkcolor=black,citecolor=black,anchorcolor=black,filecolor=black,menucolor=black,runcolor=black,urlcolor=black,hidelinks]{hyperref}
%\usepackage{url}
\usepackage{breakurl}
%\usepackage{cite}
%%% Tables
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{makecell}
\usepackage{ragged2e}
%%% Plots
\usepackage{caption}
\usepackage{subcaption}
%\usepackage{subfloat}
%\usepackage{wrapfig}
% Code
\usepackage{listings}
% Tikz Figs
\usepackage{tikz}
%\usepackage{pgf-umlsd} % for flow diagram
\usetikzlibrary{calc}
\usetikzlibrary{shapes.geometric}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{positioning}
%\usetikzlibrary{shapes}
%%% Miscellaneous
%\usepackage{flushend} % balance the end of double column document
\usepackage{datetime} % for getting current date and time
%%%----------
%%% Utility Commands
\newcommand{\XSpace}[1]{}
\newcommand{\XComment}[1]{}
\newcommand{\Fix}[1]{\textcolor{red}{#1}}
\newcommand{\EditAdd}[1]{\textcolor{green}{[#1]}}
\newcommand{\EditRm}[1]{\textcolor{red}{[\sout{#1}]}}
\newcommand{\EditMod}[2]{\textcolor{red}{[\sout{#1}]}\textcolor{green}{[#2]}}
\newcommand{\DefMacro}[2]{\expandafter\newcommand\csname rmk-#1\endcsname{#2}}
\newcommand{\UseMacro}[1]{\csname rmk-#1\endcsname}
\newcommand{\MyPara}[1]{\noindent\textbf{#1}.}
\newcommand{\MyParaOnly}[1]{\noindent\textbf{#1}}
\newcommand{\reducedstrut}{\vrule width 0pt height .9\ht\strutbox depth .9\dp\strutbox\relax}
\newcommand{\InputWithSpace}[1]{\bgroup\def\arraystretch{1.1}\input{#1}\egroup}
\newcommand{\Code}[1]{{\ifmmode{\mathtt{#1}}\else$\mathtt{#1}$\fi}}
\newcommand{\CodeIn}[1]{{\ifmmode{\mathtt{#1}}\else$\mathtt{#1}$\fi}}
\newcommand{\ColorBack}[1]{%
\begingroup
\setlength{\fboxsep}{0pt}%
\colorbox{purple!20}{\reducedstrut#1\/}%
\endgroup
}
% for table headers
\newcommand{\specialcell}[2][c]{%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}
\newcolumntype{R}[1]{>{\RaggedLeft\arraybackslash}p{#1}}
\newcolumntype{L}[1]{>{\RaggedRight\arraybackslash}p{#1}}
% for including revision info in the document
\newcommand{\RevisionInfo}{\Fix{Time: \today{} at \currenttime{.}}}
\input{defs-logic} % for logic symbols
\input{defs-code} % for code listings
%%%----------
%%% Macros
%%% Text
%\newcommand{\Tool}{\textsc{Tool}\xspace}
\newcommand{\Title}{Title}
%\newcommand{\lowercase}{lower case\xspace}
%\newcommand{\Firstcap}{First cap\xspace}
%\newcommand{\CamelCase}{Camel Case\xspace}
%%% Code
%\newcommand{\aVar}{\CodeIn{var}\xspace}
%%% Tables
% Captions
%\newcommand{\TableCaptionXXX}{Lorem Ipsum Dolor Sit Amet, Consectetur Adipiscing Elit.\label{fig:table:xxx}}
% Headers
%\newcommand{\TableHeadXXX}{Yyy\xspace}
%%% Numbers
%\input{tables/numbers-xxx}
%\newcommand{\NumXXX}{42\xspace}