Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I am trying to make a title page for a report, and everything comes out great, except for the one line (Lecturer:John Doe) that does not want to centre properly. My code:

\title{ 
\normalfont \normalsize 
\textsc{Some place} \\    [25pt] 
\horrule{0.5pt} \\[0.4cm] 
\huge Assignment \\ 
\horrule{2pt} \\[0.5cm]  
Lecturer: John Doe
\newline
{\Huge 2014}
\date{}
}
share|improve this question

2 Answers 2

up vote 1 down vote accepted

Adding one line of horrule of 0pt, right below the John Doe, solves the problem. Since the OP did not provide the macro of horrule, this solution assumes it was a horizontal line with a certain width, as displayed below

\newcommand{\horrule}[1]{\noindent\rule{\linewidth}{#1}}

After this is added, the not centering phenomena was observed and therefore, the proposed solution makes it centered.

enter image description here

Code

\documentclass{article}
\usepackage[margin=1cm]{geometry}
\newcommand{\horrule}[1]{\noindent\rule{\linewidth}{#1}}

\title{
\normalfont \normalsize 
\textsc{Some place} \\    [25pt] 
\horrule{0.5pt} \\[0.4cm] 
\huge Assignment \\ 
\horrule{2pt} \\ [0.5cm] 
Lecturer: John Doe
\horrule{0pt}   % <--- Here
\newline
{\Huge 2014}
\date{}
}
\begin{document}
\maketitle

\end{document}
share|improve this answer
    
Excellent, thank you for the quick but thorough answer. –  Jack Taylor May 18 at 8:02
    
does OP stand for Optional Package? –  Jack Taylor Jun 20 at 6:14
    
Nay, OP=Original Poster. –  Jesse Jun 20 at 7:19
    
Ok makes more sence thanks. –  Jack Taylor Jun 20 at 7:56
\documentclass{report}
\title{
\normalfont \normalsize
\textsc{Some place} \\    [25pt]
\hrule 
\vspace{0.4cm}
\huge Assignment \\[0.4cm]
\hrule 
\vspace{0.5cm}
Lecturer: John Doe\\
\Huge 2014
}
\author{}
\date{}
\begin{document}
  \maketitle
\end{document}

enter image description here

With titlepage environment:

\documentclass{report}

\begin{document}
  \begin{titlepage}
    \centering
    \vspace*{\stretch{1}}
    {\scshape Some place \par}
%    \par
    \vspace{1em}
    \rule{\linewidth}{0.5pt}
    \par
    \vspace{0.4cm}
    {\huge Assignment \par}
%    \par
    \vspace{0.4cm}
    \rule{\linewidth}{2pt}
    \par
    \vspace{0.5cm}
    {\huge Lecturer: John Doe
    \par
    2014 \par
    }
    \vspace{\stretch{2}}
  \end{titlepage}
\end{document}

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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