1

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...)

enter image description here

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

enter image description here

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
  • 1
    @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
1

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:

enter image description here

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.
| improve this answer | |
  • 1
    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

Not the answer you're looking for? Browse other questions tagged or ask your own question.