2

My school has some really weird ideas on how the title for my seminar work has to look. How would I go on to create such a layout, while maintaining proper LaTeX best practises (i.e. using \title)?

enter image description here

enter image description here

timlwsk
  • 149
  • 2
    You might take a look at the titling package, which has tools to customise the  maketitle command. – Bernard Feb 22 '21 at 20:05

1 Answers1

6

I suggest to not use \title.

A key-value syntax is much handier.

\documentclass{article}

% the following should go in a local class/package file \ExplSyntaxOn

\NewDocumentCommand{\Facharbeit}{m} { \begin{titlepage} \raggedright

\keys_set:nn { facharbeit/titlepage } { #1 }

\group_begin: \bfseries \begin{tabular}{@{}l@{}} \l_facharbeit_school_tl \ \l_facharbeit_address_tl \end{tabular} \group_end:

\vspace*{\stretch{1}}

\begin{center} \bfseries \LARGE Facharbeit \ \Large im~Seminarfach:~\l_facharbeit_seminar_tl \end{center}

\vspace*{\stretch{1}}

\begin{center} \l_facharbeit_title_tl \end{center}

\vspace*{\stretch{2}}

\group_begin: \bfseries Verfasser/in:~\l_facharbeit_author_tl \par\medskip Fachlehrer/in:~\l_facharbeit_teacher_tl \par\medskip Ausgabetermin:~\l_facharbeit_date_tl \par\medskip Abgabetermin:~\l_facharbeit_deadline_tl \group_end:

\end{titlepage} }

\keys_define:nn { facharbeit/titlepage } { school .tl_set:N = \l_facharbeit_school_tl, address .tl_set:N = \l_facharbeit_address_tl, seminar .tl_set:N = \l_facharbeit_seminar_tl, title .tl_set:N = \l_facharbeit_title_tl, author .tl_set:N = \l_facharbeit_author_tl, teacher .tl_set:N = \l_facharbeit_teacher_tl, date .tl_set:N = \l_facharbeit_date_tl, deadline .tl_set:N = \l_facharbeit_deadline_tl, }

\ExplSyntaxOff

\begin{document}

\Facharbeit{ school = School, address = Some street \ Somecity, seminar = SF6, author = A. Uthor, teacher = T. Eacher, date = 28 February 2021, deadline = 28 February 2021, title = Besondere Primzahlen, }

\end{document}

enter image description here

egreg
  • 1,121,712