How to get rid of zeros in the section numbering in LATEX report document class?

六月ゝ 毕业季﹏ 提交于 2019-12-10 12:58:22

问题


So I'm writing a report using Latex and the document class I am using is report: \documentclass[a4paper]{report}

But for some reason the section numbering is written so that it is preceded with "0.", for example it looks like:

0.1 Introduction

0.2 Theory

0.3 Experimental Method

and so on.

Can somebody help me get rid of those zeros so that it appears how it is supposed to be?

Any help is very appreciated, thanks.


回答1:


report assumes you'll be using \chapters 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}

to remove any reference of \chapters, or add

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

to your document preamble.

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).



来源:https://stackoverflow.com/questions/26957751/how-to-get-rid-of-zeros-in-the-section-numbering-in-latex-report-document-class

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!