![将公司名称添加到 \maketitle](https://linux22.com/image/358297/%E5%B0%86%E5%85%AC%E5%8F%B8%E5%90%8D%E7%A7%B0%E6%B7%BB%E5%8A%A0%E5%88%B0%20%5Cmaketitle.png)
如何将我的公司名称添加到生成的标题中\maketitle
?示例是这里。
答案1
\@maketitle
通过添加的内容来快速而肮脏地破解命令\@company
,其\company
设置方式与对\title
等的 操作相同。
\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}