Debian Codegraph @

texmf-dist/source/latex/unigrazpub/unigrazpub.dtx

raw
1 % \iffalse meta-comment
2 % Doc-Source file to use with LaTeX2e
3 % UniGrazPub – LaTeX Templates for Graz University Library Publishing
4 % ----------------------------------------------------------------------------
5 % Copyright (C) 2022 by Marei Peischl <[email protected]>
6 % ----------------------------------------------------------------------------
7 %
8 % This work may be distributed and/or modified under the
9 % conditions of the LaTeX Project Public License, either version 1.3c
10 % of this license or (at your option) any later version.
11 % The latest version of this license is in
12 % http://www.latex-project.org/lppl.txt
13 % and version 1.3c or later is part of all distributions of LaTeX
14 % version 2008/05/04 or later.
15 %
16 % This work has the LPPL maintenance status `maintained'.
17 %
18 % The Current Maintainers of this work are
19 % Marei Peischl <[email protected]>
20 %
21 % This work consists of the files unigrazpub.dtx and unigrazpub.ins
22 % and the derived file unigrazpub.cls
23 %
24 % The development respository can be found at
25 % https://github.com/peitex/unigrazpub
26 % Please use the issue tracker for feedback!
27 % \fi
28 %
29 % \iffalse
30 %<*driver>
31 \ProvidesFile{unigrazpub.dtx}
32 %</driver>
33 %<class>\NeedsTeXFormat{LaTeX2e}[2020/10/01]
34 %<class>\ProvidesClass{unigrazpub}
35 %<*class>
36 [2022/10/05 v1.00 LaTeX Templates for Graz University Library Publishing]
37 %</class>
38 %
39 %<*driver>
40 \documentclass[
41 english,
42 license-type=,%disable doclicense loading due to a conflict with doc
43 ]{unigrazpub}
44
45 \usepackage[english]{babel}
46 \usepackage{microtype}
47
48 \let\savemaketitle\maketitle
49 \usepackage{doc}
50 \let\maketitle\savemaketitle
51
52 \OnlyDescription
53
54 \newcommand*{\class}[1]{#1}
55 \newcommand*{\package}[1]{#1}
56
57 \MakeShortVerb{\|}
58
59 \makeatletter
60
61 \let\orig@marginpar\marginpar
62 \newcommand{\MacroDescriptionsMarginpar}[1]{
63 \orig@marginpar{
64 \strut\hfill
65 \rlap{\hskip-\marginparwidth\parbox{\dimexpr3cm+\marginparwidth}{
66 #1}
67 }}
68 }
69 \newenvironment{MacroDescriptions}{
70 \begin{addmargin}[3cm]{0cm}%
71 \let\marginpar\MacroDescriptionsMarginpar
72 }{\end{addmargin}}
73 \makeatother
74
75 \AddToHook{begindocument/before}[ptxcd/hypersetup]{%
76 \hypersetup{colorlinks=false}
77 }
78
79 \DeclareHookRule{begindocument/before}{doc/hyperref}{<}{ptxcd/hypersetup}
80
81 \begin{filecontents}{unigrazpub.bib}
82 @online{biblatex,
83 title={The biblatex Package},
84 author={Kime, Philip and Wemheuer, Moritz and Lehmann, Philipp},
85 date={2022-07-12},
86 url={http://mirrors.ctan.org/macros/latex/contrib/biblatex/doc/biblatex.pdf}
87 }
88 @online{doclicense,
89 author={Schneider, Robin},
90 title={The doclicense package},
91 date={2022-05-18},
92 url={http://mirrors.ctan.org/macros/latex/contrib/doclicense/doclicense.pdf}
93 }
94 \end{filecontents}
95
96 \addbibresource{unigrazpub.bib}
97
98
99 \begin{document}
100 \DocInput{unigrazpub.dtx}
101 \end{document}
102 %</driver>
103 % \fi
104 %
105 % \CheckSum{0}
106 %
107 % \CharacterTable
108 % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
109 % Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
110 % Digits \0\1\2\3\4\5\6\7\8\9
111 % Exclamation \! Double quote \" Hash (number) \#
112 % Dollar \$ Percent \% Ampersand \&
113 % Acute accent \' Left paren \( Right paren \)
114 % Asterisk \* Plus \+ Comma \,
115 % Minus \- Point \. Solidus \/
116 % Colon \: Semicolon \; Less than \<
117 % Equals \= Greater than \> Question mark \?
118 % Commercial at \@ Left bracket \[ Backslash \\
119 % Right bracket \] Circumflex \^ Underscore \_
120 % Grave accent \` Left brace \{ Vertical bar \|
121 % Right brace \} Tilde \~}
122 %
123 %
124 % \changes{v1.0}{2022/10/13}{Initial version in DocTeX format}
125 % \GetFileInfo{unigrazpub.dtx}
126 %
127 % \author{Marei Peischl <\href{mailto:[email protected]}{[email protected]}>}
128 % \title{\LaTeX-Templates for Graz University Library Publishing}
129 % \subtitle{User Documentation for version \fileversion, dated \filedate}
130 % \date{September 2022}
131 % \edition{1. Edition}
132 %
133 % \maketitle
134 %
135 % \tableofcontents
136 %
137 % \chapter{Getting started – Demo projects}
138 % The \class{unigrazpub} bundle includes two demo projects (in German) which show how to use the \class{unigrazpub} class.
139 %
140 % The projects have the following structure:
141 %
142 % \section{Book – DEMO-monografie.tex}
143 %
144 % Demo project for a book.
145 %
146 % \begin{description}
147 % \item[DEMO-monografie.tex] Main document includes the basic setup and loads the articles as well as the bibliography database.
148 % \item[impressum.tex] Imprint. Sets the publishing details for the title pages.
149 % \item[kapitel.tex] Example chapter
150 % \item[literatur.bib] Bibliography database for the whole book.
151 % \end{description}
152 %
153 % \section{Collection – DEMO-sammelband.tex}
154 %
155 % Demo project for a collection.
156 %
157 % \begin{description}
158 % \item[DEMO-sammelband.tex] Main document includes the basic setup and loads the articles as well as the bibliography database.
159 % \item[impressum.tex] Imprint. Sets the publishing details for the title pages.
160 % \item[beitrag1.tex] Example article. Can be cloned to add additional articles.
161 % \item[beitrag1.bib] Example bibliography database. Also includes the author information. One file per article is requested.
162 % \end{description}
163 %
164 % \section{How to compile the demo projects}
165 %
166 % The requirements for compiling is an installed version of the \class{unigrazpub} bundle as well as an up to date \LaTeX{} distribution.
167 % The class requires the use of lualatex and biber. Please set up your \LaTeX{} editor so those program will be used.
168 % pdflatex is not supported.
169 %
170 %
171 % \chapter{Features and Syntax}
172 %
173 % \section{Title}
174 %
175 % The structure of the titlepages is similar to standard classes. One is setting the data using macros like |\title| and the titlepage itself is created by calling |\maketitle|.
176 %
177 % \begin{verbatim}
178 % \author{Marei Peischl}
179 % \title{\LaTeX-Templates for Graz University …}
180 % \subtitle{User Documentation}
181 % \date{September 2022}
182 % \edition{1. Edition}
183 % \maketitle
184 % \end{verbatim}
185 %
186 % \begin{MacroDescriptions}
187 % \DescribeMacro{\edition}
188 % In addition to the common fields |\title|, |\author|, |\subtitle| and |\date| we also added a |\edition| field.
189 %
190 % \DescribeMacro{\lowertitleback}
191 % The imprint is created using |\lowertitleback{<content>}|. The demo files included an example configuration on this. There have been created some user accessible macros to access the title data within that field.
192 % \DescribeMacro{\insertedition}
193 % \DescribeMacro{\insertpublishersaddress}
194 % \DescribeMacro{\insertauthor}
195 % \DescribeMacro{\insertdate}
196 % \DescribeMacro{\insertpublishers} To access the title data within that one can use the macros within the margin. They will insert the corresponding data directly.
197 %
198 % The titlepages might be automatically generated. The CTAN version of the package does not include any logos but the logo will be automatically included if available. The Publisher will take care of this.
199 %
200 % \end{MacroDescriptions}
201 %
202 % \section{License}
203 % \label{sec:license}
204 %
205 % The license information is prepared by using the \package{doclicese} \cite{doclicense} package. The default is set to CC-by 4.0.
206 % To adjust the options \class{unigrazpub} provides the following options which will be passed to the package without the \enquote{license-} prefix:
207 % \begin{verbatim}
208 % license-type .initial:n = CC,
209 % license-modifier = by,
210 % license-version = 4.0
211 % \end{verbatim}
212 % The values can be changed according to the \package{doclicense} Doumentaton \cite{doclicense}. In case you don't want to use doclicese but manually provide information you can set the option |license-type=| to an empty value.
213 %
214 % \section{Collection mode}
215 % The \class{unigrazpub} class provides the option |collection=true| which enables the collection mode.
216 % Some of the features are only available when is is enabled.
217 %
218 % \subsection{Creating an article}
219 % \DescribeMacro{\Article}
220 %
221 % The |\Article| macro is starting a new chapter and adding additional data fields to provide imprint data.
222 %
223 % \begin{verbatim}
224 % \Article[
225 % authorkeys={author1, author2},
226 % subtitle=subtitle,
227 % doi=XXXX,
228 % ]{Article title}
229 % \end{verbatim}
230 %
231 % The article should be saved in a separate file and have it's own bib-file.
232 % Additionally one can also use the |license-| keys listed in \autoref{sec:license} to select another than the default license of the collection.
233 %
234 % \subsection{Abstracts}
235 % The collection requires the author to place abstracts at the beginning of each article.
236 % \DescribeEnv{abstract}
237 % The abstract environment allows to select a language to allow the addition of a german as well as an english abstract.
238 %
239 % \begin{verbatim}
240 % \begin{abstract}[<language>]
241 % <Text>
242 %
243 % \keywords{<keywords>}
244 % \end{abstract}
245 %
246 % \end{verbatim}
247 %
248 % \subsection{List of authors}
249 % \begin{MacroDescriptions}
250 % \DescribeMacro{\listofauthors} The macro |\listofauthors| creates a list of authors using the \package{biblatex} \cite{biblatex} package.
251 % Therefore one has to add the authors for a paper within the corresponding bib-file:
252 %
253 % \begin{verbatim}
254 % @author{author1,
255 % author={Name, GivenName},
256 % university={Universität Graz},
257 % institute={Institute},
258 % email= {[email protected]},
259 % orcid= {ORCID-ID1},
260 % addendum={Additional CV information}
261 % }
262 % \end{verbatim}
263 % \end{MacroDescriptions}
264 %
265 % \appendix
266 %
267 % \printbibliography
268 %
269 % \StopEventually{}
270 % \section{The Code}
271 %\iffalse
272 % \begin{macrocode}
273 %<*unigrazpub.cls>
274 % \end{macrocode}
275 %\fi
276 % \begin{macrocode}
277 \RequirePackage{l3keys2e}
278
279 \ExplSyntaxOn
280 \keys_define:nn {ptxcd} {
281 collection .bool_gset:N = \g__ptxcd_collection_bool,
282 collection .initial:n = false,
283 license-type .tl_gset:N = \g__ptxcd_license_type_tl,
284 license-type .initial:n = CC,
285 license-modifier .tl_gset:N =\g__ptxcd_license_modifier_tl,
286 license-modifier .initial:n =by,
287 license-version .tl_gset:N =\g__ptxcd_license_version_tl,
288 license-version .initial:n = 4.0,
289 }
290
291 \ProcessKeysOptions{ptxcd}
292 \ExplSyntaxOff
293
294 \PassOptionsToClass{headings=optiontoheadandtoc,fontsize=10pt,parskip=half}{scrbook}
295
296 \LoadClass{scrbook}
297
298 \PassOptionsToPackage{black}{roboto}
299 \RequirePackage{roboto}
300 \RequirePackage{sourceserifpro}
301 \RequirePackage{anyfontsize}
302
303 \RequirePackage{geometry}
304 \geometry{
305 papersize={17cm,24cm},
306 hmargin=20mm,
307 bottom=22mm,
308 top=16mm,
309 includehead,
310 headsep=1cm
311 }
312
313 \RequirePackage{ragged2e}
314
315 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
316 %% fontsizes
317 %% modified version of scrsize10pt.clo
318 %% Copyright (c) 1994-2019 Markus Kohm [komascript at gmx info]
319
320 \def\normalsize{%
321 \@setfontsize\normalsize{10bp}{13.3bp}%
322 \abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@
323 \abovedisplayshortskip \z@ \@plus3\p@
324 \belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@
325 \belowdisplayskip \abovedisplayskip
326 \let\@listi\@listI
327 }
328 \def\small{%
329 \@setfontsize\small{9bp}{12bp}%
330 \abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@
331 \abovedisplayshortskip \z@ \@plus2\p@
332 \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@
333 \def\@listi{\leftmargin\leftmargini
334 \topsep 4\p@ \@plus2\p@ \@minus2\p@
335 \parsep 2\p@ \@plus\p@ \@minus\p@
336 \itemsep \parsep}%
337 \belowdisplayskip \abovedisplayskip
338 }
339 \def\footnotesize{%
340 \@setfontsize\footnotesize{8bp}{10bp}%
341 \abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@
342 \abovedisplayshortskip \z@ \@plus\p@
343 \belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@
344 \def\@listi{\leftmargin\leftmargini
345 \topsep 3\p@ \@plus\p@ \@minus\p@
346 \parsep 2\p@ \@plus\p@ \@minus\p@
347 \itemsep \parsep}%
348 \belowdisplayskip \abovedisplayskip
349 }
350
351 \def\scriptsize{\@setfontsize\scriptsize\@viipt\@viiipt}
352 \def\tiny{\@setfontsize\tiny\@vpt\@vipt}
353 \def\large{\@setfontsize\large{11bp}{13.8bp}}
354 \def\Large{\@setfontsize\Large{12bp}{13.8bp}}
355 \def\LARGE{\@setfontsize\LARGE{13bp}{13.8bp}}
356 \def\huge{\@setfontsize\huge{15bp}{18bp}}
357 \def\Huge{\@setfontsize\Huge{21bp}{26bp}}
358 \def\HUGE{\@setfontsize\HUGE{30bp}{33bp}}
359 \normalsize
360 \setlength\footnotesep {6.65\p@}
361 \setlength{\skip\footins} {9\p@ \@plus 4\p@ \@minus 2\p@}
362 \setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
363 \setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@}
364 \setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@}
365 \setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@}
366 \setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@}
367 \setlength\@fptop {0\p@ \@plus 1fil}
368 \setlength\@fpsep {8\p@ \@plus 2fil}
369 \setlength\@fpbot {0\p@ \@plus 1fil}
370 \setlength\@dblfptop {0\p@ \@plus 1fil}
371 \setlength\@dblfpsep {8\p@ \@plus 2fil}
372 \setlength\@dblfpbot {0\p@ \@plus 1fil}
373 \setlength\partopsep {2\p@ \@plus 1\p@ \@minus 1\p@}
374 \def\@listi{\leftmargin\leftmargini
375 \parsep\z@
376 \topsep\z@
377 \itemsep\z@
378 }
379 \let\@listI\@listi
380 \def\@listii {\leftmargin\leftmarginii
381 \labelwidth\leftmarginii
382 \advance\labelwidth-\labelsep}
383 \def\@listiii{\leftmargin\leftmarginiii
384 \labelwidth\leftmarginiii
385 \advance\labelwidth-\labelsep}
386 \def\@listiv {\leftmargin\leftmarginiv
387 \labelwidth\leftmarginiv
388 \advance\labelwidth-\labelsep}
389 \def\@listv {\leftmargin\leftmarginv
390 \labelwidth\leftmarginv
391 \advance\labelwidth-\labelsep}
392 \def\@listvi {\leftmargin\leftmarginvi
393 \labelwidth\leftmarginvi
394 \advance\labelwidth-\labelsep}
395 %%% From File: $Id: scrkernel-paragraphs.dtx 3262 2019-10-10 08:25:29Z kohm $
396 \@ifundefined{@list@extra}{}{%
397 \expandafter\ifnum\scr@v@is@ge{3.17}\par@updaterelative\fi
398 \l@addto@macro{\@listi}{\@list@extra}%
399 \let\@listI=\@listi
400 \l@addto@macro{\@listii}{\@list@extra}%
401 \l@addto@macro{\@listiii}{\@list@extra}%
402 \l@addto@macro{\footnotesize}{\protect\add@extra@listi{ftns}}%
403 \l@addto@macro{\small}{\protect\add@extra@listi{sml}}%
404 }
405 \@listi
406
407 %%%%%%%%%%%%%%%%%%%%%%%%%%%
408 % font selection
409
410 \newkomafont{chapter-author}{\normalsize}
411 \newkomafont{article-subtitle}{\fontsize{21bp}{26bp}\selectfont}
412 \newkomafont{article-imprint}{\fontsize{7bp}{10bp}\selectfont}
413 \setkomafont{chapter}{\HUGE\selectfont}
414
415 \setkomafont{section}{\LARGE\bfseries}
416 \setkomafont{subsection}{\large\bfseries}
417 \setkomafont{subsubsection}{\large\bfseries}
418 \setkomafont{paragraph}{\large\bfseries}
419
420 \setkomafont{disposition}{}
421
422 \setkomafont{pageheadfoot}{\small}
423 \setkomafont{pagenumber}{}
424
425 \setkomafont{caption}{\bfseries\small}
426
427 \newkomafont{quote}{\itshape}
428
429 %%%%%%%%%%%%%%%%%%%%%%%%%%
430 % section formats
431 %raggedsection \araggedleft
432 \renewcommand*{\raggedsection}{\raggedright}
433 \RedeclareSectionCommand[beforeskip=0pt,afterskip=20.8mm]{chapter}
434 \RedeclareSectionCommands[afterskip=1.5mm,beforeskip=4.5mm,runin=false,afterindent=false]{section,subsection,subsubsection}
435 \RedeclareSectionCommands[style=section,afterskip=1.5mm,beforeskip=3mm,,runin=false,afterindent=false]{paragraph}
436
437 \ExplSyntaxOn
438 \DeclareNewSectionCommand[
439 style=chapter,
440 level=\chaptertocdepth,
441 tocentryindent=0pt,
442 tocentrynumwidth=0pt,
443 beforeskip=0pt,
444 afterskip=4mm
445 ]{article}
446
447 \renewcommand*{\articlemarkformat}{}
448 \renewcommand*{\articleformat}{}
449
450 \bool_if:NT \g__ptxcd_collection_bool {
451 \renewcommand*{\thesection}{\arabic{section}}
452 \renewcommand*{\thefigure}{\arabic{figure}}
453 \renewcommand*{\thetable}{\arabic{table}}
454 \renewcommand*{\theequation}{\arabic{equation}}
455 \renewcommand*{\chapterlinesformat}[3]{
456 \str_if_eq:nnTF {#1} {article} {
457 \clist_if_empty:NF \l_ptxcd_author_clist {\parbox{\textwidth}{
458 \usekomafont{chapter-author}\clist_use:Nn \l_ptxcd_author_clist {,\space}
459 }\par\vspace{3mm}}
460 \@hangfrom{#2}{#3}
461 } {
462 \@hangfrom{#2}{#3}
463 }
464 }
465
466 \renewcommand*{\addarticletocentry}[2]{%
467 \addcontentsline{\ext@toc}{chapter}{\protect\nonumberline\protect\TocAuthorEntry{\clist_use:Nn \l_ptxcd_author_clist {,\space}}{#2}}%
468 }
469 }
470
471 %article structure
472 \clist_map_inline:nn {title,subtitle,imprint,unknown,head,doi} {
473 \tl_new:c {l_ptxcd_#1_tl}
474 }
475
476 \clist_new:N \l_ptxcd_author_clist
477 \clist_new:N \l_ptxcd_authorkeys_clist
478
479 \keys_define:nn {ptxcd/article} {
480 author .clist_set:N = \l_ptxcd_author_clist,
481 authorkeys .clist_set:N = \l_ptxcd_authorkeys_clist,
482 title .tl_set:N = \l_ptxcd_title_tl,
483 head .tl_set:N = \l_ptxcd_head_tl,
484 subtitle .tl_set:N = \l_ptxcd_subtitle_tl,
485 imprint .tl_set:N = \l_ptxcd_imprint_tl,
486 doi .tl_set:N = \l_ptxcd_doi_tl,
487 imprint .initial:n = {
488 \citeimprint {\clist_use:Nn \l_ptxcd_authorkeys_clist {,}}
489 },
490 license-type .tl_set:N = \l__ptxcd_license_type_tl,
491 license-type .initial:n =,
492 license-modifier .tl_set:N = \l__ptxcd_license_modifier_tl,
493 license-modifier .initial:n =,
494 license-version .tl_set:N = \l__ptxcd_license_version_tl,
495 license-version .initial:n =,
496 license .tl_set:N = \l__ptxcd_license_tl,
497 unknown .code:n = \tl_put_right:Nx \l_ptxcd_unknown_tl {,\l_keys_key_tl =\exp_not:n {#1}},
498 }
499
500 \cs_new:Nn \__ptxcd_clear_article_vars: {
501 \clist_map_inline:nn {title,subtitle,unknown,head,doi} {
502 \tl_clear:c {l_ptxcd_##1_tl}
503 }
504
505 \tl_set:Nn \l_ptxcd_imprint_tl {\citeimprint {\clist_use:Nn \l_ptxcd_authorkeys_clist {,}}}
506
507 \tl_set_eq:NN \l__ptxcd_license_type_tl \g__ptxcd_license_type_tl
508 \tl_set_eq:NN \l__ptxcd_license_modifier_tl \g__ptxcd_license_modifier_tl
509 \tl_set_eq:NN \l__ptxcd_license_version_tl \g__ptxcd_license_version_tl
510
511 \clist_clear:N \l_ptxcd_author_clist
512 \clist_clear:N \l_ptxcd_authokeys_clist
513 \tl_set:Nn \l_ptxcd_head_tl {l_ptxcd_title_tl}
514 }
515
516
517
518 \bool_if:NTF \g__ptxcd_collection_bool {
519 \AddToHook{include/before}{\begin{refsection}}
520 \AddToHook{include/after}{\end{refsection}}
521 } {
522 \AddToHook{include/before}{\begingroup}
523 \AddToHook{include/after}{\endgroup}
524 }
525
526 \AddToHook{include/end}{\label{\currentarticlelabel.last}}
527
528 \AddToHook{env/enumerate/begin}{\setlength{\parskip}{\z@}}
529 \AddToHook{env/itemize/begin}{\setlength{\parskip}{\z@}}
530
531 \newcommand*{\currentarticlelabel}{autolabel-\CurrentFile}
532
533 \newcommand*{\Article}[2][]{
534 \__ptxcd_clear_article_vars:
535 \keys_set:nn {ptxcd/article} {title={#2},#1}
536
537 \tl_set_eq:NN \doclicense@type \l__ptxcd_license_type_tl
538 \tl_set_eq:NN \doclicense@modifier \l__ptxcd_license_modifier_tl
539 \tl_set_eq:NN \doclicense@version \l__ptxcd_license_version_tl
540
541 \clist_if_empty:NF \l_ptxcd_authorkeys_clist
542 {
543 \clist_if_empty:NT \l_ptxcd_author_clist {
544 \clist_map_inline:Nn \l_ptxcd_authorkeys_clist {
545 \clist_put_right:Nn \l_ptxcd_author_clist {\citearticleauthor{##1}}
546 }
547 }
548 }
549 \tl_if_empty:NTF \l_ptxcd_unknown_tl {
550 \article{#2}
551 } {
552 \exp_last_unbraced:Nno \use:n {\article[}
553 \l_ptxcd_unknown_tl]{#2}
554 }
555 \tl_if_empty:NF \l_ptxcd_subtitle_tl {
556 \begin{flushleft}
557 \usekomafont{article-subtitle}
558 \l_ptxcd_subtitle_tl
559 \end{flushleft}
560 }
561 \label{\currentarticlelabel.first}
562 \vfill
563 \tl_if_empty:NF \l_ptxcd_imprint_tl {
564 \setlength{\fboxrule}{.55mm}
565 \setlength{\fboxsep}{2mm}
566 \fbox{
567 \parbox{\dimexpr\textwidth-2\fboxsep-2\fboxrule}{
568 \usekomafont{article-imprint}
569 \raggedright
570 \g_ptxcd_collection_imprint_info_tl\\
571 \tl_if_empty:NF \l_ptxcd_doi_tl {\exp_args:No \url{https://doi.org/\l_ptxcd_doi_tl}}
572 \par\addvspace{\baselineskip}
573 \l__ptxcd_license_tl
574 \par\addvspace{\baselineskip}
575 \l_ptxcd_imprint_tl\par
576 }
577 }
578 }
579 \pagebreak
580 }
581
582 \tl_new:N \g_ptxcd_collection_imprint_info_tl
583
584 \tl_gset:Nn \g_ptxcd_collection_imprint_info_tl {
585 \@title,~\@author,~\@date,~S.~ \pageref{\currentarticlelabel.first}–\pageref{\currentarticlelabel.last}
586 }
587
588 \tl_set:Nn \l__ptxcd_license_tl {
589 Dieses~Werk~ist~lizenziert~unter~einer~
590 \doclicenseLongName~Lizenz,~
591 ausgenommen~von~dieser~Lizenz~sind~Abbildungen,~Screenshots~und~Logos.
592 }
593
594 \ExplSyntaxOff
595
596
597
598
599 %%%%%%%%%%%%%%%%%%%%%%%%%%%
600 % wörtliche Zitate
601 \renewenvironment{quote}{%
602 \vspace{1.5mm}
603 \begin{addmargin}[5mm]{5mm}
604 \usekomafont{quote}
605 \ignorespaces
606 }{%
607 \end{addmargin}
608 \vspace{1.5mm}
609 }
610
611 \let\quotation\quote
612 \let\enquotation\endquote
613
614 %%%%%%%%%%%%%%%%%%%%%%%%%%%%
615 % lists
616 \setlength{\leftmargini}{7mm}
617 \setlength{\labelwidth}{0pt}
618 \setlength{\labelsep}{4mm}
619 %footnotes
620 \deffootnote[5mm]{5mm}{-5mm}{\textsuperscript{\thefootnotemark}}
621
622 \title{}
623 \author{}
624
625 %%%%%%%%%%%%%%%%%%%%%%%%%%%
626 % pagestyle
627 \usepackage{scrlayer-scrpage}
628
629 \ModifyLayers[voffset=16mm]{scrheadings.head.even,scrheadings.head.odd,scrheadings.head.even,scrheadings.head.odd}
630 \DeclareNewLayer[clone=scrheadings.head.odd,addhoffset=\textwidth,width=18mm,contents={%
631 \sls@secure@box\headheight{%
632 \normalfont\usekomafont{pageheadfoot}{\usekomafont{pagehead}%
633 \strut\smash{\makebox[\layerwidth][l]{\quad\pagemark}}}}}%
634 ]{pagemark.odd}
635 \DeclareNewLayer[evenpage,head,align=br,voffset=16mm,width=\marginparwidth,contents={%
636 \sls@secure@box\headheight{%
637 \normalfont\usekomafont{pageheadfoot}\usekomafont{pagehead}%
638 \strut\smash{\makebox[\layerwidth][r]{\pagemark\quad}}}}%
639 ]{pagemark.even}
640 \AddLayersToPageStyle{scrheadings}{pagemark.odd,pagemark.even}
641 \AddLayersToPageStyle{plain.scrheadings}{pagemark.odd,pagemark.even}
642 \clearpairofpagestyles
643 \ohead{\headmark}
644
645 %%%%%%%%%%%%%%%%%%%%%%%%%%%
646 % Abstract
647 \ExplSyntaxOn
648 \bool_if:NT \g__ptxcd_collection_bool {
649 \providecommand{\abstract}{}% für book
650 \RenewDocumentEnvironment{abstract}{o}{
651 \begingroup
652 \IfNoValueF{#1}{\selectlanguage{#1}}
653 \section*{\abstractname}
654 }{
655 \endgroup
656 }
657
658 \providecaptionname{english}{\keywordsname}{Keywords}
659 \providecaptionname{ngerman,german,naustrian,austrian}{\keywordsname}{Schlagwörter}
660
661 \newcommand*{\keywords}[1]{
662 \par\vspace{\baselineskip}
663 \@hangfrom{\usekomafont{keywordlabel}\keywordsname :\space}{#1}}
664 \newkomafont{keywordlabel}{\bfseries}
665 }
666
667
668
669 %rlap statt llap
670 \clist_map_inline:nn {enum,item} {
671 \int_step_inline:nn {4} {
672 \cs_set_eq:cc {orig@label#1\int_to_roman:n{##1}} {label#1\int_to_roman:n{##1}}
673 \cs_set:cpn {label#1\int_to_roman:n{##1}} {\rlap{\use:c {orig@label#1\int_to_roman:n{##1}}}}
674 }
675 }
676
677 \DeclareTOCStyleEntry[
678 beforeskip=7mm,
679 entryformat=\bfseries\fontsize{13bp}{13.8bp}
680 \showthe\dimexpr\linewidth-13.4cm\relax
681 \selectfont,
682 rightindent=\dimexpr\linewidth-13.4cm\relax,
683 %pagenumberwidth=\dimexpr\linewidth-13.4cm\relax,
684 ]{tocline}{part}
685
686
687 \DeclareTOCStyleEntry[
688 entryformat=\bfseries,
689 linefill={\TOCLineLeaderFill[.]},
690 ]{tocline}{chapter}
691
692
693 \DeclareTOCStyleEntry[
694 entryformat=\LARGE\bfseries,
695 linefill={\TOCLineLeaderFill[.]},
696 rightindent=\dimexpr\linewidth-13.4cm\relax,
697 beforeskip=7mm,
698 ]{tocline}{part}
699
700 \DeclareTOCStyleEntry[
701 indent=5mm,
702 entryformat=\normalsize,
703 linefill={\TOCLineLeaderFill[.]},
704 rightindent=\dimexpr\linewidth-5mm-13.4cm\relax,
705 ]{tocline}{section}
706
707
708 \DeclareTOCStyleEntry[
709 indent=10mm,
710 entryformat=\normalsize,
711 linefill={\TOCLineLeaderFill[.]},
712 rightindent=\dimexpr\linewidth-10mm-13.4cm\relax,
713 ]{tocline}{subsection}
714
715
716 \DeclareTOCStyleEntry[
717 indent=15mm,
718 entryformat=\normalsize,
719 linefill={\TOCLineLeaderFill[.]},
720 rightindent=\dimexpr\linewidth-15mm-13.4cm\relax,
721 ]{tocline}{subsubsection}
722
723
724 \DeclareTOCStyleEntry[
725 indent=20mm,
726 entryformat=\normalsize,
727 linefill={\TOCLineLeaderFill[.]},
728 rightindent=\dimexpr\linewidth-20mm-13.4cm\relax,
729 ]{tocline}{paragraph}
730
731 \RedeclareSectionCommand[
732 style=part,
733 afterskip = 0pt plus 1 fil,
734 beforeskip=54mm,%86mm-27mm,
735 font=\sffamily\huge,
736 ]{part}
737
738 \setcounter{tocdepth}{\paragraphnumdepth}
739 \setcounter{secnumdepth}{\paragraphnumdepth}
740
741
742
743 \newcommand*{\TocAuthorEntry}[2]{%
744 {\usekomafont{TocAuthorEntry}#1}\newline
745 \hspace*{-5mm}
746 #2
747 }
748
749 \newkomafont{TocAuthorEntry}{\normalfont\normalsize}
750
751 \renewcommand*{\raggedpart}{\raggedleft}
752
753 \let\orig@backmatter\backmatter
754 \renewcommand*{\backmatter}{
755 \__ptxcd_clear_article_vars:
756 \orig@backmatter
757 \StartTocPart{\appendixname}
758 }
759
760
761 \ExplSyntaxOff
762
763
764 \RequirePackage{csquotes}
765
766 \PassOptionsToPackage{defernumbers}{biblatex}
767 \PassOptionsToPackage{notes}{biblatex-chicago}
768 \RequirePackage{biblatex-chicago}
769
770
771 % datamodel modiications for authorlist
772 \DeclareDatamodelEntrytypes{author}
773
774 \DeclareDatamodelFields[type=field,datatype=literal]{university, institute, addendum}
775
776 \DeclareDatamodelEntryfields[author]{%
777 author,university,institute,addendum
778 }
779
780 \DeclareBibliographyDriver{author}{%
781 \mkbibbold{\printnames{author}}\setunit{\addcomma\addspace}%
782 \printfield{university}\setunit{\addcomma\addspace}%
783 \printfield{institute}\newunit
784 \printfield{addendum}\addperiod
785 }
786
787 \renewcommand*{\bibliography@heading}{\section*}
788
789
790 \let\orig@printbibliography\printbibliography
791
792 \RenewDocumentCommand{\printbibliography}{O{}}{\orig@printbibliography[nottype=author,#1]}
793
794 \setlength{\bibhang}{5mm}
795
796 \defbibheading{listofauthors}{%
797 \addsec{Verzeichnis der Autorinnen und Autoren}%
798 \markboth{Verzeichnis der Autorinnen und Autoren}{Verzeichnis der Autorinnen und Autoren}%
799 }
800
801 \newcommand*{\listofauthors}{\orig@printbibliography[heading=listofauthors,type=author]}
802
803 \renewcommand*{\bibfont}{\normalfont\small}
804
805 \DeclareCiteCommand{\citeimprint}{}{%
806 \printnames[given-family]{author}\setunit{\addcomma\addspace}
807 \printfield{institute}\setunit{\addcomma\addspace}
808 \printfield{email}\setunit{\addcomma\addspace}
809 \printfield{orcid}\setunit{}
810 }{\par}{}
811
812 \DeclareCiteCommand{\citearticleauthor}{}{\printnames[given-family]{author}}{}{}
813
814 \let\orig@appendix\appendix
815
816 \renewcommand*{\appendix}{%
817 \orig@appendix\addpart{Anhang}%
818 }
819
820 \RequirePackage{graphicx}
821
822 \ExplSyntaxOn
823 \tl_if_empty:NF \g__ptxcd_license_type_tl {
824 \PassOptionsToPackage{type=\g__ptxcd_license_type_tl}{doclicense}
825 \PassOptionsToPackage{modifier=\g__ptxcd_license_modifier_tl}{doclicense}
826 \PassOptionsToPackage{version=\g__ptxcd_license_version_tl}{doclicense}
827 \RequirePackage[
828 hyperxmp=false
829 ]{doclicense}
830 }
831 \ExplSyntaxOff
832
833 \PassOptionsToPackage{hidelinks}{hyperref}
834 \RequirePackage{hyperref}
835
836 \extratitle{\begingroup\sffamily\bfseries\fontsize{9bp}{12bp}\def\and{,\space}\selectfont\@author\par\vspace{.5\baselineskip}\@title\par\@subtitle\endgroup}
837
838 \setkomafont{author}{\sffamily\bfseries\fontsize{15bp}{18bp}\selectfont}
839
840 \setkomafont{subtitle}{\sffamily\bfseries\fontsize{27bp}{30bp}\selectfont}
841
842 \setkomafont{title}{\sffamily\bfseries\fontsize{41bp}{42bp}\selectfont}
843
844 \renewcommand*\maketitle[1][1]{%
845 \begin{titlepage}
846 \let\footnotesize\small
847 \let\footnoterule\relax
848 \let\footnote\thanks
849 \renewcommand*\thefootnote{\@fnsymbol\c@footnote}%
850 \let\@oldmakefnmark\@makefnmark
851 \renewcommand*{\@makefnmark}{\rlap\@oldmakefnmark}%
852 \ifx\@extratitle\@empty
853 \ifx\@frontispiece\@empty
854 \else
855 \if@twoside\mbox{}\next@tpage\fi
856 \noindent\@frontispiece\next@tdpage
857 \fi
858 \else
859 \noindent\@extratitle
860 \ifx\@frontispiece\@empty
861 \else
862 \next@tpage
863 \noindent\@frontispiece
864 \fi
865 \next@tdpage
866 \fi
867 \setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative
868 \begin{raggedright}
869 \begingroup
870 \def\and{\par}
871 \usekomafont{author}
872 \csname text_uppercase:n\endcsname {\@author}
873 \par\vspace{1.784\baselineskip}
874 \endgroup
875 {\usekomafont{title}{\csname text_uppercase:n\endcsname {\@title}\par}}%
876 \vskip 1em
877 {\ifx\@subtitle\@empty\else\usekomafont{subtitle}{\@subtitle\par}\fi}%
878 \end{raggedright}\par
879 % \vskip \z@ \@plus3fill
880 \vfill
881 {\usekomafont{publishers}{\@publishers \par}}%
882 \@thanks\global\let\@thanks\@empty
883 \next@tpage
884 \begin{minipage}[t]{\textwidth}
885 \@uppertitleback
886 \end{minipage}\par
887 \vfill
888 \begin{minipage}[b]{\textwidth}
889 \fontsize{10bp}{10bp}\selectfont
890 \setlength{\parskip}{\baselineskip}
891 \raggedright
892 \@lowertitleback
893 \end{minipage}\par
894 \@thanks\global\let\@thanks\@empty
895 % \fi
896 \ifx\@dedication\@empty
897 \else
898 \next@tdpage\null\vfill
899 {\centering\usekomafont{dedication}{\@dedication \par}}%
900 \vskip \z@ \@plus3fill
901 \@thanks\global\let\@thanks\@empty
902 \cleardoubleemptypage
903 \fi
904 \ifx\titlepage@restore\relax\else\clearpage\titlepage@restore\fi
905 \end{titlepage}
906 \setcounter{footnote}{0}%
907 \global\let\and\relax
908 }%
909
910
911
912 \newcommand*{\edition}[1]{\def\insertedition{#1}}
913 \newcommand*{\publishersaddress}[1]{\def\insertpublishersaddress{#1}}
914
915 \publishers{Graz University Library Publishing \IfFileExists{Logo_Universitaet-Graz_1c.pdf}{\hfill \includegraphics[width=0.25\textwidth]{Logo_Universitaet-Graz_1c.pdf}}{}}
916 \publishersaddress{
917 Graz University Library Publishing\\
918 Universitätsplatz 3a\\
919 8010 Graz\\
920 \protect\url{lp.uni-graz.at}}
921
922 \newcommand*{\insertauthor}{\@author}
923 \newcommand*{\insertdate}{\@date}
924 \newcommand*{\insertpublishers}{\@publishers}
925
926 \endinput
927 % \end{macrocode}
928 %\iffalse
929 % \begin{macrocode}
930 %</unigrazpub.cls>
931 % \end{macrocode}
932 %\fi
933 %\Finale
934 \endinput