标题最佳实践

标题最佳实践

我的学校对于我的研讨会论文标题应该是什么样子有一些非常奇怪的想法。我该如何继续创建这样的布局,同时保持适当的 LaTeX 最佳实践(即使用\title)?

在此处输入图片描述

在此处输入图片描述

答案1

我建议不是使用\title

键值语法更加方便。

\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}

在此处输入图片描述

相关内容