如何消除LATEX报告文档类中的节编号中的零? [英] How to get rid of zeros in the section numbering in LATEX report document class?
问题描述
所以我正在使用Latex编写报告,而我正在使用的文档类是report: \ documentclass [a4paper] {report}
So I'm writing a report using Latex and the document class I am using is report: \documentclass[a4paper]{report}
但是由于某种原因,段编号被写成在其前面加上"0",例如,它看起来像:
But for some reason the section numbering is written so that it is preceded with "0.", for example it looks like:
0.1简介
0.2理论
0.3实验方法
以此类推.
有人可以帮我摆脱那些零,以便让它看起来像是应该的吗?
Can somebody help me get rid of those zeros so that it appears how it is supposed to be?
非常感谢您的帮助.
推荐答案
report
假定您将使用\chapter
作为主要部分.这样,所有分段单元都标记为相对于\chapter
计数器.具体来说,使用\thechapter.\arabic{section}
设置\section
计数器.要么使用
report
assumes you'll be using \chapter
s as your main sectional unit. As such, all sectional units are marked "relative" to the \chapter
counter. Specifically, \section
counters are set using \thechapter.\arabic{section}
. Either use
\documentclass[a4paper]{article}
删除任何\chapter
的引用,或添加
to remove any reference of \chapter
s, or add
\renewcommand{\thesection}{\arabic{section}}
到您的文档序言.
由于\title
的设置以及布局 可能不同,因此前者对实际输出的影响更大.后者只会删除\chapter
计数器,使其不再与每个\section
(以及较低级别的单元)一起打印.
The former would have greater impact on the actual output, as the setting of a \title
and possibly the layout may be different. The latter would just remove the \chapter
counter from being printed with every \section
(and lower-level section unit).
这篇关于如何消除LATEX报告文档类中的节编号中的零?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!