3

On my title page there is one line ("Norwegian University of Science and Technology") which is too long and does not fit on the page. However this line continues outside of the page (so we cannot see it) instead of starting a new line. I do not know how to change this.

The template I use is from a friend and because I'm new to TeX. I don't really know what he did in this template.

I hope someone can help me!

\documentclass{scrreprt}
\begin{document}

\newcommand{\TYP}               {Bachelor Thesis} 
\newcommand{\TITEL}             {bla bla bla}

\newcommand{\Pruefer}           {Prof. Dr.-Ing. E. Nergy}  
\newcommand{\AUTORJ}            {Donald Duck}
\newcommand{\SEMESTER}          {Wintersemester 2016 / 2017}
\newcommand{\TAG}               {28} 
\newcommand{\MONAT}             {February} 
\newcommand{\JAHR}              {2017}
\newcommand{\ORT}               {Entenhausen,  }

\newcommand{\NTNU}              {Norwegian University of Science and Technology}
\newcommand{\BETREUER}          {Prof. Dr.-Ing. Dagobert Duck}

\newcommand{\TITELscriptsize}{\fontsize{12pt}{9pt}}
\newcommand{\TITELnormalsize}{\fontsize{16pt}{16pt}}
\newcommand{\TITELLARGE}{\fontsize{20pt}{20pt}}
\newcommand{\TITELLarge}{\fontsize{30pt}{30pt}}
\newcommand{\TITELlarge}{\fontsize{24pt}{24pt}}

\thispagestyle{empty}
\definecolor{tuhh}{rgb}{0.2,0.8,0.8}

\newlength{\logobreite}     \setlength{\logobreite}{30mm}
\newlength{\strichre}           \setlength{\strichre}{10mm}
\newlength{\gap}                    \setlength{\gap}{2mm}
\newlength{\randabstand}    \setlength{\randabstand}{15mm}

\newlength{\ueberhang}      \setlength{\ueberhang}{210mm/2 - \textwidth/2 -\randabstand}
\newlength{\strichli}           \setlength{\strichli}{\textwidth-\logobreite-\strichre-\gap-\gap+\ueberhang+\ueberhang}

\setlength{\hoffset}{5mm}

\begin{center}
  \vspace{2.0cm}
    {\TITELlarge\mdseries\sffamily\bfseries \TYP}\\
    \vspace{1.5cm}
    {\TITELLarge\sffamily\bfseries \TITEL}\\
    \vspace{1.5cm}

  \begin{tabular}{ll}\\
 \fontsize{20}{20}\selectfont
\\
{\TITELLARGE\mdseries  Student:} & {\TITELLARGE\mdseries \AUTORJ}\\
\\
{\TITELLARGE\mdseries  First Examiner:} & {\TITELLARGE\mdseries \Pruefer}\\
 \\
{\TITELLARGE\mdseries  Second Examiner:} & {\TITELLARGE\mdseries \ZWEITPRUEFER}
\vspace{1.0cm}\\

{\TITELLARGE\mdseries  In cooperation with:} & {\TITELLARGE\mdseries \NTNU}\\
 \\
{\TITELLARGE\mdseries  Supervisor:} & {\TITELLARGE\mdseries \BETREUER}
\vspace{1.5cm}\\



{\TITELLARGE\mdseries   Semester:} & {\TITELLARGE\mdseries \SEMESTER}\\
   \vspace{1cm} 
   \end{tabular}

   \TITELnormalsize\mdseries \ORT \TAG. \MONAT\ \JAHR
\end{center}
\endgroup
\end{document}
4

Your MWE did not compile so I had to change the code.

NB! You need a scalable font to have 30 pt heading!

Change the definition of the table to

  \begin{tabular}{lp{9cm}}

To avoid hyphenation in the name of the university, you may load package array and change the definition to

 \begin{tabular}{l>{\raggedright}p{9cm}}

In addition, you have to change the \\ to \tabularnewline.

Alternatively, you may put the command \raggedrightin the offending cell.

Complete MWE:

\documentclass{scrreprt}
\usepackage{xcolor, calc} %% <-- necessary for compilation 

\usepackage{array} %% <- Alternatively, you may put the command
                   %% `\raggedright`in the offending cell.

\begin{document}

