[Tex/LaTex] Adding company name to \maketitle

titles

How can I add the name of my company to the title generated by \maketitle?
The example is here.

Best Answer

Quick and dirty hack of \@maketitle command by adding the content of \@company, which is set with \company as is done for \title etc.

\documentclass{article}

\makeatletter

\newcommand{\company}[1]{\gdef\@company{#1}}
\def\@maketitle{%
  \newpage
  \null
  \vskip 2em%
  \begin{center}%
  \let \footnote \thanks
    {\LARGE \@title \par}%
    \vskip 1.5em%
    \@ifundefined{@company}{}{%
      {\Large \sffamily \@company \par}%
      \vskip 1em%
      \let\@company\relax%
    }%
    {\large
      \lineskip .5em%
      \begin{tabular}[t]{c}%
        \@author
      \end{tabular}\par}%
    \vskip 1em%
    {\large \@date}%
  \end{center}%
  \par
  \vskip 1.5em}

\makeatother

\title{Theory on Brontosaurs}
\company{Blackhole Generators Ltd. \\ CERN, Geneva}

\author{Ann Elk (Misses)}
\begin{document}

\maketitle
\end{document}

enter image description here