如何取得 LaTeX 文章類的標題頁?

如何取得 LaTeX 文章類的標題頁?

可能的重複:
如何讓 \maketitle 使用文章類別建立單獨的標題頁?

我試圖將我的 LaTeX 文件中的標題頁和摘要垂直居中(就像report課堂上所做的那樣)。我現在正在使用該類別article。本質上我想要的是report沒有章節的課程,只有章節和小節等。

答案1

使用titlepage類別選項。

\documentclass[titlepage]{article}

\usepackage{lipsum}

\begin{document}

\title{(title)}
\author{(author)}
\maketitle

\begin{abstract}
\lipsum[1]
\end{abstract}

\lipsum[1]

\end{document}

答案2

預設情況下,節級編號定義在report.cls作為

\renewcommand \thesection {\thechapter.\@arabic\c@section}

它在節號前面加上\thechapter..其他較低層級的切片命令遵循類似的層次結構。因此,您可以只使用report文件類別並使用\chapter以下命令從(所有)較低層級的分段命令(如\section\subsection)中刪除編號

\renewcommand{\thesection}{\arabic{section}}

其他與章節相關的可能也需要重新定義,儘管這在技術上不是必要的。例如,\theequation\thefigure計數器\thetable值的所有條件chapter,僅在其前面添加\thechapter.if \c@chapter>\z@(chapter計數器大於零,僅從0的第一個符號開始遞增\chapter)。無論如何,為了完整性:

\renewcommand{\theequation}{\arabic{equation}}
\renewcommand{\thefigure}{\arabic{figure}}
\renewcommand{\thetable}{\arabic{table}}

這是一個最小的範例(沒有任何特殊的),僅顯示剖面結構:

在此輸入影像描述

\documentclass{report}
\usepackage{lipsum}% http://ctan.org/pkg/lipsum
\author{A.\ Nonymous} \title{My title} \date{\today}
\renewcommand{\thesection}{\arabic{section}}%
\begin{document}
\maketitle
\tableofcontents
\section{First section} \lipsum[1]
\subsection{First subection} \lipsum[2]
\subsection{Second subsection} \lipsum[3]
\subsubsection{First subsubsection} \lipsum[4]
\section{Second section} \lipsum[5]
\end{document}

相關內容