\newcommand{\TYP}               {Bachelor Thesis} 
\newcommand{\TITEL}             {bla bla bla}

\newcommand{\Pruefer}           {Prof. Dr.-Ing. E. Nergy}  
\newcommand{\AUTORJ}            {Donald Duck}
\newcommand{\SEMESTER}          {Wintersemester 2016 / 2017}
\newcommand{\TAG}               {28} 
\newcommand{\MONAT}             {February} 
\newcommand{\JAHR}              {2017}
\newcommand{\ORT}               {Entenhausen,  }

\newcommand{\NTNU}              {Norwegian University of Science and Technology}
\newcommand{\BETREUER}          {Prof. Dr.-Ing. Dagobert Duck}

\newcommand{\TITELscriptsize}{\fontsize{12pt}{9pt}}
\newcommand{\TITELnormalsize}{\fontsize{16pt}{16pt}}
\newcommand{\TITELLARGE}{\fontsize{20pt}{20pt}}
\newcommand{\TITELLarge}{\fontsize{30pt}{30pt}}
\newcommand{\TITELlarge}{\fontsize{24pt}{24pt}}

\thispagestyle{empty}
\definecolor{tuhh}{rgb}{0.2,0.8,0.8}

\newlength{\logobreite}     \setlength{\logobreite}{30mm}
\newlength{\strichre}           \setlength{\strichre}{10mm}
\newlength{\gap}                    \setlength{\gap}{2mm}
\newlength{\randabstand}    \setlength{\randabstand}{15mm}

\newlength{\ueberhang}      \setlength{\ueberhang}{210mm/2 - \textwidth/2 -\randabstand}
\newlength{\strichli}           \setlength{\strichli}{\textwidth-\logobreite-\strichre-\gap-\gap+\ueberhang+\ueberhang}

\setlength{\hoffset}{5mm}

\begin{center}
  \vspace{2.0cm}
    {\TITELlarge\mdseries\sffamily\bfseries \TYP}\\
    \vspace{1.5cm}
    {\TITELLarge\sffamily\bfseries \TITEL}\\
    \vspace{1.5cm}

  \begin{tabular}{l>{\raggedright}p{9cm}}\\
 \fontsize{20}{20}\selectfont
\\
{\TITELLARGE\mdseries  Student:} & {\TITELLARGE\mdseries \AUTORJ}\\
\tabularnewline
{\TITELLARGE\mdseries  First Examiner:} & {\TITELLARGE\mdseries \Pruefer}\\
\tabularnewline
{\TITELLARGE\mdseries  Second Examiner:} & {\TITELLARGE\mdseries %\ZWEITPRUEFER% <- was not defined, commented out
}
\vspace{1.0cm}\tabularnewline

{\TITELLARGE\mdseries  In cooperation with:} & {\TITELLARGE\mdseries \NTNU}\\
\tabularnewline
{\TITELLARGE\mdseries  Supervisor:} & {\TITELLARGE\mdseries \BETREUER}
\vspace{1.5cm}\tabularnewline



{\TITELLARGE\mdseries   Semester:} & {\TITELLARGE\mdseries \SEMESTER}\\
   \vspace{1.5cm} %% <-- Change this figure to increase the distance
                  %%     between the two elements. Remember a blank line

\end{tabular}

   \TITELnormalsize\mdseries \ORT \TAG. \MONAT\ \JAHR
\end{center}
%\endgroup  %% <- `\begingroup` not defined, commented out
\end{document}

enter image description here

|improve this answer|||||
  • but how do I get a space between "Semester: Wintersemester 2016/17" and "Entenhausen, 28.Febrauary 2017" again? – kaefermarie Oct 25 '16 at 7:43
  • @kaefermarie Just increase the last \vspace{1cm}to whatever you want. Be aware that your friends template is not well written. – Sveinung Oct 25 '16 at 8:21
  • I tried increasing the last \vspace{1cm} but it does not work... btw: how do you make the \vspace look like in your comment? – kaefermarie Oct 25 '16 at 8:35
  • @kaefermarie If I change the vspace{1cm} to vspace{1.5cm} and a blank line after it (or the \par-command), it works. The blank line had disappeared in the reformatting. You get the shadow behind the command if you enclose it in accents, i.e. one "`" on each side (not the "). – Sveinung Oct 25 '16 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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