[Tex/LaTex] Some issues with title page

positioningtitles

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}

Best Answer

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

Related Question