4

I have a few problems whilst creating my title page.

  1. How would italicize just the email, course, supervisor etc., and not the actual text itself?

  2. How would I shift the Email: <myemail>, Course: <course name>, Supervisor: <supervisor name> etc. to the left? I tried using the flushleft command but it can't seem to work.

  3. How would I shift the date right below my name? It does not work when I move the \date command below my name.

I'm trying to follow the style in this:

enter image description here

Currently my code is as follows:

\documentclass[11pt,a4paper]{report}
\usepackage{amsmath,amsfonts}


\begin{document}

\title{\bf TitleTitleTitleTitleTitleTitleTitle}
\author{My nameMy nameMy nameMy name\\
\\
\it {Email}: \texttt{123@myemail.com}\\
\it {Course}: Course Name\\
\it {Supervisor}: Professor Name\\
\\
Department of engineering
}
\date{\today}
\maketitle

\end{document}
Gary
  • 2,033

3 Answers3

5

The reason you're getting the italics with the wrong scope is that you are using \it incorrectly, since it is a switch and not a command that takes an argument. Independently, however, you shouldn't use such commands at all, as they are deprecated and have been replaced with better commands. See Will two-letter font style commands (\bf , \it , …) ever be resurrected in LaTeX? for some discussion.

Here's a solution to your problem using the titling package, and defining a command to set the variable information in the title page.

\documentclass[11pt,a4paper]{report}
\usepackage{amsmath,amsfonts}
\usepackage{titling} % for useful adjustments to the titles
\usepackage{url} % for simple url formatting
% command to make the course info
\makeatletter
\newcommand{\myinfo}[2]{
  \gdef\@myinfo{%
  \begin{tabular}{ll}
  \textit{E-mail:} & \url{myemail@email.edu}\\
  \textit{Course:} & #2\\
  \textit{Professor:} & #1
  \end{tabular}
  \par\vspace{12pt}
  \textsc{Department of Statistics, Stanford University}}
}
% add the extra information after the date
\postdate{\par\vspace{12pt}\@myinfo\end{center}}
\makeatother

\title{\textbf{Stochastic Processes}}
\author{My Name}
\myinfo{Prof. Smith}{STAT 801} % provide course and prof info
\date{\today}

\begin{document}

\maketitle

\end{document}

output of code

Alan Munn
  • 218,180
  • Thanks Alan! Especially helpful about the pointers regarding the italic and bold text. – Gary Feb 25 '12 at 20:47
3

It seems like you're trying to bend \maketitle in a really obscure way. I probably wouldn't go about doing this, as it seems like it's a bit more trouble than it's worth.

I'd suggest using a custom titlepage environment, like so:

\documentclass[11pt,a4paper]{report}
\usepackage{array}% http://ctan.org/pkg/array

\begin{document}
\begin{titlepage}
\begin{center}
  {\Large\bfseries My Super Awesome Thesis}\\
  %
  \vspace{2\baselineskip}
  %
  My Name\\
  \today\\
  %
  \vspace{2\baselineskip}
  %
  \begin{tabular}{@{}>{\itshape}rl@{}}
    Email:      & {\ttfamily your@email.com} \\
    Course:     & Course Title               \\
    Supervisor: & Professor's Name
  \end{tabular}
\end{center}
\end{titlepage}
\end{document}

The above MWE renders like so:

Rendering of MWE

Obviously you can adjust and tweak it to whatever you see fit. :)

PS: The LaTeX WikiBook also has an informative and fun section on creating custom title pages. See here: http://en.wikibooks.org/wiki/LaTeX/Title_Creation

user2473
  • 3,108
1

You could also use \makebox[<width>][<l|r|c>]{<text>} to place the text in a box of the appropriate width. The second parameter determines the alignment of <text> as left, right, or center.

enter image description here

A simple change to set the PropertyName be [r] aligned with

\newcommand*{\PropertyName}[1]{\makebox[\widthof{Supervisor:}][r]{#1}}

yields:

enter image description here

The place the date I used \today to have it here you want it, and set the \date{} to be empty so nothing gets printed at the bottom.

Code:

\documentclass[11pt,a4paper]{report}
\usepackage{amsmath,amsfonts}
\usepackage{calc}

\newcommand{\PropertyName}[1]{\makebox[\widthof{Supervisor:}][l]{#1}}% \newcommand{\PropertyValue}[1]{\makebox[\widthof{\textit{Professor Name:}}][l]{\textit{#1}}}% \begin{document}

\title{\bf TitleTitleTitleTitleTitleTitleTitle} \author{My nameMy nameMy nameMy name\ \today\ \ \PropertyName{Email:} \PropertyValue{\texttt{123@myemail.com}}\ \PropertyName{Course:} \PropertyValue{Course Name}\ \PropertyName{Supervisor:} \PropertyValue{Professor Name}\ \ Department of engineering \date{} } \maketitle

\end{document}

Peter Grill
  • 223,288