1

My tex

\begin{titlepage}
\maketitle

\begin{flushright} \large
\begin{align}
\emph{Supervisor:} & \emph{Intsructor:} \\
Prof. Sami &  M.Sc. Tech. Henri
\end{align}
\end{flushright}


% Bottom of the page
\vfill
{\large \today}
\end{titlepage}

I get

enter image description here

where is no align.

How can you get aligns there such that Supervisor is on the left-hand-side and Instructor on the right-hand-side?

6
  • 3
    Don't use align for aligning text. align is for math. Use a table.
    – nickpapior
    Commented Dec 2, 2013 at 12:29
  • @zeroth You can also use minipages
    – Kartik
    Commented Dec 2, 2013 at 12:31
  • @Kartik, sure, but a tabular is a non-float object and then you don't need to specify sizes of the block. In my opinion much easier, at least to maintain. :)
    – nickpapior
    Commented Dec 2, 2013 at 12:33
  • @zeroth minipage doesn't flow, but it is what it says it it, a page on its own, a bit more proper would be \parbox. However, I agree that tabular is the right choice here.
    – yo'
    Commented Dec 2, 2013 at 12:34
  • @tohecz, I didn't say that minipage was a float, I can now see that it could be implied from my comment. It was a general comment. I just saw no reason for anything other than a tabular.
    – nickpapior
    Commented Dec 2, 2013 at 12:36

3 Answers 3

1

Can be also done with the tabbing environment.

\documentclass{article}
\usepackage{tabbing}
\begin{document}
\begin{titlepage}
\begin{tabbing}
\hspace{7em} \= \\ %defines length of first tabular with \hspace
Supervisor: \> Instructor: \\
Prof. Sami \> M.Sc. Tecg. Henri \\
\end{tabbing}

\begin{tabbing}
\hspace{15em} \= \\ % increased the length to 15em
Supervisor: \> Instructor: \\
Prof. Sami \> M.Sc. Tecg. Henri \\
\end{tabbing}

\begin{tabbing}
\hspace{15em} \= \\
Supervisor: \> Instructor: \\
Prof. Sami Sami Sami Sami Sami \> M.Sc. Tecg. Henri \\
\end{tabbing}

\end{titlepage}
\end{document}
2
  • Some bug here when you have long name: dl.dropboxusercontent.com/u/62073194/… Names are over each other. I tried to solve it by having two tabs by \>\> but it gives an error. Commented Dec 2, 2013 at 17:07
  • Edited it with some commentary. You set the length of the first tab with the \hspace{length} command. If you have 3 tabs you would have to define the length for the second also and so on.
    – Ulle
    Commented Dec 3, 2013 at 8:17
3

I would probably do something like this (if you wanted Instructor right-aligned use {lr} in the tabular definition):

\begin{flushright} \large
\begin{tabular}{lc}
\emph{Supervisor:} & \emph{Instructor:} \\
Prof. Sami &  M.Sc. Tech. Henri
\end{tabular}

\begin{tabular}{lc}
\emph{Supervisor:} & Prof. Sami \\
\emph{Instructor:} & M.Sc. Tech. Henri
\end{tabular}

\begin{tabular}{lcl}
\emph{Supervisor} & : & Prof. Sami \\
\emph{Instructor} & : & M.Sc. Tech. Henri
\end{tabular}
\end{flushright}

Which yields:

enter image description here

You can always play with the spacing between columns to get the wanted spacing.

1

Align is used for mathematical equations. This is not a mathematical equation. You should not use the align environment here. You can try to do this:

\begin{titlepage}
\maketitle
{\large
\begin{minipage}{0.4\textwidth}
\begin{flushleft}
\emph{Supervisor:}
Prof. Sami
\end{flushleft}
\end{minipage}
\hfill
\begin{minipage}{0.4\textwidth}
\begin{flushright}
\emph{Instructor:}
M.Sc. Tech. Henri
\end{flushright}
\end{minipage}
}
\end{titlepage}
2
  • There is some compiling errors in this code. Commented Dec 2, 2013 at 12:38
  • @Masi Try it again now. There was some error which has been edited now.
    – Kartik
    Commented Dec 2, 2013 at 12:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .