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 would like to have

  • Title flush left
  • Author flush right
  • Date flush right

How can I do this on the same line or on a shared line? I was hope to achieve the following:

Title Author Date shared line

This is as far as I got using xelatex:


\usepackage{titlesec, blindtext, color}


\title{Class Plan}

\section{Less is More}

There is one catch. I need this to work in my .emacs file. I would like the MACRO #+Title and #+Author to work without extra code in my org-mode file

share|improve this question
up vote 9 down vote accepted

The key is using boxes, in this case \parboxes (which allow for line breaks, as needed on the right) and putting them on the very left and right with \hfill in between.

Besides that, I wouldn't try to fix up \maketitle if I don't absolutely have to, but instead just create the title from scratch. To access the values of \author and \title, we can use the titling package.

The section titles can be done with a quick fix, too.

Here are a basic version and one that's closer to your image:


    \title{Class Plan}



\renewcommand{\thesection}{Week \arabic{section}\hspace{1em}|}


Basic version: \bigskip


\bigskip Fancier version: \bigskip


\section{Less is More}



As egreg said, just redefine \maketitle as a whole and put this in a .sty file:


I'm not familiar with emacs at all, so I can't help you with that, if the package solution is not what you're looking for. In that case, I would probably recommend asking a separate question about what you're trying to do because it seems to be independent from the styling of the title (obeying our one-issue-per-question guideline).

Some resources on writing a package (= .sty file):

share|improve this answer
I did mark your answer as correct, but perhaps it was premature. It did indeed answer my question, however, I did not make my question clear enough. My ultimate goal is to include all of this in my .emacs file for a xelatex export. I was hoping to keep my solution above the \begin{document}, but your solution involves code below this point. Do you know how I could solve this? That is why I wanted to edit the \maketitle and I think in this case, I have to! – macmadness86 Nov 5 '12 at 18:47
@macmadness86 The right place for that kind of code is not the .emacs file, but rather a personal .sty file. Just put the relevant code in a redefinition of \maketitle, inside macmadness.sty and do \usepackage{macmadness} after storing the package in one of the canonical places (~/Library/texmf/tex/latex/macmadness on Mac OS X with MacTeX). – egreg Nov 5 '12 at 19:05
@macmadness86: I agree with egreg, and see my edit. – doncherry Nov 5 '12 at 19:16
@doncherry i meant between tex live installs. so that i can compile a file on any computer without needed to install a style file first. You make it sound fantastic though. You should go into sty file marketing :) – macmadness86 Nov 5 '12 at 19:31
@macmadness86 "Installing" a style file is as easy as putting it in the directory of the mydocument.tex file that you're compiling. If you want to make it as available on a system as any other .sty file, you'll have to put it in your texmf tree, as egreg indicated. – doncherry Nov 5 '12 at 19:34

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.