2

I have some problem with my title page. I would like to use the title page of the university of bonn (https://www.mathematics.uni-bonn.de/studium/bachelor/pruefungen/bachelorarbeit). But it isn't working, a friend of mine is using it without problems.

So I have one document named BA_titleseite.sty:

\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{BA_Titelseite}[2010/04/25]

%%%%%%%%%%%%%%%%
% Titelseite:
%%%%%%%%%%%%%%%%
\newcommand*{\betreuer}[1]{\def\@betreuer{#1}}
\betreuer{}
\newcommand*{\zweitgutachter}[1]{\def\@zweitgutachter{#1}}
\zweitgutachter{}
\newcommand*{\ausarbeitungstyp}[1]{\def\@ausarbeitungstyp{#1}}
\ausarbeitungstyp{}
\newcommand*{\geburtsdatum}[1]{\def\@geburtsdatum{#1}}
\geburtsdatum{}
\newcommand*{\geburtsort}[1]{\def\@geburtsort{#1}}
\geburtsort{}
\newcommand*{\institut}[1]{\def\@institut{#1}}
\institut{}

\renewcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vfil

\begin{center}%

\parbox{10cm}{\centering\huge\bfseries \@title \par}\\
\vspace{1em}
{\Large
\vspace{1em}
\@author}\\
\vspace{1em}
Geboren am \@geburtsdatum \ in \@geburtsort\\
\vspace{1em}
{\large \@date}
\vspace{10em}

{\large \@ausarbeitungstyp}\\
\vspace{1em}
{\large \@betreuer}\\
\vspace{1em}
{\large \@zweitgutachter}\\
\vspace{1em}
\centerline{{\large\scshape \@institut}}
\vspace{10em}

\centerline{{\large\scshape Mathematisch-Naturwissenschaftliche Fakult\"at der}}
\vspace{1em}
\centerline{{\large\scshape Rheinischen Friedrich-Wilhelms-Universit\"at Bonn}}

\end{center}

\vfil\null
\clearpage
\thispagestyle{empty}\mbox{}
\clearpage
\pagenumbering{arabic}

\end{titlepage}%

  \setcounter{footnote}{0}%
  \global\let\maketitle\relax
  \global\let\@author\@empty
  \global\let\@date\@empty
  \global\let\@title\@empty
  \global\let\title\relax
  \global\let\author\relax
  \global\let\date\relax
  \global\let\and\relax
}
% END Titelseite

\endinput

So and if I want to use this title page in another document it dosent work. And here is what I did:

\documentclass[11pt, a4paper, german]{article}
\usepackage{color}
\usepackage{amsmath, amsfonts, amsthm,}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{mathrsfs}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amssymb}
\usepackage{pgfplots}
\usepackage{graphicx} 
\usepackage{array}
\pagestyle{headings}
\title{Bachelorarbeit}
\author{XY}
\usepackage{geometry}
\geometry{a4paper,left=40mm,right=30mm, top=2cm, bottom=2cm}
\usepackage{BA_Titelseite}
\date{Wintersemester 2018/2019}
\betreuer{YX}
\title{XY}
\ausarbeitungstyp{Bachelorarbeit Stochastik}
\pgfplotsset{compat=1.16}
\begin{document}
\maketitle
as
\end{document}

The error which I get is: there's no line here to end.

Maybe you have a clue to solve the problem.

  • your usepackage amsmaths etc ends on a , which looks not quite right also you can input äü and the like directly via your keyboard and you do not need to construct them yourself with utf8 encoding and german language support... – der bender Apr 4 '19 at 15:32
5

You need to give some text to the \zweitgutachter command (i.e., \zweitgutachter{Someone}).

The guilty part of the code is the line {\large \@zweitgutachter}\\. When \@zweitgutachter is empty this becomes only a \\ inside a center environment, which is equivalent to this:

\begin{center}
 \\
\end{center}

which throws the same error.

If you don't want a \zweitgutachter then you can change the style file a little bit to ignore if the field is empty. Replace the lines:

\vspace{1em}
{\large \@zweitgutachter}\\

by:

\if\relax\detokenize\expandafter{\@zweitgutachter}\relax
\else
  \vspace{1em}
  {\large \@zweitgutachter}\\
\fi
|improve this answer|||||

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.