% title
\makeatletter
% \newcommand{\subtitle}[1]{\def \@subtitle {#1}}
% \subtitle{}
\gdef\@subtitle{}
\def\subtitle#1{\gdef\@subtitle{#1}}
\subtitle{}
\def \maketitle {%
% \begin{titlepage}
% ~\vfill
\begin{center}
{\Large \@title} \\
\ifx \@subtitle \@empty
\relax
\else
\vspace{0.5em}
{\large \@subtitle} \\
\fi
\vspace{1em}
\ifx @author \@empty
\relax
\else
\@author \\
\vspace{0.5in}
\fi
\@date
\end{center}
% \vfill
% \end{titlepage}
}
\makeatother
%opening
\title{this is the title}
\subtitle{this is the subtitle}
\author{john smith}
\date{ }
\begin{document}
\maketitle
the contents
\end{document}
给documentclass article的文档加subtitle
最新推荐文章于 2023-03-31 20:25:17 发布
本文档通过一个简单的LaTeX示例介绍了如何设置文档标题、副标题、作者及日期等基本信息,并展示了文档的基本结构。该示例适用于初学者了解LaTeX文档的编写方式。
332

被折叠的 条评论
为什么被折叠?



