
我試圖將我的 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}