TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just want to add my class and professor information to title. I don't want to use a page break.

I want title like this and right aligned:

Anthony Sample

Intro to Expos

Prof. Selinsky

Summary: Draft

How to achieve this? Any help is appreciated.



share|improve this question
Welcome to TeX.sx! Please add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. – Tobi Feb 12 '13 at 20:13
You could just add the information as part of \title in the following way: \title{\begin{tabular}{@{}r@{}} Anthony Sample \\ Intro to Expos \\ Prof.\ Selinsky \\ Summary: Draft \end{tabular}} and then \maketitle would print it as the "title." But this looks weird. Could you supply an image of the intended output? – Werner Feb 12 '13 at 20:24

Does this do what you want?

\title{\hfill Anthony Sample\\
\ \\
\hfill Intro to Expos\\
\ \\
\hfill Prof. Selinsky\\
\ \\
\hfill Summary: Draft}

The key ideas are:

  • You can put just about anything you want in \title{}.
  • Line breaks can be added with \\ (as in Werner's suggestion).
  • You need to put something on a line in order to add \\, so I use \ to add a hard space before \\ when I want to create a blank line.
  • \hfill tries to fill up as much space as possible. By putting it before the text on a line, it pushes the text all the way to the right.

The same points apply to \date{}, but \author{} seems to be less flexible.

share|improve this answer
Two or more consecutive linebreak `\\` should be avoided because TeX is not a typewriter. :-) – kiss my armpit Feb 13 '13 at 3:59
Yes, that's an ideal, and it's good. Fortunately, LaTeX is not designed to prevent compromises. (As for myself, I am a not a typesetter, but a(n academic) writer. I want to get the job done, and am willing to use kludges to do so, but I'm happy to learn more elegant methods when they are available (and are actually more elegant!).) – Mars Feb 14 '13 at 5:22

Your Answer


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.