I am trying to create a custom title for my document, but the space between my horizontal lines, or the spacing in general doesn't work properly.
Here is a minimal-working-example, which – I hope – yields more clarity:
\documentclass[a4paper,12pt,DIV=15, ngerman]{scrartcl} % parskip=half or parskip=full
\usepackage[T1]{fontenc}
\usepackage[ngerman]{babel}
\usepackage{lipsum}
\usepackage{lmodern}
\newcommand{\mytitle}{
\textsf{
\begin{center}
\rule{\textwidth}{1.6pt}\vspace*{-\baselineskip}\vspace{3.2pt} % Thick horizontal rule
\rule{\textwidth}{0.4pt} % Thin horizontal rule
\vspace{0.75\baselineskip} % Whitespace above the title
\Large \textbf{Wonderfull Title} \\ %\vspace{0.3cm}
\large\textbf{Here stands a great Subtitle}
\rule{\textwidth}{0.4pt}\vspace*{-\baselineskip}\vspace{3.2pt} % Thin horizontal rule
\rule{\textwidth}{1.6pt} % Thick horizontal rule
\vspace{2\baselineskip} % Whitespace after the title block
Last compiled on \textbf{Date} \\
von \textbf{Author}\\
\end{center}
}
}
\begin{document}
\mytitle
\lipsum[1]
\end{document}
The problems are:
- The spacing between the bottom lines seems like intended, but between the top lines, there is too much space, despite it beeing exactly the same code
- Between the Subtitle and the two bottom lines, there is too much space
- Between the Date and the author is way too much space
My Questions regarding this topic are:
- Why is the spacing as it is? What is Latexs intention? I would like to understand the inner workings of tex better.
- How can my concrete problems with spacing be solved?
- What are the best practises for creating a good looking title?
(Of course I am happy to get any input, f.e. for better practises in latex in general – it doesn't have to directly answer the questions)
Thank you for your answers in advance!
P.S.: This is my first post on this forum so please criticize me constructively! I am really unsure, how to express myself in the most clear way.
Best Answer
The main problem was the
\Large
and\large
affecting the baseline skips. Use{
and}
to limit their scope.After that it is easy to control the vertical spaces between the elements.
Regarding the two parallel lines, see the useful example in Drawing close together horizontal lines
For inspiration look the nice titles in nice title pages
As an example on how to design a cover or a title page according to strict specifications see Tschichold
Finally, to protect the template and ensure consistency when used repeatedly, define a command with four mandatory parameters:
And use as
\mytitle{Wonderfull Title}{Here stands a great Subtitle}{Date}{Author}