简体   繁体   English

乳胶目录中的造型不一致?

[英]Inconsistent styling in latex table of contents?

I'm wondering why in my toc shown below, I have different dots style in the most detailed subsections ? 我想知道为什么在下面显示的toc中,我在最详细的小节中有不同的圆点样式?

替代文字

All I've used is: 我所用的只是:

\setcounter{secnumdepth}{5}
\setcounter{tocdepth}{5}
....
\tableofcontents

How can I create a consistent style at all levels of depth: section, subsection, etc? 如何在各个深度创建一致的样式:section,subsection等?

At least in the article class, they already have a standard style, but to also get dot leaders for sections like the ones in subsections, just use this: 至少在文章类中,他们已经有了一个标准的样式,但是为了获得像小节中的那些部分的点头,只需使用:

\usepackage{tocloft}
\renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}}

It really depends on the document class you are using; 这实际上取决于您使用的文档类; book, article etc have a preset layout for the TOC. 书籍,文章等都有TOC的预设布局。

Since you said you are writing your Thesis, is it possible that you are using a style given by the college/university? 既然你说你正在写论文,你有可能使用学院/大学给出的风格吗?

There is still a way to change it. 还有一种方法可以改变它。 You can use the package tocloft, 你可以使用包tocloft,

\usepackage{tocloft}

which has a method called \\@dotsep to change the amount of space between the dots. 它有一个名为\\ @dotsep的方法来改变点之间的空间量。 Although I do not know if it will work in this case as you only define it once for the whole TOC and if it is relative to what you have it may just increase your dots relative to the way it is already placed. 虽然我不知道它是否适用于这种情况,因为你只为整个TOC定义一次,如果它与你所拥有的相对,它可能只是相对于它已经放置的方式增加你的点。

But here is the code anyways, 但无论如何这里是代码,

\makeatletter \renewcommand{\@dotsep}{4.5} \makeatother
\tableofcontents

It must be placed before your toc command and 4.5 represents the distance. 它必须放在toc命令之前,4.5表示距离。

But like I said this depends on your document class and its style class. 但就像我说的那样取决于你的文档类及其样式类。 Here is the link to the package documentation tocloft.pdf . 这是包文档tocloft.pdf的链接。 There are more customizations available which may work for you better. 有更多自定义可供您使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM