# Why is my title so squeezed? [duplicate]

I print the title of my document like this:

\begin{titlepage}
\centering
\vspace*{\fill}
{\huge\bfseries \getTitle}

\vspace*{\fill}
{\huge\bfseries \getTitleGer}
\end{titlepage}


And the title is defined like this:

  \newcommand*{\getTitle}{Unified Visualization for Execution Architectures of Big Data Frameworks}
\newcommand*{\getTitleGer}{Einheitliche Visualisierung der Ausf\"uhrungsarchitekturen von Big Data Frameworks}


Strangely enough LaTeX prints it like this. Why this strange squeezing, when the other title's line break is correctly done. When I change the input of the first title to anything else it correctly breaks the line, it seems to not do so for EXACTLY the title that I need (of course...)

After adding \par to each title it looks like this, with a too big spacing:

I want it to look like with the first image but with consistent spacing.

• You need to add a \par at the end: {\huge\bfseries \getTitle\par} and {\huge\bfseries \getTitleGer\par}. – Phelype Oleinik Jan 10 '19 at 14:58
• Yeah works, but now the gap is huge and a bit unaesthetic... See the edit... – J. Doe Jan 10 '19 at 15:01
• @J.Doe Instead of \huge you could use \fontsize{...}{...}\selectfont to set the size and baselineskip independently to whatever you want. Could you add a minimal working example (MWE) to your question? – samcarter_is_at_topanswers.xyz Jan 10 '19 at 15:16

Because of the lack of the \par, the font size is changed, but the line spacing remains that of the outside text (10 to 12 pt), so instead of using the correct line spacing (\baselineskip), TeX resorts to the \lineskip, which is the space between the base of one line to the top of the next. In both cases the \lineskip is used, but the in the German title, the base of the line is lowered by the g, thus the line spacing looks off.

You can, instead of the \huge command, which sets the line spacing proportional to the font size, directly use the \fontsize command, as samcarter mentioned in her comment.

With a little hand-tuning this setting looks like the one you want:

Produced with:

\documentclass[10pt]{article}
\usepackage{geometry}

\begin{document}

\pagenumbering{gobble}

\newcommand*{\getTitle}{Unified Visualization for Execution Architectures of Big Data Frameworks}
\newcommand*{\getTitleGer}{Einheitliche Visualisierung der Ausf\"uhrungsarchitekturen von Big Data Frameworks}

\makeatletter
\centering
{\fontsize{\@xxpt}{19.5}\selectfont \bfseries \getTitle\par}

\vspace{2cm}
{\fontsize{\@xxpt}{19.5}\selectfont \bfseries \getTitleGer \par}

\end{document}


Notes:

• The definition of \huge uses \fontsize{\@xxpt}{25}. I changed the 25 to 19.5 by trial and error.
• The \@xxpt command is defined as 20.74, so you can replace it by that value.
• This setting considers a font size configuration of 10pt. If you are using another size you have to change the values to match the corresponding \huge command.
• How did you know it's German ;) Works, Thanks a ton you saved my thesis! – J. Doe Jan 10 '19 at 16:06
• I wasn't sure, but Ausführungsarchitekturen gave me a good clue ;) Be careful, though! People in this site have already got stuck in a "never-ending thesis writing endeavour" (final paragraph of page 9). Try not to get caught as well :) – Phelype Oleinik Jan 10 '19 at 16:12
• Fair enough! No I am finished with it, and now focus solely on LaTeX edits... ;) – J. Doe Jan 10 '19 at 16:16