-
Notifications
You must be signed in to change notification settings - Fork 1
/
macros.tex
172 lines (154 loc) · 4.35 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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
\newcommand{\msg}[2]{%
\ifthenelse
{\isempty{#1}}
{\ensuremath{(#2)}}
{\ifthenelse
{\isempty{#2}}
{\ensuremath{(\mathsf{#1})}}
{\ensuremath{(\mathsf{#1}, #2)}}
}
}
%----- Comments ----------------------------------------------------------------
\RequirePackage{totcount}
\RequirePackage{color}
\RequirePackage[disable]{todonotes}
\newtotcounter{notecount}
\newcommand{\notewarning}{%
\ifnum\totvalue{notecount}>0%
\vspace{1ex}
\begin{center}
\begin{tikzpicture}[baseline=(A.south)]
\node (A) [] at (0,0){};
\node [rounded corners=1pt,rectangle, draw=red, fill=red!20,text=black](B) at (0.1ex,0ex){
\Large \raggedright {\bf Warning:} There are still some notes left!
};
\end{tikzpicture}
\end{center}
\vspace{1ex}
\fi
}
\makeatletter
\def\myaddcontentsline#1#2#3{%
\addtocontents{#1}{\protect\contentsline{#2}{#3}{Section \thesubsection\ at p. \thepage}{}}}
\makeatother
\definecolor{lightgreen}{rgb}{0.86, 0.93, 0.78}
\definecolor{bordergreen}{rgb}{0.55, 0.76, 0.74}
\definecolor{lightblue}{rgb}{0.70, 0.90, 0.99}
\definecolor{borderblue}{rgb}{0.01, 0.66, 0.96}
\definecolor{lightamber}{rgb}{1, 0.93, 0.70}
\definecolor{borderamber}{rgb}{1, 0.76, 0.03}
\definecolor{lightcolor4}{rgb}{ 0.93, 0.70, 1}
\definecolor{bordercolor4}{rgb}{0.76, 0.03, 1}
% \newcommand{\note}[1]{\stepcounter{notecount}\todo[inline,bordercolor=bordergreen,linecolor=bordergreen,color=lightgreen]{ #1}{}}
% \newcommand{\snote}[1]{\stepcounter{notecount}\todo[bordercolor=bordergreen,linecolor=bordergreen,color=lightgreen,fancyline]{ #1}{}}
\newcommand{\mnote}[1]{
\stepcounter{notecount}
\todo[
inline,
caption={minipage-note},
bordercolor=bordergreen,
linecolor=bordergreen,
color=lightgreen,
fancyline
]
{
\begin{minipage}{0.9\textwidth}
#1
\end{minipage}
}
{}
}
\def\showauthnotes{1}
\ifthenelse{\showauthnotes=1}
{
\newcommand{\authnote}[2]{\mnote{\textbf{#1:} #2}}
%\newcommand{\authnote}[2]{{ \footnotesize \bf{[#1: #2]~}}}
%\newcommand{\authnote}[2]{{ \tt {[#1: #2]~}}}
}
\newcommand{\dionyziz}[1]{\authnote{Dionysis}{#1}}
\newcommand{\dimitris}[1]{\authnote{Dimitris}{#1}}
\newcommand{\christos}[1]{\authnote{Christos}{#1}}
\newcommand{\aggelos}[1]{\authnote{Aggelos}{#1}}
\newcommand{\TODO}[1]{
\if\relax\detokenize{#1}\relax
\textcolor{red}{TODO}
\else
\textcolor{red}{ {#1}}
\fi
}
%---------------------------------------------------------------------
\newcommand{\footTODO}[1]{\footnote{\TODO{#1}}}
\newcommand{\ignore}[1]{}
% the \Bot symbol from https://tex.stackexchange.com/questions/297971/bot-like-symbol-with-two-horizontal-lines
\makeatletter
\DeclareRobustCommand{\Bot}{%
\mathord{\vphantom{\bot}\mathpalette\mich@Bot\relax}%
}
\newcommand{\mich@Bot}[2]{%
\ooalign{%
$\m@th#1\bot$\cr
\clipbox*{0pt 0pt {\width} {.5\height}}{\raisebox{.2\height}{$\m@th#1\bot$}}\cr
}%
}
\makeatother
\newcommand{\ec}{\textsc{ec}}
\newcommand{\bgr}{\textsc{bgr}}
\newcommand{\thr}{\textsc{thr}}
\newcommand{\br}{\textsc{br}}
\newcommand{\tp}{\textsc{tp}}
\newcommand{\ecr}{\textsc{ecr}}
\newcommand{\hr}{\textsc{hr}}
\newcommand{\ir}{\textsc{ir}}
\newcommand{\ic}{\textsc{ic}}
\newcommand{\eg}{e.g. }
\newcommand{\ie}{i.e., }
\newcommand{\placefigure}[4]{
\iflncs
\begin{figure}[H]
\caption{#3}
\centering
\includegraphics[width=#4 \columnwidth,keepaspectratio]{figures/#1}
\label{#2}
\end{figure}
\else
\begin{figure}
\caption{#3}
\centering
\includegraphics[width=#4 \columnwidth,keepaspectratio]{figures/#1}
\label{#2}
\end{figure}
\fi
}
\newcommand{\placesubfigure}[5]{
\iflncs
\centering
\subcaptionbox[#3]{%
\centering
#3%
\hspace{5cm} \label{#2}%
}
[%
0.40\textwidth % width of caption
]%
{%
\hspace*{-2.3em}
\includegraphics[width=0.45\textwidth]%
{figures/#1}%
}%
\hspace{0.05\textwidth}
\else
\begin{subfigure}[b]{#5\linewidth}
\centering
\includegraphics[width=#4\columnwidth,keepaspectratio]{figures/#1}
\captionsetup{labelformat=simple, justification=centering}
\caption{#3}
\label{#2}
\vspace{4ex}
\end{subfigure}%%
\fi
}
\newcommand{\hash}{\mathsf{H}}
\iflncs\else
\renewcommand\thesubfigure{(\alph{subfigure})}
\renewcommand\qedsymbol{$\blacksquare$}
\fi