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.

This question asks how to align titlepage elements to the right. I was trying out a possible an answer to it when to my surprise, my solution almost worked. (I was expecting success or abject failure.) The code

document\documentclass[notitlepage]{article}
\title{\hfill{}Title}
\author{\hfill{}Author}
\date{\hfill{}Date}

\begin{document}
    \maketitle
\end{document}

sets the title and date flush right as I'd hoped. However, 'Author' is set centred, as though I'd not put in the \hfill at all. This surprised me---I'd have expected my idea to work for all three fields of the title page or none.

Why does \author behave differently in conjunction with \hfill in \maketitle than do \title and \date?

share|improve this question
add comment

1 Answer

up vote 7 down vote accepted

The default \maketitle command puts the author field inside a centered tabular environment, but not the title or date. Don’t ask me why. You can customize the command with the titling package. See this thread for info on using it to right-align a title.

share|improve this answer
    
Well, that's odd. Thanks. (The question that you linked to is the one that caused me to stumble on the behaviour---I linked to it in my question.) –  vanden Aug 7 '10 at 5:04
3  
Tabular environment? Eewww- that's like table-based design on websites –  Sharpie Aug 7 '10 at 5:38
1  
Well, its the best way to get the layout that the standard author field results in –  Joseph Wright Aug 7 '10 at 5:47
1  
In the argument of \author, two ore more authors are separated by the \and command - therefore the use the tabular environment. (Although there may be better solutions to acchieve the desired layout.) –  lockstep Aug 7 '10 at 10:17
add comment

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.