2

I was trying to create a new title page for uni project. For that I took an online template and changed the text.

The problem now is, that the title wraps and has different line height in some lines.

rendered pdf result

Produced by this latex MVP

\documentclass[11pt,a4paper]{article}

\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern}

\begin{document} \begin{titlepage}

    \rule{1pt}{\textheight}
    \hspace{0.05\textwidth}
    \parbox[b]{0.75\textwidth}{
        \raggedright

        {\Huge\bfseries Entwicklung einer agentenbasierten Simulationsplattform mithilfe des JavaScript Ökosystems, am Beispiel einer Verkehrssimulation.}\\[2\baselineskip]
        {\large\textit{Subtitle}}\\[4\baselineskip]
        {\Large\textsc{Name}}

        \vspace{0.25\textheight}

        {\noindent Organization}\\[\baselineskip]
    }

\end{titlepage}

\end{document}

Can I force a consistent line height?

And one additional question, can I reenable latex automatic word breaking, so it better utilizes the available space?

Bernard
  • 271,350
Feirell
  • 123

1 Answers1

2

Do not use \\[ ] as an inter-paragraph spacing, typeset proper paragraphs, ending them before changing the type size. And use ragged2e and a proper language set-up:

\documentclass[11pt,a4paper]{article}

\usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{ragged2e} \usepackage[ngerman]{babel}

\begin{document} \begin{titlepage}

    \rule{1pt}{\textheight}
    \hspace{0.05\textwidth}
    \parbox[b]{0.75\textwidth}{
        \RaggedRight

        {\Huge\bfseries Entwicklung einer agentenbasierten Simulationsplattform mithilfe des JavaScript Ökosystems, am Beispiel einer Verkehrssimulation.
        \par}
        \bigskip
        {\large\textit{Subtitle}\par}
        \bigskip
        {\Large\textsc{Name}\par}

        \vspace{0.25\textheight}

        {\noindent Organization}
        \bigskip
    }

\end{titlepage}

\end{document}

Output from the snippet above

(well, JavaScript hyphenation should be fixed, of course)...

Rmano
  • 40,848
  • 3
  • 64
  • 125
  • Thank you very much! This worked and I got an idea why it didn't before.

    Just two more questions, if it is ok with you:

    1. Is there a way to hint or force a line break in a paragraph, so I could fix the JavaScript word wrap?
    2. Can I configure the line height, to make the title a little bit more compact?
    – Feirell Apr 21 '22 at 12:11
  • The 1. is easy, add \hyphenation{Java-Script} (choose the splitting point) or \hyphenation{JavaScript} (no split) in the preamble. For 2: https://tex.stackexchange.com/a/48743/38080 – Rmano Apr 21 '22 at 12:42
  • Perfect! Thank you :) I had found this https://tex.stackexchange.com/a/26191/268858 in the meantime, which is nice because it is not as verbose. – Feirell Apr 21 '22 at 13:09