Debian Codegraph @

texmf-dist/source/latex/rwth-ci/rwth-sciposter.dtx

raw
1 % \iffalse meta-comment
2 %
3 % RWTH-CI -- Corporate Design for RWTH Aachen University
4 % ----------------------------------------------------------------------------
5 %
6 % Copyright (C) 2025–2026 by Marei Peischl <[email protected]> and Lukas C. Bossert
7 %
8 % ============================================================================
9 % This work may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either version 1.3c
11 % of this license or (at your option) any later version.
12 % The latest version of this license is in
13 % http://www.latex-project.org/lppl.txt
14 % and version 1.3c or later is part of all distributions of LaTeX
15 % version 2008/05/04 or later.
16 %
17 % This work has the LPPL maintenance status `maintained'.
18 %
19 % The Current Maintainer of this work is
20 % Marei Peischl <[email protected]>
21 %
22 % The development repository can be found at
23 % https://gitlab.git.nrw/rwth-it-center/rwth-latex-templates/rwth-ci
24 % Please use the issue tracker for feedback!
25 % ============================================================================
26 %
27 % \fi
28 % \iffalse
29 %<*driver>
30 \ProvidesFile{rwth-sciposter.dtx}
31 [2026-04-03 v1.2 Sciposter for RWTH-CI, Corporate Design of RWTH Aachen University]
32 %</driver>
33 %<@@=ptxcd>
34 %<*identification>
35 \NeedsTeXFormat{LaTeX2e}[2022-10-01]
36 %<class>\ProvidesExplClass{rwth-sciposter}{2026-04-03}{1.2}{Sciposter for RWTH-CI}
37 %</identification>
38 %<*driver>
39 \providecommand*{\PtxcdDocDTXfiles}{rwth-sciposter.dtx}
40 \providecommand*{\PtxcdDocTitle}{Scientific Posters for RWTH-CI}
41 \input{rwth-ci.dtx}
42 %</driver>
43 %<*initialize>
44 % \fi
45 % \begin{documentation}
46 % \section{Scientific Posters – \cls{rwth-sciposter.cls}}
47 % The Scientific poster template is based on the \pkg{tcolorbox} poster library.
48 % Please have a look at the corresponding documentation for a full list of configuration options.
49 % The demo file corresponding to this is called \file{DEMO-RWTHSciPoster.tex}.
50 % \end{documentation}
51 % \begin{implementation}
52 % \begin{macrocode}
53 \tl_new:N \g_ptxcd_boxstyle_tl
54 \tl_gset:Nn \g_ptxcd_boxstyle_tl {RWTH}
55 \box_new:N \g_ptxcd_title_box
56
57 \dim_const:Nn \c_ptxcd_rulesep_dim {1cm}
58 % \end{macrocode}
59 % \iffalse
60 %</initialize>
61 %<*declareoptions>
62 % \fi
63 % \begin{macrocode}
64 \keys_define:nn {ptxcd/sciposter} {
65 % \end{macrocode}
66 % \iffalse
67 %</declareoptions>
68 %<*options>
69 %</options>
70 %<*processoptions>
71 % \fi
72 % \begin{macrocode}
73 }
74
75 \prop_gput:Nnn \g_ptxcd_clsopts_prop {captions} {nooneline}
76
77 \ProcessKeyOptions[ptxcd/sciposter]
78
79 \dim_new:N \g_ptxcd_margin_dim
80 \dim_const:Nn \c_@@_logo_height_dim {90.5mm}
81 \dim_const:Nn \c_@@_logo_sep_dim {14.15mm}
82 % \end{macrocode}
83 % \iffalse
84 %</processoptions>
85 %<*body>
86 % \fi
87 % \begin{macrocode}
88 \prop_map_inline:Nn \g_ptxcd_clsopts_prop {
89 \tl_if_empty:nTF {#2}
90 {\PassOptionsToClass{#1}{scrartcl}}
91 {\clist_map_inline:nn {#2} {\PassOptionsToClass{#1=##1}{scrartcl}}}
92 }
93 % \end{macrocode}
94 % Avoid warning concerning unavailble font size.
95 % The package will be loaded anyway later as a part of the font setup.
96 % \changes{v1.0b}{2026-01-23}{load anyfontsize before class to avoid fontsize warning}
97 % \begin{macrocode}
98 \RequirePackage{iftex}
99 \ifPDFTeX
100 \RequirePackage{anyfontsize}
101 \fi
102 % \end{macrocode}
103 % Load scrartcl as base class.
104 % \begin{macrocode}
105 \PassOptionsToPackage{typeareawarninfolimit=-1,DIV=10}{typearea}
106 \LoadClass[parskip=full-]{scrartcl}
107 % \begin{macrocode}
108 \PassOptionsToPackage{fontdefaults}{rwth-fonts}
109 \RequirePackage{rwth-fonts}
110 \PassOptionsToPackage{cmyk}{rwth-colors}
111 \RequirePackage{rwth-colors}
112 \RequirePackage[margin=0pt]{geometry}
113 \RequirePackage{tcolorbox}
114 \tcbuselibrary{poster}
115 \RequirePackage{qrcode}
116
117 \setkomafont{disposition}{}
118 \setkomafont{title}{
119 \fontsize{90bp}{108bp}\selectfont
120 }
121 \setkomafont{subtitle}{\fontsize{48bp}{58bp}\selectfont}
122 \setkomafont{author}{\bfseries}
123
124 \setkomafont{section}{\bfseries\fontsize{38bp}{46bp}\selectfont}
125 \setkomafont{subsection}{\bfseries\fontsize{38bp}{46bp}\selectfont}
126 % \end{macrocode}
127 % Avoid warning concerning unavailble font size.
128 % The package will be loaded anyway later as a part of the font setup.
129 % \changes{v1.0b}{2026-01-23}{Disable KOMA-Script's pagefoot element warning}
130 % \begin{macrocode}
131 \let\scr@fnt@wrn@pagefoot\relax
132 \setkomafont{pagefoot}{\fontsize{22.5bp}{27bp}\selectfont}
133 \setkomafont{captionlabel}{\bfseries}
134 \setkomafont{caption}{\fontsize{16bp}{20bp}\selectfont}
135 \tcbset{
136 RWTH/.style = {
137 empty,
138 coltitle=black,
139 colbacktitle=white,
140 coltext=black,
141 size=minimal,
142 boxrule=\z@,
143 leftrule=\z@,
144 rightrule=\z@,
145 fonttitle=\usekomafont{disposition}\usekomafont{section},
146 before~title={\strut},
147 toptitle=.5\c_ptxcd_rulesep_dim,
148 bottomtitle=.5\c_ptxcd_rulesep_dim,
149 top=.5\c_ptxcd_rulesep_dim,
150 bottom=.5\c_ptxcd_rulesep_dim,
151 parbox=false,
152 frame~empty,
153 interior~empty,
154 },
155 RWTH-inner/.style =
156 {
157 RWTH,
158 fonttitle=\usekomafont{disposition}\usekomafont{subsubsection}
159 }
160 }
161
162 % \end{macrocode}
163 % Select default box styles according to style option
164 % \begin{macrocode}
165 \tcbposterset{boxes ={\g_ptxcd_boxstyle_tl}}
166
167 \tcbset{%
168 poster/.cd,
169 spacing=2\c_ptxcd_rulesep_dim,
170 rows=6,
171 showframe=false,
172 prefix=TCBPOSTER@,
173 }
174
175 \tcbset{
176 every~ box~ on~ layer~ 3/.style={reset,\g_ptxcd_boxstyle_tl -inner},
177 every~ box~ on~ layer~ 4/.style={reset,\g_ptxcd_boxstyle_tl -inner},
178 }
179
180 \bool_if:NT \g_@@_raggedright_bool {
181 \tcbset{RWTH/.append~style={halign=flush~left}}
182 }
183
184 \pagestyle{empty}
185 % \end{macrocode}
186 % \end{implementation}
187 % \begin{documentation}
188 % \subsection{Additional title elements}
189 % The basic title setup using |\title| and |\author| works the same way as it does for standard \LaTeX.
190 % RWTH-CI provides some additional commands to extend that data.
191 % \end{documentation}
192 % \begin{implementation}
193 % \begin{macro}{\title}
194 % \begin{macrocode}
195 \renewcommand*{\title}[1]{\gdef \@title {#1}}
196 % \end{macrocode}
197 % \end{macro}
198 % \begin{macrocode}
199 \tl_new:N \g_ptxcd_poster_qrcode_tl
200 \msg_new:nnnn {rwth-sciposter} {biblatex-required}{
201 You~tried~to~use~#1.\\
202 This~feature~requires~the~biblatex~package.
203 } {
204 Try~to~remove~the~star~or~load~biblatex.
205 }
206 % \end{macrocode}
207 % \end{implementation}
208 % \begin{documentation}
209 % \DescribeMacro{\footerqrcode}
210 % Create a QRcode to be placed in the footer.
211 % The starred variant allows to use a citekey for reference.
212 % \end{documentation}
213 % \begin{implementation}
214 % \begin{macro}{\footerqrcode}
215 % \begin{macrocode}
216 \NewDocumentCommand{\footerqrcode}{sm}{
217 \IfBooleanTF {#1} {
218 \cs_if_exist:NTF \blx@blxinit {
219 \begingroup
220 \blx@blxinit
221 \entrydata{#2}{
222 \tl_gset:Nx \g_ptxcd_poster_qrcode_tl{\thefield{url}}
223 }
224 \endgroup
225 }{
226 \msg_error:nnx {rwth-sciposter} {biblatex-required} {\use:c{footerqrcode*}}
227 }
228 }{
229 \tl_gset:Nn \g_ptxcd_poster_qrcode_tl {#2}
230 }
231 }
232 % \end{macrocode}
233 % \end{macro}
234 % \end{implementation}
235 % \begin{implementation}
236 % \begin{macro}{\author}
237 % \begin{macrocode}
238 \seq_new:N \g_ptxcd_author_seq
239 \renewcommand*\author[1]{
240 \seq_gset_split:Nnn \g_ptxcd_author_seq {\and} {#1}
241 }
242 % \end{macrocode}
243 % \end{macro}
244 % \begin{macrocode}
245 \msg_new:nnn {rwth-sciposter} {unknown-language} {
246 You~selected~an~unknown~language~#1.\\
247 The~Variable~#2~does~not~have~a~predefined~value.\\
248 Ensure~to~redefine~#2~to~match~your~language.\\
249 Otherwise~the~ngerman~vaue~#3~will~be~used.
250 }
251 % \end{macrocode}
252 % The language dependent setting to split multiple authors is saved within this macro.
253 % The bundle provides English \enquote{and} as well as German \enquote{und}.
254 % In case another language is used, one could overwrite this setting.
255 % \begin{macro}{\authorandname}
256 % \begin{macrocode}
257 \providecommand*\authorandname{
258 \msg_warning:nnxxx {rwth-sciposter} {unknown-language}
259 {\languagename} {\exp_not:N \authorandname} {und}
260 und
261 }
262 % \end{macrocode}
263 % \begin{macrocode}
264 \defcaptionname{ngerman, german}{\authorandname}{und}
265 \defcaptionname{english, USenglish, american, UKenglish, british}{\authorandname}{and}
266 % \end{macrocode}
267 % \end{macro}
268 % \begin{macro}{\@author}
269 % \begin{macrocode}
270 \renewcommand*{\@author}{
271 \seq_use:Nnnn \g_ptxcd_author_seq {~\authorandname{}~} {,~} {~\&~}
272 }
273 % \end{macrocode}
274 % \end{macro}
275 % \end{implementation}
276 % \begin{documentation}
277 % \DescribeMacro{\contactinfo}
278 % This command is used to set additional contact data for the footer, for example:
279 % \begin{examplecode}
280 % \contactinfo{
281 % Telefon: +49 241 80-94123\\
282 % E-Mail: [email protected]
283 % }
284 % \end{examplecode}
285 % \end{documentation}
286 % \begin{implementation}
287 % \begin{macro}{\contactinfo}
288 % \begin{macrocode}
289 \newcommand{\contactinfo}[1]{\def\@contactinfo{\ignorespaces#1}}
290 \contactinfo{}
291 % \end{macrocode}
292 % \end{macro}
293 % \end{implementation}
294 % \begin{documentation}
295 % \DescribeMacro{\addressdata}
296 % \begin{examplecode}
297 % \addressdata{
298 % Institut für maximale Ausdehnung der Logosystematik\\
299 % RWTH Aachen University\\
300 % Musterstraße 7, 52074 Aachen, GERMANY\\
301 % }
302 % \end{examplecode}
303 % \end{documentation}
304 % \begin{implementation}
305 % \begin{macro}{\addressdata}
306 % \begin{macrocode}
307 \newcommand{\addressdata}[1]{\def\@addressdata{\ignorespaces#1}}
308 \addressdata{}
309 % \end{macrocode}
310 % \end{macro}
311 % \end{implementation}
312 % \begin{implementation}
313 % Language dependent configuration
314 % \begin{macrocode}
315 \AtBeginDocument{
316 \@ifpackageloaded{babel}{
317 \addto\extrasngerman{\def\authorandname{und}}
318 \addto\extrasgerman{\def\authorandname{und}}
319 \addto\extrasenglish{\def\authorandname{and}}
320 \addto\extrasbritish{\def\authorandname{and}}
321 \addto\captionsngerman{\renewcommand{\figurename}{Abb.}}
322 \addto\captionsgerman{\renewcommand{\figurename}{Abb.}}
323 \addto\captionsenglish{\renewcommand{\figurename}{Fig.}}
324 \addto\captionsbritish{\renewcommand{\figurename}{Fig.}}
325 }{}
326 }
327
328 \dim_new:N \g_ptxcd_bottom_margin_dim
329 \dim_new:N \g_ptxcd_footheight_dim
330 \dim_new:N \g_ptxcd_qrcode_dim
331 \dim_new:N \g_ptxcd_footsep_dim
332 \dim_new:N \g_@@_footerblock_dim
333
334 \newlength{\contentwidth}
335 \newlength{\contentheight}
336 \tcbposterset{
337 coverage =
338 {
339 spread,
340 parbox=false,
341 bottom=\dim_eval:n {\g_ptxcd_bottom_margin_dim+ \c_ptxcd_rulesep_dim},
342 left=\g_ptxcd_margin_dim,
343 right=\g_ptxcd_margin_dim,
344 before= {\__ptxcd_poster_setup_margins_and_title:},
345 top= \dim_eval:n {
346 \bool_if:NTF \g_@@_logo_bottom_bool {.5\c_@@_logo_height_dim+\g_ptxcd_margin_dim} {1.5\c_@@_logo_height_dim}
347 + \box_dp:N \g_ptxcd_title_box
348 + 2.5\c_ptxcd_rulesep_dim
349 },
350 underlay={%
351 \node[
352 inner~sep=0pt,
353 anchor=north~east
354 ](logo) at ([xshift=\dim_eval:n {-\g_ptxcd_margin_dim+\c_@@_logo_sep_dim}]\paperwidth, \dim_eval:n {\bool_if:NTF \g_@@_logo_bottom_bool {\g_ptxcd_bottom_margin_dim}{\paperheight}}){
355 \__ptxcd_insert_logo:n {\c_@@_logo_height_dim}
356 };
357 % \end{macrocode}
358 % Titleblock
359 % \begin{macrocode}
360 \node[anchor=base~west,inner~sep=0pt] (title) at (
361 \g_ptxcd_margin_dim,
362 % base top margin
363 \dim_eval:n {\paperheight\bool_if:NTF \g_@@_logo_bottom_bool {-.5\c_@@_logo_height_dim-\g_ptxcd_margin_dim} {-1.5\c_@@_logo_height_dim}}
364 ) {\box_use:N \g_ptxcd_title_box};
365 % \end{macrocode}
366 % Rules
367 % \begin{macrocode}
368 \draw[line~width=1pt] (\g_ptxcd_margin_dim,\g_ptxcd_bottom_margin_dim) --++(\contentwidth,0)
369 (\g_ptxcd_margin_dim,\dim_eval:n {\paperheight\bool_if:NTF \g_@@_logo_bottom_bool {-\g_ptxcd_margin_dim} {-\c_@@_logo_height_dim}}) --++(\contentwidth,0);
370 % \end{macrocode}
371 % QRCode
372 % \begin{macrocode}
373 \coordinate(lastpos) at (
374 \g_ptxcd_margin_dim,
375 \g_ptxcd_bottom_margin_dim- \g_ptxcd_footsep_dim
376 ) ;
377 \tl_if_empty:NF \g_ptxcd_poster_qrcode_tl
378 {
379 \node[anchor=north~west, inner~sep=\z@,outer~sep=\z@] (qrcode) at (lastpos)
380 {
381 \exp_args:NnV \use:n {\qrcode[height=\dim_use:N \g_ptxcd_qrcode_dim]}\g_ptxcd_poster_qrcode_tl
382 };
383 \coordinate (lastpos) at (qrcode.north~east);
384 }
385 % \end{macrocode}
386 % Contact info
387 % \begin{macrocode}
388 \node[anchor=north~ west, inner~ sep=\z@] (contact) at ([xshift=2\c_ptxcd_rulesep_dim]lastpos) {
389 \usekomafont{pagefoot}
390 \parbox[t][\dim_eval:n {\g_ptxcd_qrcode_dim+\dp\strutbox}][t]{
391 \dim_eval:n {
392 \g_@@_footerblock_dim
393 - \g_ptxcd_qrcode_dim
394 - 2\c_ptxcd_rulesep_dim
395 }}{
396
397 \raggedright
398 \@author
399 \par\medskip
400 \vfill
401 \strut\@contactinfo\strut
402 }
403 };
404 % block does not exist in portrait + logo=bottom
405 % \end{macrocode}
406 % Address. Will not be used if |landscape=false| and |logo=bottom|.
407 % \begin{macrocode}
408 \if@landscape
409 \def\@temp{\use:n}
410 \else
411 \bool_if:NTF \g_@@_logo_bottom_bool
412 {\def\@temp{\use_none:n}}
413 {\def\@temp{\use:n}}
414 \fi
415 \@temp
416 {
417 \node[anchor=\if@landscape north~west\else north~ east\fi, inner~ sep=\z@] (address) at (
418 \dim_eval:n {
419 \if@landscape
420 \g_ptxcd_margin_dim
421 + \g_@@_footerblock_dim
422 +2\c_ptxcd_rulesep_dim
423 \else
424 \paperwidth- \g_ptxcd_margin_dim
425 \fi
426 },
427 \g_ptxcd_bottom_margin_dim- \g_ptxcd_footsep_dim) {
428 \usekomafont{pagefoot}
429 \parbox[t][\dim_eval:n {\g_ptxcd_qrcode_dim+\dp\strutbox}][t]{
430 \dim_eval:n {\[email protected]\g_@@_footerblock_dim+\c_ptxcd_rulesep_dim\else\g_@@_footerblock_dim\fi}
431 }{
432 \raggedright
433 \@addressdata
434 }
435 };
436 }
437
438 }
439 }
440 }
441
442 \dim_new:N \g_ptxcd_titleblock_dim
443
444 \cs_new:Nn \__ptxcd_poster_setup_margins_and_title: {
445
446 \if@landscape
447 \tcbset{poster/columns=8}
448 \dim_gset:Nn \g_ptxcd_margin_dim {4.39cm}
449 \dim_gset:Nn \g_ptxcd_bottom_margin_dim {9.05cm}
450 \dim_set:Nn \g_ptxcd_qrcode_dim {2.5cm}
451 \dim_gset:Nn \g_ptxcd_footsep_dim {1.25cm}
452 \else
453 \tcbset{poster/columns=6}
454 \dim_gset:Nn \g_ptxcd_margin_dim {4cm}
455 \bool_if:NTF \g_@@_logo_bottom_bool {
456 \dim_gset:Nn \g_ptxcd_bottom_margin_dim {9.05cm}
457 } {
458 \dim_gset:Nn \g_ptxcd_bottom_margin_dim {11.4cm}
459 }
460 \dim_set:Nn \g_ptxcd_qrcode_dim {5.4cm}
461 \bool_if:NTF \g_@@_logo_bottom_bool
462 {\dim_gset:Nn \g_ptxcd_footsep_dim {1.5cm}}
463 {\dim_gset:Nn \g_ptxcd_footsep_dim {1.9cm}}
464 \fi
465 \setlength{\contentwidth}{\dimexpr\paperwidth-2\g_ptxcd_margin_dim\relax}
466 \dim_gset:Nn \g_@@_footerblock_dim {
467 \dim_eval:n {(2\contentwidth +4\c_ptxcd_rulesep_dim)/ \tcb@poster@columns - 2\c_ptxcd_rulesep_dim}
468 }
469 \hbox_gset:Nn \g_ptxcd_title_box {
470 \parbox[t]{\contentwidth}{
471 \raggedright
472 \usekomafont{disposition}
473 {\usekomafont{title}\leavevmode\strut\@title\strut\par}
474 {\usekomafont{subtitle}\vskip.5ex\leavevmode\strut\@subtitle\strut\par}
475 }
476 }
477 }
478 % \end{macrocode}
479 % \iffalse
480 %</body>
481 % \fi
482 % \end{implementation}
483 % \Finale
484 \endinput