This repository was archived by the owner on Jan 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconferencebooklet.cls
256 lines (198 loc) · 10.4 KB
/
conferencebooklet.cls
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Conference Booklet
% Structural Definitions
% Version 1.0 (24/11/2019)
%
% This template originates from:
% http://www.LaTeXTemplates.com
%
% Original author:
% Maxime Lucas ([email protected])
% Pau Clusella
% Modifications for LaTeX Templates by Vel ([email protected])
%
% License:
% GNU General Public License v3.0
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%----------------------------------------------------------------------------------------
% CLASS CONFIGURATION
%----------------------------------------------------------------------------------------
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{conferencebooklet}[2019/12/22 LaTeX Templates Conference Booklet Class v1.0]
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{scrbook}} % Pass through any options to the base class
\ProcessOptions\relax % Process given options
\LoadClass{scrbook} % Load the base class
%----------------------------------------------------------------------------------------
% REQUIRED PACKAGES AND MISC CONFIGURATIONS
%----------------------------------------------------------------------------------------
\usepackage{makecell}
\usepackage{graphicx} % Required for including images
\setcounter{secnumdepth}{-2} % Remove all section numbering
\usepackage{multicol} % Allows table cells to span multiple columns
\usepackage{longtable} % Allows the creation of tables that automatically wrap to the next page
\usepackage{booktabs}
\pagestyle{plain} % Use the plain page style for all headers and footers (only a page number)
\usepackage{scrhack} % Fixes compatibility issues between KOMA-Script and other packages
\usepackage{lastpage} % Required to determine the total number of pages
\usepackage{multirow}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage[hang]{footmisc}
\setlength\footnotemargin{6pt}
%----------------------------------------------------------------------------------------
% MARGINS
%----------------------------------------------------------------------------------------
\usepackage[
top=1.4cm, % Top margin
bottom=1.5cm, % Bottom margin
inner=2cm, % Inner margin
outer=2cm, % Outer margin
footskip=0.4cm, % Space from the bottom margin to the baseline of the footer
headsep=0.8cm, % Space from the top margin to the baseline of the header
headheight=0.8cm, % Height of the header
%showframe % Uncomment to show the frames around the margins for debugging purposes
]{geometry}
%----------------------------------------------------------------------------------------
% FONTS & TYPOGRAPHY
%----------------------------------------------------------------------------------------
\usepackage[utf8]{inputenc} % Required for inputting international characters
\usepackage[T1]{fontenc} % Output font encoding for international characters
\usepackage[sfdefault, lf]{carlito} % Use the Carlito family of sans-serif fonts with lining figures
\usepackage{microtype} % Improve typography
\usepackage{amsfonts}
%----------------------------------------------------------------------------------------
% COLOURS
%----------------------------------------------------------------------------------------
\usepackage[table]{xcolor} % Required for defining and using custom colours
\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}
% Table colours
\newcommand{\tbg}{gray} % Event background
\newcommand{\tfg}{white} % Event foreground (text)
\newcommand{\tbc}{gray!25} % Break background
% Talk types colours
\newcommand{\Spcolor}{myblue!65} % Invited speaker
\newcommand{\Leccolor}{white} % Contributed talk
\newcommand{\Ccolor}{myorange!45} % Keynote lecture
\newcommand{\ITcolor}{yellow!25} % Invited talk
%----------------------------------------------------------------------------------------
% LINKS
%----------------------------------------------------------------------------------------
\usepackage{hyperref} % Required for links
\hypersetup{
colorlinks=false,
%urlcolor=\primarycolor, % Colour for \url and \href links
%linkcolor=\primarycolor, % Colour for \nameref links
hidelinks, % Hide the default boxes around links
}
%----------------------------------------------------------------------------------------
% TABLE DEFINITIONS
%----------------------------------------------------------------------------------------
\usepackage{array} % Required for manipulating table columns
\newcommand{\tablebreak}[3]{\rowcolor{\tbc} #1 & \multicolumn{2}{l|}{\qquad \bfseries #2} \\ \hline } % Timetable conference break row
\newcommand{\eventtype}[2]{#1 & \multicolumn{3}{c|}{\cellcolor{\tbc}\bfseries #2} \\ \hline } % Timetable conference event row
\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % Define a new left-aligned (no justification) column type
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % Define a new centred column type
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}} % Define a new right-aligned column type
\newcommand{\Sp}[4]{#1 & \cellcolor{\Spcolor}S & {\bfseries#2} & & #3 \\ } % Invited speaker row
\newcommand{\Lec}[4]{#1 & \cellcolor{\Leccolor}L & {\bfseries#2}\newline #3 & & #4 \\ \hline} % Contributed talk row
\newcommand{\C}[4]{#1 & \cellcolor{\Ccolor}C & {\bfseries#2} & & #3 \\ } % Keynote lecture row
\newcommand{\IT}[4]{#1 & \cellcolor{\ITcolor}IT & {\bfseries#2}\newline #3 & & #4 \\ \hline} % Invited talk row
\newcommand{\tutorial}[4]{#1 & & {\bfseries#2}\newline #3 & & #4 \\ \hline} % Tutorial row
%----------------------------------------------------------------------------------------
% CHAPTER STYLING
%----------------------------------------------------------------------------------------
\newdimen\mybarpadding
\mybarpadding=1.5em\relax % Horizontal padding between the coloured bar and chapter name
\RedeclareSectionCommand[% Adjust the spacing around the \chapter command
afterskip=4em plus 1pt minus 1pt,% Vertical whitespace under chapters
beforeskip=-1pt, % Vertical whitespace before chapters
level=0,% Chapters are the top level command
toclevel=0,% Chapters are the top level command
]{chapter}
\setkomafont{chapter}{\normalfont\normalsize\bfseries\Huge} % Chapter font style
\RedeclareSectionCommand[% Adjust the spacing around the \section command
afterskip=6pt,% Vertical whitespace under sections
beforeskip=3pt, % Vertical whitespace before chapters
level=1,% Sections are the second level command
toclevel=1,% Sections are the second level command
]{section}
%------------------------------------------------
\renewcommand{\chapterlinesformat}[3]{%
\ifthispageodd{% Odd pages have the coloured bar to the left of the chapter title
\hfill% Coloured bar fills available width
\raisebox{-0.2em}{\makebox[0pt][r]{\textcolor{\primarycolor}{\rule{\paperwidth}{1em}}}}% Coloured bar
\hspace{\mybarpadding}% Padding between the chapter title and colour bar
\mbox{#3}% Chapter title
}{% Even pages have the coloured bar to the right of the chapter title
\mbox{#3}% Chapter title
\hspace{\mybarpadding}% Padding between the chapter title and colour bar
\raisebox{-0.2em}{\makebox[0pt][l]{\textcolor{\primarycolor}{\rule{\paperwidth}{1em}}}}% Coloured bar
}%
}
%----------------------------------------------------------------------------------------
% ABSTRACT STYLING
%----------------------------------------------------------------------------------------
\newcommand{\abstract}[5]{
\filbreak % Avoid page breaks within abstracts
{\Large \bfseries #1} % Title
{\large \bfseries \itshape #2} \hfill {#3} % Author(s) and abstract type
\textcolor{mygray}{#4} % Affiliation(s)
\large#5 % Abstract text
}
%----------------------------------------------------------------------------------------
% POSTER STYLING (SHORT)
%----------------------------------------------------------------------------------------
\newcommand{\poster}[3]{
\filbreak % Avoid page breaks within abstracts
{\large\bfseries #1}\\ % Title
\hspace*{0.75cm} #2, \textit{#3} % Author and affiliation
}
%----------------------------------------------------------------------------------------
% VERTICAL LINE IN PAGE MARGINS
%----------------------------------------------------------------------------------------
\usepackage[scale=1, angle=0, opacity=1]{background}
\backgroundsetup{contents={}}
\AddEverypageHook{%
\ifthenelse{%
\isodd{\thepage} \AND \thepage>1 \AND \NOT \thepage=\pageref{LastPage} % If odd page but not the first or last page
}{%
% \backgroundsetup{
% color=\secondarycolor, % Bar colour
% position=current page.south east, % Position of the bar on the page
% nodeanchor=south east, % Anchor location inside the bar
% contents={\rule{10pt}{0.66\paperheight}} % Bar width and height
% }
}{}
%
\ifthenelse{%
\NOT \isodd{\thepage} \AND \NOT \thepage=\pageref{LastPage} % If even page but not the last page
}{%
% \backgroundsetup{
% color=\secondarycolor, % Bar colour
% position=current page.south west, % Position of the bar on the page
% nodeanchor=south west, % Anchor location inside the bar
% contents={\rule{10pt}{0.66\paperheight}} % Bar width and height
% }
}{}
%
\BgMaterial % Output the background set up above
}
%----------------------------------------------------------------------------------------
% TALK TYPE CIRCLE DEFINITIONS
%----------------------------------------------------------------------------------------
\newcommand{\circlegeneric}[2]{\tikz[baseline={([yshift=-.8ex]current bounding box.center)}] \node[circle, inner sep=3pt, minimum size=0.5em, color=black, fill=#1]{\small \bfseries #2};} % Generic definition of a circle with a custom colour and 2 letters in it
\newcommand{\Ctag}{\circlegeneric{\Ccolor}{C}} % Keynote lecture circle
\newcommand{\Sptag}{\circlegeneric{\Spcolor}{S}} % Invited speaker circle
\newcommand{\Lectag}{\circlegeneric{\Leccolor}{L}} % Contributed talk circle
\newcommand{\ITtag}{\circlegeneric{\ITcolor}{IT}} % Invited talk circle
%----------------------------------------------------------------------------------------
% PACKAGES THAT CLASH AND MUST BE LOADED LAST
%----------------------------------------------------------------------------------------
\usepackage{pdfpages} % Required for including a full-page image for the cover
\newcommand{\talktitle}[1]{{\large\bf #1 }\\ \medskip }