显示章节编号,但不显示节和小节编号

显示章节编号,但不显示节和小节编号

我的章节编号显示在文本中,但是我的节和小节编号被隐藏了,尽管编号出现在目录中。这很可能是由于我的设置不当,但我看不出问题所在。非常感谢任何帮助。

\documentclass[12pt]{report}

\renewcommand{\baselinestretch}{2} 
\usepackage[Conny]{fncychap}
\usepackage{titlesec}
\setcounter{secnumdepth}{4}
\setcounter{tocdepth}{4}


\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\setcounter{page}{1}
\tableofcontents
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Chapter name}

\section{Section name}

\subsection{Subsection name}

\end{document}

在此处输入图片描述

日志文件的内容:

This is pdfTeX, Version 3.14159265-2.6-1.40.16 (TeX Live 

2015/Debian) (preloaded format=pdflatex 2019.3.5)  25 AUG 2021 17:00
entering extended mode
 restricted \write18 enabled.
 %&-line parsing enabled.
**test1.tex
(./test1.tex
LaTeX2e <2016/02/01>
Babel <3.9q> and hyphenation patterns for 81 language(s) loaded.
(/usr/share/texlive/texmf-dist/tex/latex/base/report.cls
Document Class: report 2014/09/29 v1.4h Standard LaTeX document class
(/usr/share/texlive/texmf-dist/tex/latex/base/size12.clo
File: size12.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@chapter=\count80
\c@section=\count81
\c@subsection=\count82
\c@subsubsection=\count83
\c@paragraph=\count84
\c@subparagraph=\count85
\c@figure=\count86
\c@table=\count87
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
(/usr/share/texlive/texmf-dist/tex/latex/fncychap/fncychap.sty
Package: fncychap 2007/07/30 v1.34 LaTeX package (Revised chapters)
\RW=\skip43
\mylen=\skip44
\myhi=\skip45
\px=\skip46
\py=\skip47
\pyy=\skip48
\pxx=\skip49
)
(/usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.sty
Package: titlesec 2016/03/15 v2.10.1 Sectioning titles
\ttl@box=\box26
\beforetitleunit=\skip50
\aftertitleunit=\skip51
\ttl@plus=\dimen103
\ttl@minus=\dimen104
\ttl@toksa=\toks14
\titlewidth=\dimen105
\titlewidthlast=\dimen106
\titlewidthfirst=\dimen107
) (./test1.aux)
\openout1 = `test1.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 15.
LaTeX Font Info:    ... okay on input line 15.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 15.
LaTeX Font Info:    ... okay on input line 15.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 15.
LaTeX Font Info:    ... okay on input line 15.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 15.
LaTeX Font Info:    ... okay on input line 15.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 15.
LaTeX Font Info:    ... okay on input line 15.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 15.
LaTeX Font Info:    ... okay on input line 15.

(./test1.toc
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <12> on input line 2.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <8> on input line 2.
LaTeX Font Info:    External font `cmex10' loaded for size
(Font)              <6> on input line 2.
)
\tf@toc=\write3
\openout3 = `test1.toc'.

 [1


{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}]
Chapter 1.
[2

] (./test1.aux) ) 
Here is how much of TeX's memory you used:
 604 strings out of 493029
 6926 string characters out of 6136235
 61082 words of memory out of 5000000
 4204 multiletter control sequences out of 15000+600000
 8500 words of font info for 30 fonts, out of 8000000 for 9000
 1141 hyphenation exceptions out of 8191
 23i,4n,28p,142b,113s stack positions out of 5000i,500n,10000p,200000b,80000s
</usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/
cmbx12.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.
pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb>
Output written on test1.pdf (2 pages, 32158 bytes).
PDF statistics:
 23 PDF objects out of 1000 (max. 8388607)
 15 compressed objects within 1 object stream
 0 named destinations out of 1000 (max. 500000)
 1 words of extra memory for PDF output out of 10000 (max. 10000000)

相关内容