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.

I am looking to have the title left justified along with the name of the author and teacher and the date. I have managed to get it left justified but the name is being indented, this is not what I want. Here is a MWE.

\documentclass[12pt,letterpaper]{article}
\usepackage{lipsum}
\title{TITLE}

\author{
Name \textsc{Last name} \\ 
Mr. \textsc{Name}
\hspace*{-\tabcolsep}}

\begin{document}

\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup

\lipsum[1-10]
\end{document}
share|improve this question
    
Isn't easier to use the environment titlepage instead of redefining maketitle? BTW: \author is printed inside a tabular environment with the row c. –  Marco Daniel Apr 14 '13 at 16:51
    
@MarcoDaniel Doesn't titlepage make a new page? I want that information on the first page along with the essay. –  Jeel Shah Apr 14 '13 at 16:52
    
Do you need to use \maketitle? If you have a one column article I think there would be not much harm if you write what you want without using \maketitle... –  e-birk Apr 14 '13 at 16:53

4 Answers 4

up vote 5 down vote accepted

The titling package is specifically designed to alter the output of \maketitle. Its package documentation provides the standard definitions of \maketitle on page 2, so we just need to alter that.

Note that \and is the LaTeX way of introducing several authors. I also added \thanks author footnotes just to demonstrate that they work. In order for this solution to look 100% like your code, you’ll have to add a font size command like \large to \preauthor.

\documentclass[12pt]{article}
\usepackage{titling}

%% Standard `article' settings:
%\pretitle{\begin{center}\LARGE}
%\posttitle{\par\end{center}\vskip 0.5em}
%\preauthor{\begin{center}
%\large \lineskip 0.5em%
%\begin{tabular}[t]{c}}
%\postauthor{\end{tabular}\par\end{center}}
%\predate{\begin{center}\large}
%\postdate{\par\end{center}}

%% Adapted settings:
\pretitle{\begin{flushleft}\LARGE}
\posttitle{\par\end{flushleft}\vskip 0.5em}
\preauthor{\begin{flushleft}}
\postauthor{\end{flushleft}}
\predate{\begin{flushleft}\large}
\postdate{\par\end{flushleft}}

% Change \and to \newline (originally, it basically starts a new column
\renewcommand{\and}{\newline}

\title{TITLE}
\author{
Name \textsc{Last name}\thanks{Foo} \and Mr. \textsc{Name}\thanks{Bar}
}

\usepackage[paperheight=12cm]{geometry}% just for the demo
\begin{document}
\maketitle

Hello World.
\end{document}

output

share|improve this answer
    
I think some % characters are missing –  egreg Apr 14 '13 at 18:10
    
@egreg Where? filler –  doncherry Apr 14 '13 at 18:20
    
\author{% and also at the end of the author list. –  egreg Apr 14 '13 at 18:39
    
@egreg I was considering that, but it doesn’t seem to result in any difference here? This does make sense to me – usually, spaces at the beginning and end of a paragraph don’t matter either. –  doncherry Apr 14 '13 at 18:48
    
This is by chance, precisely because you're doing \begin{flushleft}. –  egreg Apr 14 '13 at 19:45

You can use the titling package for formatting the title. Alternatively, you can redefine the \maketitle command from scratch to get what you want; here is an example:

enter image description here

\documentclass{article}

\title{An outline of intellectual rubbish}
\author{Bertrand Russell}

\makeatletter
\def\@maketitle{%
\newpage
\null
\vskip 2em%
\begin{flushleft}%
\let \footnote \thanks
{\LARGE \@title \par}%
\vskip 1.5em%
{\large
\lineskip .5em%
\noindent
\@author\par}
\vskip 1em%
{\large \@date}%
\end{flushleft}
\par
\vskip 1.5em}
\makeatother

\begin{document}
\maketitle
\end{document}
share|improve this answer
1  
I added an answer using titling. –  doncherry Apr 14 '13 at 17:14

The command \author is executed in a tabular environment with column type c

So you can patch the definition to change the tabular by etoolbox:

\documentclass[12pt,letterpaper]{article}
\usepackage{lipsum}
\usepackage{array}
\usepackage{etoolbox}
\makeatletter
\patchcmd{\@maketitle}{\begin{tabular}[t]{c}}{\begin{tabular}[t]{@{}l}}{}{}
\patchcmd{\@maketitle}{center}{flushleft}{}{}%patches \begin{center}
\patchcmd{\@maketitle}{center}{flushleft}{}{}%patches \end{center}
\makeatother
\title{TITLE}

\author{%
Name \textsc{Last name} \\ 
Mr. \textsc{Name}
}

\begin{document}
\maketitle

\lipsum[1-10]
\end{document}

However a simple usage of

\begin{flushleft}
\Large TITLE \\[2\baselineskip]

\large Name \textsc{Last name} \\ 
Mr. \textsc{Name} \\[1\baselineskip]

\today
\end{flushleft}

works too.

share|improve this answer

For example:

\documentclass[12pt,letterpaper]{article}
\usepackage{lipsum}
\title{TITLE}

%\author{
%Name \textsc{Last name} \\ 
%Mr. \textsc{Name}
%\hspace*{-\tabcolsep}}


\makeatletter


\renewcommand\maketitle{\begin{titlepage}%
  \let\footnotesize\small
  \let\footnoterule\relax
  \let \footnote \thanks
  \null\vfil
  \vskip 60\p@
  \begin{center}%
    {\LARGE \@title \par}%
    \vskip 3em%
    {\large
     \lineskip .75em%
%     \begin{tabular}[t]{c}%
     \begin{tabular}[t]{@{}l}%
        \@author
      \end{tabular}\par}%
      \vskip 1.5em%
    {\large \@date \par}%       % Set date in \large size.
  \end{center}\par
  \@thanks
  \vfil\null
  \end{titlepage}%
}  
 \makeatother


\author{%
Name \textsc{Last name}\\ 
%\hspace*{-2cm}
Mr. \textsc{Name}
%\hspace*{-\tabcolsep}
}

\begin{document}

\begingroup
\let\center\flushleft
\let\endcenter\endflushleft
\maketitle
\endgroup

\lipsum[1-10]
\end{document}`
share|improve this answer
    
You completely redefine \maketitle. Then you can replace center by flushleft and you dont need: \let\center\flushleft\let\endcenter\endflushleft –  Marco Daniel Apr 14 '13 at 17:22
    
@Marco Daniel: Certainly. It was only an illustration, where the indentation of \@author is controlled. –  Kola B. Apr 14 '13 at 17:24

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.