-
Notifications
You must be signed in to change notification settings - Fork 23
/
preamble_booklet.tex
233 lines (189 loc) · 6.63 KB
/
preamble_booklet.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
%======================================================
% This file is part of
% "AMCOS_booklet"
% Version 1.1 (04/07/2019)
% A LaTeX template for conference books of abstracts
%
% This template is available at:
% https://github.com/maximelucas/AMCOS_booklet
%
% License: GNU General Public License v3.0
%
% Authors:
% Maxime Lucas ([email protected])
% Pau Clusella
%=======================================================
%
% COLORS
%
\definecolor{myorange}{RGB}{255,117,40}
\definecolor{mygray}{RGB}{164, 168, 172}
\definecolor{mywhite}{RGB}{235, 238, 231}
\definecolor{myblue}{RGB}{52, 115, 116}
\newcommand{\primarycolor}{myblue}
\newcommand{\secondarycolor}{mywhite}
\newcommand{\ternarycolor}{mywhite}
%
% BOOKLET VERSIONS
%
% If compilation is done with 'compile.sh', both versions (online and printed) are automatically compiled
% If compilation is done from editor, choose which version to compile below
\makeatletter
\@ifundefined{ifOnline}{% % check if already defined from the command line, if not define \ifOnline
\expandafter\newif\csname ifOnline\endcsname
\Onlinefalse %set to \Onlinefalse/\Onlinetrue for printed/online version
}{}
\makeatother
% define \type to input the right version of the abstracts
\ifOnline
\newcommand{\type}{o}
\else
\newcommand{\type}{p}
\fi % end if
%
% ABSTRACT ENVIRONMENTS
%
%----------------------------------------
% online abstract environment
%----------------------------------------
\newenvironment{abstract_online}[4] %{title}{author}{affiliation}{type}
{\filbreak %avoid page break
{\large \bfseries #1}
{\bfseries \itshape #2} \hfill {#3}
\textcolor{mygray}{#4}
}
{}
%----------------------------------------
% talk abstract environment (printed)
%----------------------------------------
\newenvironment{abstract}[4] %{title}{author}{affiliation}
{\filbreak %avoid page break
{\large \bfseries #1}
{\bfseries \itshape #2,} \textcolor{mygray}{#3} \hfill {#4}
}
{}
%----------------------------------------
% poster abstract environment (printed)
%----------------------------------------
\newcommand{\poster}[3] %{title}{author}{affiliation}
{\filbreak %avoid page break
{\bfseries \large #1} \\
\tab #2, \textit{#3}
}
{}
%----------------------------------------
% tags for talk type (colored circle in abstracts)
%----------------------------------------
\newcommand{\KLtag}{\tikz[baseline={([yshift=-.8ex]current bounding box.center)}] \node[circle, inner sep=2pt, minimum size=0.5em, color=black, fill=\KLcolor]{\small \bfseries KL};} %colored circle with tag
\newcommand{\IStag}{\tikz[baseline={([yshift=-.8ex]current bounding box.center)}] \node[circle, inner sep=2pt, minimum size=0.5em, color=black, fill=\IScolor]{\small \bfseries IS};} %colored circle with tag
\newcommand{\CTtag}{\tikz[baseline={([yshift=-.8ex]current bounding box.center)}] \node[circle, inner sep=2pt, minimum size=0.5em, color=black, fill=\CTcolor]{\small \bfseries CT};} %colored circle with tag
\newcommand{\ITtag}{\tikz[baseline={([yshift=-.8ex]current bounding box.center)}] \node[circle, inner sep=2pt, minimum size=0.5em, color=black, fill=\ITcolor]{\small \bfseries IT};} %colored circle with tag
%
% PAGE LAYOUT DEFINITIONS
%
\usepackage{etoolbox}
%------------------------------------------------------
% page style: vertical line on the side of each page
%------------------------------------------------------
\usepackage[scale=1,angle=0,opacity=1]{background}
\backgroundsetup{contents={}}
\AddEverypageHook{%
\ifthenelse{%
\isodd{\thepage} \AND \thepage>1 % if odd page but not front page
}{%
\backgroundsetup{
color=\secondarycolor,
position=current page.south east,%
nodeanchor=south east,
contents={\rule{10pt}{0.66\paperheight}}
}
}{%
% nothing
}
%
\ifthenelse{%
\NOT \isodd{\thepage} \AND \NOT \thepage=44% if even page
}{%
\backgroundsetup{
color=\secondarycolor,
position=current page.south west,%
nodeanchor=south west,
contents={\rule{10pt}{0.66\paperheight}}
}
}{%
% nothing
}
\BgMaterial}
%---------------------------------------------------
% chapter heading style
%---------------------------------------------------
\newdimen\mybarpadding
\mybarpadding=1.5em\relax %padding between gcolored bar and chapter name
\RedeclareSectionCommand[%
,afterskip=4em plus 1pt minus 1pt%
,beforeskip=-1pt%1.2em plus 1pt minus 1pt%
,level=0%
,toclevel=0%
]{chapter}%
\setkomafont{chapter}{\normalfont\normalsize\bfseries\Huge} % koma-script-specific command
\newcommand*{\mynumberedtest}[1]{% to test whether there is a number
\if\relax\detokenize{#1}\relax%
\else%
#1%
\fi}
%-------------------------------------------------chapter style definition
\renewcommand{\chapterlinesformat}[3]{%
\ifthispageodd{%
\hfill%
\raisebox{-0.2em}{%
\makebox[0pt][r]{\textcolor{\primarycolor}{\rule{\paperwidth}{1em}}}%
}%
\hspace{\mybarpadding}%
% \mynumberedtest{#2}
\mbox{#3}%
}{%
% \hbox{%
% \mynumberedtest{#2}
\mbox{#3}%
\hspace{\mybarpadding}%
\raisebox{-0.2em}{%
\makebox[0pt][l]{\textcolor{\primarycolor}{\rule{\paperwidth}{1em}}}%
}%
% }%
}%
}
\makeatother
%---------------------------------------------------------
% TIMETABLE COLORS AND STYLES
% text and backgroud colors
\newcommand{\tbg}{gray} % background
\newcommand{\tfg}{white}
\newcommand{\tbc}{gray!25}
% talk types colors
\newcommand{\IScolor}{myblue!65} % invited speaker
\newcommand{\CTcolor}{white} % contributed talk
\newcommand{\KLcolor}{myorange!45} % keynote lecture
\newcommand{\ITcolor}{yellow!25} %
% row types
\newcommand{\tablebreak}[2]{% {time span}{break name}
\rowcolor{\tbc} #1 & \multicolumn{4}{c|}{\bfseries #2} \\ \hline }
\newcommand{\eventtype}[2]{% {time span}{event name}
#1& \multicolumn{4}{c|}{\cellcolor{\tbg}\color{\tfg}\bfseries #2} \\ \hline }
% column spacing and position
\newcolumntype{L}[1]{%
>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{%
>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{%
>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
%\newcommand{\mytable}{|C{0.15\linewidth}| C{0.05\linewidth}| C{0.25\linewidth} C{0.1\linewidth} C{0.5\linewidth}|}
\newcommand{\IS}[5]{% {time span}{name}{University}{City, Country}{title}
#1 &\cellcolor{\IScolor}IS&{\bfseries#2}\newline #4& \\ \hline}
\newcommand{\CT}[5]{%
#1 &\cellcolor{\CTcolor}CT&{\bfseries#2}\newline #4& \\ \hline}
\newcommand{\KL}[5]{%
#1 &\cellcolor{\KLcolor}KL&{\bfseries#2}\newline #4& \\ \hline}
\newcommand{\IT}[5]{%
#1 &\cellcolor{\ITcolor}IT&{\bfseries#2}\newline #4& \\ \hline}
\newcommand{\tutorial}[5]{%
#1 && {\bfseries#2}\newline #4 & \\ \hline}