| 1 |
% \iffalse meta-comment |
| 2 |
% |
| 3 |
% Copyright (C) 2017 by Marei Peischl <[email protected]> |
| 4 |
% |
| 5 |
% This work may be distributed and/or modified under the |
| 6 |
% conditions of the LaTeX Project Public License, either version 1.3 |
| 7 |
% of this license or (at your option) any later version. |
| 8 |
% The latest version of this license is in |
| 9 |
% http://www.latex-project.org/lppl.txt |
| 10 |
% and version 1.3 or later is part of all distributions of LaTeX |
| 11 |
% version 2005/12/01 or later. |
| 12 |
% |
| 13 |
% This work has the LPPL maintenance status `maintained'. |
| 14 |
% |
| 15 |
% The Current Maintainer of this work is Marei Peischl. |
| 16 |
% |
| 17 |
% This work consists of the files mucproc.dtx and mucproc.ins |
| 18 |
% and the derived files mucproc.cls and mucfontsize10pt.clo. |
| 19 |
% |
| 20 |
% \fi |
| 21 |
% |
| 22 |
% \iffalse |
| 23 |
% |
| 24 |
%<*!font-clo> |
| 25 |
\def\mucprocVersion{1.02} |
| 26 |
%<*driver> |
| 27 |
\ProvidesFile{mucproc.dtx}[2017/03/09 v\mucprocVersion\ MuC-conference proceedings] |
| 28 |
%</driver> |
| 29 |
|
| 30 |
%<*class> |
| 31 |
\NeedsTeXFormat{LaTeX2e}[2014/05/01] |
| 32 |
\ProvidesClass{mucproc} |
| 33 |
[2017/03/09 v\mucprocVersion\ conference proceedings for the German MuC-conference] |
| 34 |
%</class> |
| 35 |
% |
| 36 |
%<*driver> |
| 37 |
\documentclass[english]{ltxdoc} |
| 38 |
\usepackage{selinput}\SelectInputMappings{adieresis={ä},germandbls={ß}} |
| 39 |
\usepackage[T1]{fontenc} |
| 40 |
\usepackage{babel} |
| 41 |
\EnableCrossrefs |
| 42 |
\CodelineIndex |
| 43 |
\RecordChanges |
| 44 |
\usepackage{xparse} |
| 45 |
\makeatletter |
| 46 |
% Redefine theglossary environment to create single column change history |
| 47 |
\renewenvironment{theglossary}{% |
| 48 |
\glossary@prologue% |
| 49 |
\GlossaryParms\let\item\@idxitem\ignorespaces}{} |
| 50 |
\makeatother |
| 51 |
\begin{document} |
| 52 |
\DocInput{mucproc.dtx} |
| 53 |
\end{document} |
| 54 |
%</driver> |
| 55 |
% \fi |
| 56 |
% |
| 57 |
% |
| 58 |
% \CharacterTable |
| 59 |
% {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 |
| 60 |
% 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 |
| 61 |
% Digits \0\1\2\3\4\5\6\7\8\9 |
| 62 |
% Exclamation \! Double quote \" Hash (number) \# |
| 63 |
% Dollar \$ Percent \% Ampersand \& |
| 64 |
% Acute accent \' Left paren \( Right paren \) |
| 65 |
% Asterisk \* Plus \+ Comma \, |
| 66 |
% Minus \- Point \. Solidus \/ |
| 67 |
% Colon \: Semicolon \; Less than \< |
| 68 |
% Equals \= Greater than \> Question mark \? |
| 69 |
% Commercial at \@ Left bracket \[ Backslash \\ |
| 70 |
% Right bracket \] Circumflex \^ Underscore \_ |
| 71 |
% Grave accent \` Left brace \{ Vertical bar \| |
| 72 |
% Right brace \} Tilde \~} |
| 73 |
% |
| 74 |
% |
| 75 |
% \changes{v1.0}{2017/02/20}{Initial version} |
| 76 |
% \changes{v1.01}{2017/03/01}{Small bugfix concerning the support of English as main language} |
| 77 |
% |
| 78 |
% \GetFileInfo{mucproc.dtx} |
| 79 |
% |
| 80 |
% \DoNotIndex{\newcommand,\newenvironment} |
| 81 |
% |
| 82 |
% |
| 83 |
% \title{The \textsf{mucproc} class\thanks{This document |
| 84 |
% corresponds to \textsf{mucproc}~\fileversion, dated \filedate.}} |
| 85 |
% \author{Marei Peischl \\ \texttt{[email protected]}} |
| 86 |
% \date{March 9, 2017} |
| 87 |
% \maketitle |
| 88 |
% |
| 89 |
% \section{Introduction} |
| 90 |
% |
| 91 |
% The \textsf{mucproc} class provides a document class which allows to use the \LaTeX{} document preparation system for contributions to the German ``Mensch und Compuer 2017'' conference. |
| 92 |
% It corresponds to the Word-template offered via the conference's homepage \url{http://muc2017.mensch-und-computer.de/} for the year 2017. |
| 93 |
% By offering this document class and an additional usage demonstration file (\texttt{mucproc\_demo.tex}) we want to offer an easy to use possibility to prepare conference contributions in \LaTeX. |
| 94 |
% |
| 95 |
% The goal of this document class is to create PDF-files which look like those created with the Word-template. |
| 96 |
% Most of the contributions are still expected to be typeset in Word, that's why the \textsf{mucproc} class uses the historically grown formatting guidelines which have been created for Word-Users. |
| 97 |
% Therefore the settings of this document class might not always be the typographically best. |
| 98 |
% |
| 99 |
% \section{Usage} |
| 100 |
% A complete example of use can be found on the github repository for this project: \url{https://github.com/Blubu/mucproc/} |
| 101 |
% |
| 102 |
% \textsf{mucproc} already configures all features needed for the usually required elements of a contribution to the MuC-conference. It loads a bunch of packages to simplify this process. Though the Syntax of the document using this class doesn't differ from classic \LaTeX{} documents. |
| 103 |
% |
| 104 |
% \subsection{Class options} |
| 105 |
% \DescribeMacro{\documentclass} |
| 106 |
% Start your document by loading the \textsf{mucproc} class with an option for the document's main language. |
| 107 |
% The class will expect either \texttt{ngerman} or \texttt{english} as main language. |
| 108 |
% Otherwise an error message will be thrown. |
| 109 |
% |
| 110 |
% For the language settings this class uses the \textsf{babel} package and loads \textsf{csquotes} for context sensitive quotations. The language option will also be used to configure the bibliography. |
| 111 |
% |
| 112 |
% The other class option which can be used by authors is \texttt{anonymous=\textit{truth value}}. It activates the anonymous-mode which shall be used for the submission to the review process before a contribution may be accepted. |
| 113 |
% This option disables the author-field for the title and the additional author information as will be described later. |
| 114 |
% |
| 115 |
% The third type of class option is not meant to be used by the authors themselves. |
| 116 |
% It rather provides a possibility to force a document to be compiled in the final mode and enables some additional features of the document class. |
| 117 |
% The option \texttt{forcefinal=\textit{truth value}} will be used for a recompilation process for the preparation of the final version for the publication process of the proceedings. |
| 118 |
% It can be passed to the class via command line interface and will disable a manually set anonymous-mode. |
| 119 |
% |
| 120 |
% \subsection{Title creation} |
| 121 |
% |
| 122 |
% \DescribeMacro{\title} |
| 123 |
% The |\title| command behaves identically to most popular document classes. There may be line breaks created with |\\| or |\newline| inside the argument. |
| 124 |
% Other formatting macros shall not be used, since this argument is also used for the metadata of the final PDF-file. |
| 125 |
% |
| 126 |
% \DescribeMacro{\author} |
| 127 |
% \DescribeMacro{\and} |
| 128 |
% The |author| macro can also be used similar to standard \LaTeX{} documents. |
| 129 |
% If the document has more than one author, the names shall be separated with |\and|. |
| 130 |
% \DescribeMacro{\thanks} |
| 131 |
% The |\thanks| command shall be used to add the corresponding institution. |
| 132 |
% It can be used similar to the standard \LaTeX{} definition, though it also can process an optional argument. |
| 133 |
% The optional argument takes a label to reference an institution of another author. |
| 134 |
% This prevents multiple mention of institutions. |
| 135 |
% \DescribeMacro{\thanksref} |
| 136 |
% This macro is used to reference the labels set with the |\thanks| command. |
| 137 |
% The implementation of the institution reference is very different from the usual label/ref mechanism. |
| 138 |
% That's why the reference is only defined after the label was set. If the argument of |\thanksref| isn't a known Label an error will occur. |
| 139 |
% |
| 140 |
% \begin{verbatim} |
| 141 |
% \author{John Doe\thanks[inst:1]{Institution 1}\and |
| 142 |
% Jane Doe\thanks{Institution 2}\and |
| 143 |
% John Doe II\thanksref{inst:1} |
| 144 |
% \end{verbatim} |
| 145 |
% In contrast to the standard classes, \textsf{mucproc} doesn't place the footnotes created by |\thanks| on the bottom of the page, they are positioned directly below the author field of the title. |
| 146 |
% |
| 147 |
% Other possible entries for the title (e.\,g. |\date|)are ignored. |
| 148 |
% |
| 149 |
% \DescribeMacro{\maketitle} The title has to be created by calling the |\maketitle| command as usual. |
| 150 |
% |
| 151 |
% \subsection{Additional author information} |
| 152 |
% For the final version the authors of contributions have the possibility to add additional information about all authors. For this the \textsf{mucproc} class provides the |authoraddendum| environment. |
| 153 |
% |
| 154 |
% \DescribeEnv{authoraddendum} |
| 155 |
% This environment can take up to 2 arguments, one optional containing the path to a corresponding photograph and a mandatory one for the Authors name. |
| 156 |
% \begin{verbatim} |
| 157 |
% \begin{authoraddendum}[john_doe.png]{Doe, John} |
| 158 |
% Text describing the author. |
| 159 |
% \end{authoraddendum} |
| 160 |
% \end{verbatim} |
| 161 |
% If the optional picture argument ist left empty the text will be typeset over the whole |\textwidth|, otherwise there will be a 3\,cm column on the left side containing the photograph. |
| 162 |
% |
| 163 |
% \StopEventually{\PrintChanges\PrintIndex} |
| 164 |
% |
| 165 |
% \section{Implementation} |
| 166 |
% This section contains the source code to the \textsf{mucproc.cls}. It will be tried to explain how the class breaks the tasks. |
| 167 |
% \subsubsection{Compatibility mode} |
| 168 |
% This document class intends to be compiled on as many different distributions as possible. Basically this class compiles on releases newer than 2014/05/01 without errors. |
| 169 |
% Nevertheless some specific fallback tests require a the \textsf{expl3} package version of 2015/09/07 or newer. |
| 170 |
% A compatibility mode test is implemented first and deactivates all problematic features of the class. |
| 171 |
% \begin{macrocode} |
| 172 |
\RequirePackage{expl3} |
| 173 |
\ExplSyntaxOn |
| 174 |
\bool_new:N \g_MUC@compatibility_mode |
| 175 |
\@ifpackagelater{expl3}{2015/09/07}{ |
| 176 |
\bool_gset_false:N \g_MUC@compatibility_mode |
| 177 |
}{ |
| 178 |
\msg_new:nnn {mucproc}{compatibility}{ |
| 179 |
Your~ LaTeX-Distribution~ seems~ to~ be~ outdated.\\\\ |
| 180 |
Enabling~ compatibility~ Mode.\\\\ |
| 181 |
Some~ features~ won't~ be~ available. |
| 182 |
} |
| 183 |
\msg_warning:nn {mucproc}{compatibility} |
| 184 |
\bool_gset_true:N \g_MUC@compatibility_mode |
| 185 |
} |
| 186 |
|
| 187 |
\RequirePackage{xparse} |
| 188 |
% \end{macrocode} |
| 189 |
% The boolean |\g_MUC@compatibility_mode| is set true, if the \textsf{expl3} is older than required. |
| 190 |
% \subsection{Class options} |
| 191 |
% The key-value class options are implemented using the \textsf{scrbase} package defining a Family called \texttt{MUC}. |
| 192 |
% \begin{macrocode} |
| 193 |
\RequirePackage{scrbase} |
| 194 |
\DefineFamily{MUC} |
| 195 |
\DefineFamilyMember{MUC} |
| 196 |
\bool_new:N \g_MUC@pdfa_bool |
| 197 |
% \end{macrocode} |
| 198 |
% The Options |anonymous| and |forcefinal| are implemented using the basic \textsf{scrbase} mechanism for boolean options: |
| 199 |
% \begin{macrocode} |
| 200 |
\FamilyBoolKey{MUC}{anonymous}{MUC@anonymous} |
| 201 |
\FamilyBoolKey{MUC}{forcefinal}{MUC@final} |
| 202 |
\FamilyBoolKey{MUC}{headline}{MUC@headline} |
| 203 |
\FamilyBoolKey{MUC}{copyrightinfo}{MUC@copyrightinfo} |
| 204 |
\FamilyBoolKey{MUC}{pagestyle}{MUC@pagestyle} |
| 205 |
% \end{macrocode} |
| 206 |
% Set up the default boolean values before processing options. |
| 207 |
% \begin{macrocode} |
| 208 |
\MUC@headlinetrue |
| 209 |
\MUC@copyrightinfotrue |
| 210 |
\MUC@pagestyletrue |
| 211 |
|
| 212 |
\FamilyProcessOptions{MUC} |
| 213 |
% \end{macrocode} |
| 214 |
% The |pagestyle| settings can be disabled if |headline| and |copyrightinfo| are set false. |
| 215 |
% \begin{macrocode} |
| 216 |
\ifMUC@headline |
| 217 |
\else |
| 218 |
\ifMUC@copyrightinfo |
| 219 |
\else |
| 220 |
\MUC@pagestylefalse |
| 221 |
\fi |
| 222 |
\fi |
| 223 |
% \end{macrocode} |
| 224 |
% If the |forcefinal| option is set, all global options containing the substring ``draft'' or both of the substrings``final'' and ``false'' are removed to avoid any global draft mode. |
| 225 |
% \begin{macrocode} |
| 226 |
\ifMUC@final |
| 227 |
\bool_if:NTF \g_MUC@compatibility_mode { |
| 228 |
\msg_new:nnn {mucproc} {compatibility-final-error} { |
| 229 |
forcefinal~ is~ not~ possible~ in~ compatibility~ mode.\\\\ |
| 230 |
Update~ your~ TeX~ distribution~ and retry!} |
| 231 |
\msg_error:nn {mucproc} {compatibility-final-error} |
| 232 |
|
| 233 |
}{ |
| 234 |
\sys_if_engine_luatex:F { |
| 235 |
\msg_new:nnn {mucproc} {luatex-required} { |
| 236 |
forcefinal~ requires~ LuaLaTeX~ for~ correct~ PDF/A~ output.\\\\ |
| 237 |
Remove~ forcefinal~ option~ or~ change~ the~ compiler. |
| 238 |
} |
| 239 |
\msg_error:nn {mucproc} {luatex-required} |
| 240 |
} |
| 241 |
\clist_new:N \l_MUC@globalopts_clist |
| 242 |
|
| 243 |
\msg_new:nnn {mucproc} {force-final} { |
| 244 |
forcefinal~ option~ is~ enabled.\\\\ |
| 245 |
Ignoring~ all~ global~ complementary~ options.} |
| 246 |
\msg_warning:nn {mucproc} {force-final} |
| 247 |
\msg_new:nnn {mucproc} {remove-draft}{ |
| 248 |
forcefinal~ enabled:~ The~ global~ Option~ #1~ is~ ignored,~ |
| 249 |
because~ it~ seems~ to~ activate draft~ mode!} |
| 250 |
|
| 251 |
\exp_args:Nx \clist_map_inline:nn {\@classoptionslist} { |
| 252 |
\tl_if_in:nnTF {#1} {draft} |
| 253 |
{\msg_warning:nnx {mucproc} {remove-draft} {#1}} |
| 254 |
{\clist_put_right:Nn \l_MUC@globalopts_clist {#1}} |
| 255 |
\tl_if_in:nnTF {#1} {final} |
| 256 |
{\tl_if_in:nnTF {#1} {false} |
| 257 |
{\msg_warning:nnx {mucproc} {remove-draft} {#1}} |
| 258 |
{\clist_put_right:Nn \l_MUC@globalopts_clist {#1}} |
| 259 |
} |
| 260 |
{\clist_put_right:Nn \l_MUC@globalopts_clist {#1}} |
| 261 |
} |
| 262 |
|
| 263 |
|
| 264 |
\edef\@classoptionslist{\clist_use:Nn \l_MUC@globalopts_clist {,}} |
| 265 |
% \end{macrocode} |
| 266 |
% Additionally enable PDF/A-mode and metadata generation and disable anonymization. |
| 267 |
% \begin{macrocode} |
| 268 |
\bool_gset_true:N \g_MUC@pdfa_bool |
| 269 |
\MUC@anonymousfalse |
| 270 |
} |
| 271 |
\fi |
| 272 |
% \end{macrocode} |
| 273 |
% \subsection{Basic Setup} |
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
% The next step is loading \textsf{scrartcl} as base class. According to the formatting rules we pass some options and use the \texttt{mucfontsize10pt.clo} file for setting up the font sizes. |
| 279 |
% \begin{macrocode} |
| 280 |
\newcommand*{\@fontsizefilebase}{mucfontsize} |
| 281 |
\PassOptionsToClass{abstract=true,parskip=full,fontsize=10pt, |
| 282 |
twoside=semi}{scrartcl} |
| 283 |
\LoadClass{scrartcl} |
| 284 |
\setparsizes{0pt}{7pt plus 7 pt}{1em plus 1 fill} |
| 285 |
\raggedbottom |
| 286 |
% \end{macrocode} |
| 287 |
% |
| 288 |
% Now the other required packages can be loaded. |
| 289 |
% \begin{macrocode} |
| 290 |
\RequirePackage{graphicx} |
| 291 |
\RequirePackage{babel} |
| 292 |
\PassOptionsToPackage{babel}{csquotes} |
| 293 |
\bbl@frenchspacing |
| 294 |
\RequirePackage{csquotes} |
| 295 |
|
| 296 |
\RequirePackage{geometry}% setup margins |
| 297 |
\geometry{paper=a4paper,top=4.8cm, bottom=5.7cm,left=3.8cm,right=4cm, |
| 298 |
head=12.045pt,headsep=\dimexpr1cm-12.045pt\relax} |
| 299 |
% \end{macrocode} |
| 300 |
|
| 301 |
% \subsection{Bibliography setup} |
| 302 |
% The bibliography will be created using \textsf{biblatex} with \textsf{biber} as backend. |
| 303 |
% \begin{macrocode} |
| 304 |
\PassOptionsToPackage{backend=biber}{biblatex} |
| 305 |
\PassOptionsToPackage{citestyle=authoryear-comp}{biblatex} |
| 306 |
\PassOptionsToPackage{bibstyle=apa}{biblatex} |
| 307 |
\RequirePackage{biblatex} |
| 308 |
% \end{macrocode} |
| 309 |
% The APA-style requires a Language mapping. It is set for both supported main languages. |
| 310 |
% \begin{macrocode} |
| 311 |
\DeclareLanguageMapping{english}{english-apa} |
| 312 |
\DeclareLanguageMapping{ngerman}{ngerman-apa} |
| 313 |
% \end{macrocode} |
| 314 |
% Set up additional Settings to get an equal output, like the Word-version. |
| 315 |
% \begin{macrocode} |
| 316 |
\defcaptionname{ngerman,german}{\refname}{Literaturverzeichnis} |
| 317 |
|
| 318 |
\renewcommand*{\nameyeardelim}{\addcomma\space} |
| 319 |
% \end{macrocode} |
| 320 |
% |
| 321 |
% \subsection{Font Choice} |
| 322 |
% The formatting guidelines request Times New Roman as font. Since on most operating systems it is installed as a system font. |
| 323 |
% We check if it is present and the currently used compiler supports the \textsf{fontspec} package. |
| 324 |
% \begin{macrocode} |
| 325 |
\bool_new:N \g_MUC@fontspec_bool |
| 326 |
% \end{macrocode} |
| 327 |
% These tests basically use the \textsf{expl3} methods, but also a fallback for older distributions is implemented to support older distributions. First we implement the compatibility-version. |
| 328 |
% \begin{macrocode} |
| 329 |
\bool_if:NTF \g_MUC@compatibility_mode { |
| 330 |
% \end{macrocode} |
| 331 |
% To test if PDF\TeX{} is used, we check if |\pdfmatch| is defined. |
| 332 |
% \begin{macrocode} |
| 333 |
\expandafter\ifx\csname pdfmatch\endcsname\relax |
| 334 |
\else |
| 335 |
\PassOptionsToPackage{utf8}{inputenc} |
| 336 |
\RequirePackage{inputenc} |
| 337 |
\fi |
| 338 |
\bool_gset_false:N \g_MUC@fontspec_bool |
| 339 |
% \end{macrocode} |
| 340 |
% Next step is the mechanism to check if the used compiler supports \textsf{fontspec}. |
| 341 |
% \begin{macrocode} |
| 342 |
}{ |
| 343 |
\sys_if_engine_luatex:TF { |
| 344 |
\bool_gset_true:N \g_MUC@fontspec_bool |
| 345 |
}{ |
| 346 |
\sys_if_engine_xetex:TF{ |
| 347 |
\bool_gset_true:N \g_MUC@fontspec_bool |
| 348 |
}{ |
| 349 |
\sys_if_engine_pdftex:T { |
| 350 |
\bool_gset_false:N \g_MUC@fontspec_bool |
| 351 |
\PassOptionsToPackage{utf8}{inputenc} |
| 352 |
\RequirePackage{inputenc} |
| 353 |
} |
| 354 |
} |
| 355 |
} |
| 356 |
} |
| 357 |
% \end{macrocode} |
| 358 |
% The font fallback is saved in a macro. This prevents the code to be written twice. It is executed when either \textsc{fontspec} is not supported or Times New Roman isn't installed. |
| 359 |
% \begin{macrocode} |
| 360 |
\cs_new:Nn \MUC@font_Fallback: { |
| 361 |
\PassOptionsToPackage{T1}{fontenc} |
| 362 |
\RequirePackage{fontenc} |
| 363 |
\IfFileExists{txfonts.sty}{\RequirePackage{txfonts}}{} |
| 364 |
} |
| 365 |
|
| 366 |
\if_bool:N \g_MUC@fontspec_bool |
| 367 |
\RequirePackage{fontspec} |
| 368 |
\fontspec_font_if_exist:nTF {Times~ New~ Roman} |
| 369 |
{\setmainfont{Times~ New~ Roman}} |
| 370 |
{\MUC@font_Fallback:} |
| 371 |
\else: |
| 372 |
\MUC@font_Fallback: |
| 373 |
\fi: |
| 374 |
% \end{macrocode} |
| 375 |
|
| 376 |
% \subsection{PDF/A-mode and metadata creation} |
| 377 |
% The PDF archiving mode is created using the \textsf{pdfx} package. For the correct creation the PDF/A format and the \texttt{.xmpdata} file for metadata specific system settings may be required. |
| 378 |
% Therefore this mode is only active if the |forcefinal| mode is enabled. |
| 379 |
% \begin{macrocode} |
| 380 |
\if_bool:N \g_MUC@pdfa_bool |
| 381 |
\PassOptionsToPackage{a-1b}{pdfx} |
| 382 |
\RequirePackage{pdfx} |
| 383 |
\hypersetup{hidelinks} |
| 384 |
\iow_new:N \MUC@xmpdata_stream |
| 385 |
\iow_open:Nn \MUC@xmpdata_stream {\jobname.xmpdata} |
| 386 |
\tl_new:N \g_MUC@xmp_title |
| 387 |
\tl_new:N \g_MUC@xmp_author |
| 388 |
|
| 389 |
\newcommand*{\MUC@passTitleData}{ |
| 390 |
\begingroup |
| 391 |
\def\newline{} |
| 392 |
\def\\{} |
| 393 |
\xdef\MUC@author{\@author} |
| 394 |
\xdef\MUC@title{\@title} |
| 395 |
\cs_set:Npn \and {\exp_not:n {\exp_not:N \sep}} |
| 396 |
\tl_gset:Nx \g_MUC@xmp_title {\@title} |
| 397 |
\tl_gset:Nx \g_MUC@xmp_author {\@author} |
| 398 |
\endgroup |
| 399 |
\iow_now:Nx \MUC@xmpdata_stream |
| 400 |
{ |
| 401 |
\exp_not:N \Title{\tl_use:N \g_MUC@xmp_title} |
| 402 |
^^J |
| 403 |
\exp_not:N \Author{\tl_use:N \g_MUC@xmp_author} |
| 404 |
^^J |
| 405 |
\exp_not:N \Org{Mensch~ und~ Computer~ 2017} |
| 406 |
} |
| 407 |
} |
| 408 |
% \end{macrocode} |
| 409 |
% If no PDF/A shall be created, the |\maketitle| data will only be passed to the headline. |
| 410 |
% \begin{macrocode} |
| 411 |
\else: |
| 412 |
\msg_new:nnn {mucproc} {no-pdfa}{The~ mucproc~ class~ won't~ create~ PDF/A-mode.} |
| 413 |
\msg_info:nn {mucproc} {no-pdfa} |
| 414 |
\newcommand*{\MUC@passTitleData}{ |
| 415 |
\begingroup |
| 416 |
\def\newline{} |
| 417 |
\def\\{} |
| 418 |
\xdef\MUC@author{\@author} |
| 419 |
\xdef\MUC@title{\@title} |
| 420 |
\endgroup |
| 421 |
} |
| 422 |
\fi: |
| 423 |
% \end{macrocode} |
| 424 |
% |
| 425 |
% \section{Title creation} |
| 426 |
% The title creation process also invokes the mechanism to pass the title data to headline and metadata. |
| 427 |
% It can be initialized calling |\maketitle|. |
| 428 |
% \subsection{Institution footnotes} |
| 429 |
% The MuC formatting guidelines request the institutions typeset similar to footnotes, though they shouldn't be placed at the bottom of the page. |
| 430 |
% The standard footnote mechanism is quite complicated, though we use the \LaTeX3 clist datatype to create a special mechanism implementing these ``footnotes''. |
| 431 |
% The mechanism is called inside |\maketitle| but created outside of that macro definition to leave the code more readable. |
| 432 |
% |
| 433 |
% All Arguments of the |\thanks| command will be saved in the comma list called |\l_MUC@thanks_clist|. |
| 434 |
% \begin{macrocode} |
| 435 |
\clist_new:N \l_MUC@thanks_clist |
| 436 |
% \end{macrocode} |
| 437 |
% The value of the footnote counter has to be expanded when the |\thanks| macro is called. Otherwise the footnotemarks might not match. |
| 438 |
% To achieve this expansion order the |\MUC@thanks:nn| command takes the counter value as first argument and the institution name as second. |
| 439 |
% \begin{macrocode} |
| 440 |
\cs_set:Nn \MUC@thanks:nn { |
| 441 |
\clist_gput_right:Nn \l_MUC@thanks_clist |
| 442 |
{{#2\def\@thefnmark{#1}\@makefnmark} |
| 443 |
}} |
| 444 |
% \end{macrocode} |
| 445 |
% Inside the real |\thanks| macro the first argument will be expanded directly. |
| 446 |
% Additionally |\MUC@thanks| sets its own first (optional) argument as a label for the property list |\g_MUC@InstRef_prof|. |
| 447 |
% This allows the footnote counter value to be accessed through the label. |
| 448 |
% \begin{macrocode} |
| 449 |
\bool_if:NTF \g_MUC@compatibility_mode |
| 450 |
{\NewDocumentCommand{\MUC@thanks}{om}{ |
| 451 |
\footnotemark% |
| 452 |
\exp_args:Nx \MUC@thanks:nn {\thefootnote}{#2} |
| 453 |
} |
| 454 |
}{ |
| 455 |
\NewDocumentCommand{\MUC@thanks}{om}{ |
| 456 |
\footnotemark% |
| 457 |
\IfNoValueF{#1}{ |
| 458 |
\prop_if_exist:NF \g_MUC@InstRef_prop { |
| 459 |
\prop_new:N \g_MUC@InstRef_prop} |
| 460 |
\prop_put:Nnx \g_MUC@InstRef_prop {#1} {\thefootnote} |
| 461 |
} |
| 462 |
\exp_args:Nx \MUC@thanks:nn {\thefootnote}{#2} |
| 463 |
} |
| 464 |
} |
| 465 |
% \end{macrocode} |
| 466 |
% The mechanism seems to work like the typical \LaTeX{} label/ref though no backref is supported. |
| 467 |
% To inform the user about this an error will be thrown when a label is accessed which does not exist. |
| 468 |
% \begin{macrocode} |
| 469 |
\bool_if:NTF \g_MUC@compatibility_mode { |
| 470 |
\msg_new:nnn {mucproc} {thanksref-unavailable} { |
| 471 |
Compatibilty~ mode~ enabled.\\\\ |
| 472 |
The~ institution~ reference~ mechanism~ is~ not available.\\\\ |
| 473 |
Update~ Your~ TeX~ distribution~ to~ be~ able~ |
| 474 |
to~ use~ this~ feature. |
| 475 |
} |
| 476 |
\msg_warning:nn {mucproc} {thanksref-unavailable} |
| 477 |
\newcommand\MUC@thanksref[1]{$\dagger$} |
| 478 |
}{ |
| 479 |
\msg_new:nnn {mucproc} {thanks-label-missing} { |
| 480 |
No~ institute~ labeled~ '#1'.\\\\ |
| 481 |
Add~ a~ label~ using~ the~ optional~ argument~ |
| 482 |
of~ the~ \thanks~ command. |
| 483 |
} |
| 484 |
|
| 485 |
\NewDocumentCommand\MUC@thanksref{m}{ |
| 486 |
\prop_if_in:NnTF \g_MUC@InstRef_prop {#1} { |
| 487 |
\def\@thefnmark{\prop_item:Nn \g_MUC@InstRef_prop {#1}}% |
| 488 |
\@makefnmark |
| 489 |
} |
| 490 |
{\msg_error:nn {mucproc} {thanks-label-missing}} |
| 491 |
} |
| 492 |
} |
| 493 |
% \end{macrocode} |
| 494 |
% After the title has been set, the institutional notes shall be typeset. |
| 495 |
% \begin{macrocode} |
| 496 |
\newcommand*\typeset@MUC@thanks { |
| 497 |
\clist_use:Nn \l_MUC@thanks_clist {\rule{0pt}{0pt}\\}} |
| 498 |
% \end{macrocode} |
| 499 |
% \subsection{Typesetting the title} |
| 500 |
% As written before, |\maketitle| has to execute additional jobs. |
| 501 |
% Since the title fields also can contain other macros or even line breaks, the expansion process has to be controlled carefully. |
| 502 |
% \begin{macrocode} |
| 503 |
\renewcommand*{\maketitle}{ |
| 504 |
\begingroup |
| 505 |
% \end{macrocode} |
| 506 |
% Before passing the data to the headlines or metadata using the earlier defined |\MUC@passTitleData| we need some redefinitions for the commands, which can be used inside the title fields. |
| 507 |
% \begin{macrocode} |
| 508 |
\DeclareExpandableDocumentCommand{\thanks}{om}{} |
| 509 |
\def\thanksref##1{} |
| 510 |
\def\and{\unskip,~\ignorespaces} |
| 511 |
\MUC@passTitleData |
| 512 |
% \end{macrocode} |
| 513 |
% Not the actual title creation begins redefining the user macros to those prepared for that purpose. |
| 514 |
% \begin{macrocode} |
| 515 |
\let\titlepage@restore\relax |
| 516 |
\renewcommand*\thefootnote{\@arabic\c@footnote} |
| 517 |
\let\thanks\MUC@thanks |
| 518 |
\let\thanksref\MUC@thanksref |
| 519 |
% \end{macrocode} |
| 520 |
% Now only the title fields have to be typeset. |
| 521 |
% \begin{macrocode} |
| 522 |
\global\@topnum=\z@ |
| 523 |
\setparsizes{\z@}{\z@}{\z@\@plus 1fil}\par@updaterelative |
| 524 |
\null |
| 525 |
\vskip 41pt |
| 526 |
{\usekomafont{title}{\Huge \@title \par}}% |
| 527 |
{\ifx\@subtitle\@empty\else\vskip .5em\usekomafont{subtitle}% |
| 528 |
\Large\@subtitle\par\fi}% |
| 529 |
\vskip 7pt |
| 530 |
{% |
| 531 |
\usekomafont{author}{% |
| 532 |
\lineskip .5em% |
| 533 |
\@author |
| 534 |
\par |
| 535 |
}% |
| 536 |
}% |
| 537 |
\par |
| 538 |
\vskip 8pt |
| 539 |
\bool_if:NTF \g_MUC@compatibility_mode |
| 540 |
{\thispagestyle{empty}} |
| 541 |
{\thispagestyle{MUC@titlepagestyle}} |
| 542 |
\typeset@MUC@thanks |
| 543 |
\par |
| 544 |
\vspace{8pt} |
| 545 |
\endgroup |
| 546 |
\setcounter{footnote}{0}% |
| 547 |
\global\let\and\relax |
| 548 |
\global\let\thanksref\relax |
| 549 |
} |
| 550 |
% \end{macrocode} |
| 551 |
|
| 552 |
% \subsection{Anonymization and additional author information} |
| 553 |
% The anonymization is realized checking the setting using the corresponding if-expression. |
| 554 |
% The |\@author| information to the language dependent meaning of |\MUCanonymousauthor|. |
| 555 |
% \begin{macrocode} |
| 556 |
\ifMUC@anonymous |
| 557 |
\providecaptionname{english}{\MUCanonymousauthor}{anonymous~ version} |
| 558 |
\providecaptionname{german,ngerman}{\MUCanonymousauthor}{Anonymisierte~ Fassung} |
| 559 |
\def\@author{\MUCanonymousauthor} |
| 560 |
\def\author#1{\relax} |
| 561 |
% \end{macrocode} |
| 562 |
% \changes{v1.02}{2017/03/09}{Bugfix of anonymous mode} |
| 563 |
% The |authoraddendum| environment shall create no output, if the anonymous mode is active. |
| 564 |
% \begin{macrocode} |
| 565 |
\RequirePackage{comment} |
| 566 |
\excludecomment{authoraddendum} |
| 567 |
\else |
| 568 |
% \end{macrocode} |
| 569 |
% \begin{environment}{authoraddendum} |
| 570 |
% The Implementation works via the typical xparse mechanisms. |
| 571 |
% \begin{macrocode} |
| 572 |
\NewDocumentEnvironment{authoraddendum}{d<>om}{ |
| 573 |
\par |
| 574 |
\IfNoValueTF{#2}{ |
| 575 |
{\usekomafont{authoraddendum}#3}\par\medskip |
| 576 |
}{ |
| 577 |
\begin{minipage}[t]{3cm} |
| 578 |
\vspace{0pt} |
| 579 |
\IfNoValueTF{#1}{ |
| 580 |
\includegraphics[width=\linewidth]{#2} |
| 581 |
}{ |
| 582 |
\includegraphics[#1]{#2} |
| 583 |
} |
| 584 |
\end{minipage}\hfill% |
| 585 |
\begin{minipage}[t]{\dimexpr\linewidth-3.5cm\relax} |
| 586 |
\vspace{0pt} |
| 587 |
{\usekomafont{authoraddendum}#3}\par\medskip% |
| 588 |
} |
| 589 |
\usekomafont{authoraddendum}\ignorespaces |
| 590 |
}{ |
| 591 |
\IfNoValueF{#2}{\end{minipage}} |
| 592 |
\par |
| 593 |
} |
| 594 |
\fi |
| 595 |
% \end{macrocode} |
| 596 |
% \changes{v1.02}{2017/03/09}{Fix boxwidth to no longer generate an overfull hbox.} |
| 597 |
% \end{environment} |
| 598 |
% |
| 599 |
% |
| 600 |
|
| 601 |
% \subsection{Visible adjustment of sizes and spacing} |
| 602 |
% To match the Word template we have to adjust a bunch of spacing settings as well as font sizes. The easiest way to achieve this is using the KOMA-Script mechanisms. |
| 603 |
% \subsection{Structure Settings} |
| 604 |
% Word indents the section headings independent from the width of the section number. To achieve this a macro called |\MUC@sectionnumberbox| is created and all section formats are redefined. |
| 605 |
% In compatibility mode these settings will be ignored. |
| 606 |
% \begin{macrocode} |
| 607 |
\reverse_if:N \if_bool:N \g_MUC@compatibility_mode |
| 608 |
\newcommand*{\MUC@sectionnumberbox}[1]{\makebox[28bp][l]{#1\autodot}} |
| 609 |
\renewcommand*{\sectionformat}{ |
| 610 |
\MUC@sectionnumberbox{\thesection}} |
| 611 |
\renewcommand*{\subsectionformat}{ |
| 612 |
\MUC@sectionnumberbox{\thesubsection}} |
| 613 |
\renewcommand*{\subsubsectionformat}{ |
| 614 |
\MUC@sectionnumberbox{\thesubsubsection}} |
| 615 |
% \end{macrocode} |
| 616 |
% The spacing around the headings also has to be adjusted: |
| 617 |
% \begin{macrocode} |
| 618 |
\RedeclareSectionCommand[afterskip=1.5ex plus .2ex,% |
| 619 |
beforeskip=-3.6ex plus -1ex minus -.2ex]{section} |
| 620 |
\RedeclareSectionCommand[afterskip=.5ex plus .2ex,% |
| 621 |
beforeskip=-1ex plus -1ex minus -.2ex]{subsection} |
| 622 |
\RedeclareSectionCommand[afterskip=.5ex plus .2ex,% |
| 623 |
beforeskip=-1ex plus -1ex minus -.2ex]{subsubsection} |
| 624 |
\RedeclareSectionCommand[afterskip=1em,% |
| 625 |
beforeskip=1ex plus 1ex minus .2ex]{paragraph} |
| 626 |
\RedeclareSectionCommand[afterskip=1em,% |
| 627 |
beforeskip=1ex plus 1ex minus .2ex]{subparagraph} |
| 628 |
\fi: |
| 629 |
\ExplSyntaxOff |
| 630 |
% \end{macrocode} |
| 631 |
% The font settings will be done together with all other font settings in the next subsection. |
| 632 |
% |
| 633 |
% \subsection{Font Settings} |
| 634 |
% Adjusting the font settings to match the Word version: |
| 635 |
% \begin{macrocode} |
| 636 |
\setkomafont{disposition}{} |
| 637 |
\setkomafont{title}{} |
| 638 |
\setkomafont{author}{\large} |
| 639 |
\setkomafont{section}{\LARGE} |
| 640 |
\setkomafont{subsection}{\Large} |
| 641 |
\setkomafont{caption}{\footnotesize\itshape} |
| 642 |
\setkomafont{captionlabel}{\usekomafont{caption}} |
| 643 |
\newkomafont{abstractcontent}{\small} |
| 644 |
\newkomafont{abstract}{\normalsize\bfseries} |
| 645 |
\newkomafont{authoraddendum}{\small} |
| 646 |
% \end{macrocode} |
| 647 |
% |
| 648 |
% \subsection{Abstract} |
| 649 |
% The |abstract| environment is redefined to match the Word version. |
| 650 |
% \begin{macrocode} |
| 651 |
\renewenvironment{abstract}{% |
| 652 |
\setparsizes{0pt}{4pt}{0pt plus 1 fill}{% |
| 653 |
\usekomafont{abstract}% |
| 654 |
\abstractname}\par% |
| 655 |
\usekomafont{abstractcontent}}{} |
| 656 |
% \end{macrocode} |
| 657 |
|
| 658 |
% \subsection{Pagestyle} |
| 659 |
% The demo document shows a headline containing author and document title. To achieve this that information was passed inside the |\maketitle| macro and saved in the |\MUC@author| and |\MUC@title| macros. |
| 660 |
% There is also a possibility to set a copyright-information box similar to the Word template. |
| 661 |
% \begin{macrocode} |
| 662 |
\ifMUC@pagestyle |
| 663 |
\PassOptionsToPackage{headsepline}{scrlayer-scrpage} |
| 664 |
\RequirePackage{scrlayer-scrpage} |
| 665 |
\ifMUC@copyrightinfo |
| 666 |
% \end{macrocode} |
| 667 |
% Nowadays it is possible to write the complete content for the scrlayers directly inside the definition. |
| 668 |
% To support older distributions as well the content is wrapped into a box. |
| 669 |
% The most absolute length values have been extracted from different measurements to match the Word version. |
| 670 |
% \begin{macrocode} |
| 671 |
\newsavebox\MUC@copyrightbox |
| 672 |
\begin{lrbox}{\MUC@copyrightbox} |
| 673 |
\setlength{\fboxrule}{.7bp}% |
| 674 |
\setlength{\fboxsep}{6.5pt}% |
| 675 |
\fbox{\hspace*{.8pt}\parbox[t][\dimexpr2cm-2\fboxsep |
| 676 |
-2\fboxrule\relax][t]{% |
| 677 |
\dimexpr\textwidth-2\fboxsep-2\fboxrule% |
| 678 |
-1.6pt\relax}{% |
| 679 |
Platzhalter für DOI und ggf. Copyright Text. |
| 680 |
(Bitte nicht entfernen).\par |
| 681 |
\vspace{7pt} |
| 682 |
Name, Vorname (2017): Titel.% |
| 683 |
Tagungsband Mensch und Computer 2017. |
| 684 |
Gesellschaft für Informatik.% |
| 685 |
DOI: xxxxxx}% |
| 686 |
} |
| 687 |
\end{lrbox} |
| 688 |
\DeclareNewLayer[align=tl,area={\dimexpr 1in |
| 689 |
+ \hoffset + \oddsidemargin\relax}{% |
| 690 |
\dimexpr\paperheight-3.9cm\relax}{\textwidth}{2cm}, |
| 691 |
contents={\usebox\MUC@copyrightbox}]{copyright} |
| 692 |
\DeclareNewPageStyleByLayers{MUC@titlepagestyle}{copyright} |
| 693 |
\else |
| 694 |
\DeclareNewPageStyleAlias{MUC@titlepagestyle}{empty} |
| 695 |
\fi |
| 696 |
\clearpairofpagestyles |
| 697 |
\ifMUC@headline |
| 698 |
\lohead{\MUC@title} |
| 699 |
\rehead{\csname MUC@author\endcsname} |
| 700 |
\fi |
| 701 |
\setkomafont{pagehead}{\normalfont} |
| 702 |
\setkomafont{pagefoot}{} |
| 703 |
\fi |
| 704 |
% \end{macrocode} |
| 705 |
%\iffalse |
| 706 |
%</!font-clo> |
| 707 |
%<*font-clo> |
| 708 |
\ProvidesFile{mucfontsize10pt.clo}[2017/01/30 v1.0 mucproc font size class option (10pt)] |
| 709 |
|
| 710 |
\def\normalsize{% |
| 711 |
\@setfontsize\normalsize{10}{12bp} |
| 712 |
\abovedisplayskip 10\p@ \@plus2\p@ \@minus5\p@ |
| 713 |
\abovedisplayshortskip \z@ \@plus3\p@ |
| 714 |
\belowdisplayshortskip 6\p@ \@plus3\p@ \@minus3\p@ |
| 715 |
\belowdisplayskip \abovedisplayskip |
| 716 |
\let\@listi\@listI |
| 717 |
} |
| 718 |
\def\small{% |
| 719 |
\@setfontsize\small{9bp}{12bp}% |
| 720 |
\abovedisplayskip 8.5\p@ \@plus3\p@ \@minus4\p@ |
| 721 |
\abovedisplayshortskip \z@ \@plus2\p@ |
| 722 |
\belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@ |
| 723 |
\def\@listi{\leftmargin\leftmargini |
| 724 |
\topsep 4\p@ \@plus2\p@ \@minus2\p@ |
| 725 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 726 |
\itemsep \parsep}% |
| 727 |
\belowdisplayskip \abovedisplayskip |
| 728 |
} |
| 729 |
\def\footnotesize{% |
| 730 |
\@setfontsize\footnotesize{\dimexpr18bp-10pt\relax}{\dimexpr21.6bp-12pt\relax}% |
| 731 |
\abovedisplayskip 6\p@ \@plus2\p@ \@minus4\p@ |
| 732 |
\abovedisplayshortskip \z@ \@plus\p@ |
| 733 |
\belowdisplayshortskip 3\p@ \@plus\p@ \@minus2\p@ |
| 734 |
\def\@listi{\leftmargin\leftmargini |
| 735 |
\topsep 3\p@ \@plus\p@ \@minus\p@ |
| 736 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 737 |
\itemsep \parsep}% |
| 738 |
\belowdisplayskip \abovedisplayskip |
| 739 |
} |
| 740 |
\def\scriptsize{\@setfontsize\scriptsize{7}{8}} |
| 741 |
\def\tiny{\@setfontsize\tiny{5}{6}} |
| 742 |
\def\large{\@setfontsize\large{12bp}{14.4bp}} |
| 743 |
\def\Large{\@setfontsize\Large{14bp}{18}} |
| 744 |
\def\LARGE{\@setfontsize\LARGE{\dimexpr10pt + 6bp\relax}{\dimexpr12pt+7,2bp\relax}} |
| 745 |
\def\huge{\@setfontsize\huge{20}{24}} |
| 746 |
\def\Huge{\@setfontsize\Huge{24bp}{30}} |
| 747 |
\normalsize |
| 748 |
\setlength\footnotesep {6.65\p@} |
| 749 |
\setlength{\skip\footins} {9\p@ \@plus 4\p@ \@minus 2\p@} |
| 750 |
\setlength\floatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 751 |
\setlength\textfloatsep {20\p@ \@plus 2\p@ \@minus 4\p@} |
| 752 |
\setlength\intextsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 753 |
\setlength\dblfloatsep {12\p@ \@plus 2\p@ \@minus 2\p@} |
| 754 |
\setlength\dbltextfloatsep{20\p@ \@plus 2\p@ \@minus 4\p@} |
| 755 |
\setlength\@fptop {0\p@ \@plus 1fil} |
| 756 |
\setlength\@fpsep {8\p@ \@plus 2fil} |
| 757 |
\setlength\@fpbot {0\p@ \@plus 1fil} |
| 758 |
\setlength\@dblfptop {0\p@ \@plus 1fil} |
| 759 |
\setlength\@dblfpsep {8\p@ \@plus 2fil} |
| 760 |
\setlength\@dblfpbot {0\p@ \@plus 1fil} |
| 761 |
\setlength\partopsep {2\p@ \@plus 1\p@ \@minus 1\p@} |
| 762 |
\def\@listi{\leftmargin\leftmargini |
| 763 |
\parsep 4\p@ \@plus2\p@ \@minus\p@ |
| 764 |
\topsep 8\p@ \@plus2\p@ \@minus4\p@ |
| 765 |
\itemsep4\p@ \@plus2\p@ \@minus\p@} |
| 766 |
\let\@listI\@listi |
| 767 |
\def\@listii {\leftmargin\leftmarginii |
| 768 |
\labelwidth\leftmarginii |
| 769 |
\advance\labelwidth-\labelsep |
| 770 |
\topsep 4\p@ \@plus2\p@ \@minus\p@ |
| 771 |
\parsep 2\p@ \@plus\p@ \@minus\p@ |
| 772 |
\itemsep \parsep} |
| 773 |
\def\@listiii{\leftmargin\leftmarginiii |
| 774 |
\labelwidth\leftmarginiii |
| 775 |
\advance\labelwidth-\labelsep |
| 776 |
\topsep 2\p@ \@plus\p@\@minus\p@ |
| 777 |
\parsep \z@ |
| 778 |
\partopsep \p@ \@plus\z@ \@minus\p@ |
| 779 |
\itemsep \topsep} |
| 780 |
\def\@listiv {\leftmargin\leftmarginiv |
| 781 |
\labelwidth\leftmarginiv |
| 782 |
\advance\labelwidth-\labelsep} |
| 783 |
\def\@listv {\leftmargin\leftmarginv |
| 784 |
\labelwidth\leftmarginv |
| 785 |
\advance\labelwidth-\labelsep} |
| 786 |
\def\@listvi {\leftmargin\leftmarginvi |
| 787 |
\labelwidth\leftmarginvi |
| 788 |
\advance\labelwidth-\labelsep} |
| 789 |
\endinput |
| 790 |
%</font-clo> |
| 791 |
%\fi |
| 792 |
% \Finale |
| 793 |
\endinput |