This package is essentially a replacement - partial or total - for the LATEX macros related with sections - namely titles, headers and contents. The goal is to provide new features unavailable in current LATEX; if you just want a more friendly interface than that of standard LATEX but without changing the way LATEX works you may consider using fancyhdr, by Piet van Oostrum, sectsty, by Rowland McDonnell, and tocloft, by Peter Wilson, which you can make pretty things with.
这个宏包本质上是为了部分或全部替换LATEX中与“章节”相关的宏包,包括:标题、页眉和内容。宏包的目的是提供现有 LATEX 不具备的新特性;如果你只是需要一个比标准 LATEX 更友好的接口,同时又不想改变 LATEX 的工作方式,那么你可以考虑使用 Piet van Oostrum 的 fancyhdr宏包, Rowland McDonnellis的sectsty宏包,以及 Peter Wilson 的tocloft宏包,使用这些宏包,你可以产生相当漂亮的文档[1]。
Some of the new features provided are:
本宏包的一些新特性包括:
- Different classes and "shapes" of titles, with tools for very fancy formats. You can define different formats for left and right pages, or numbered and unnumbered titles, measure the width of the title, add a new section level, use graphics, and many more. The Appendix shows a good deal of examples, so jump forward right now!
不同类别和“形状”的标题,以及精美的格式工具。您可以为左侧和右侧页面定义不同的格式、为标题加上或去除编号、测量标题的宽度、添加新的章节级别、使用图形……附录展示了大量的例子,不妨现在就欣赏一下! - Headers and footers defined with no ...mark intermediates, and perhaps containing top, first and bot marks at the same time. Top marks correctly synchronized with titles, without incompatibilities with the float mechanism. Decorative elements easily added, including picture environments.
不需要使用形如 ...mark 的中间形式来定义页眉和页脚以及顶部、首条和底部的标注。顶部标记可以与标题正确同步,而且不会和浮动体结构产生冲突。可以很轻松的添加装饰元素,甚至是图片环境。 - Pretty free form contents, with the possibility of grouping entries of different levels in a paragraph or changing the format of entries in the middle of a document.
形式自由的内容,可以将段落中不同级别的条目分组或更改文档中间的条目格式。
Titlesec works with the standard classes and with many others, including the AMS ones, and it runs smoothly with hyperref[2]. Unfortunately, it is not compatible with memoir, which provides its own tools with a limited subset of the features available in titlesec.
Titlesec与标准文档类和许多其他类(包括AMS类)一起工作,它与hyperref宏包无缝结合。不幸的是,它与memoir宏包不兼容,后者提供了自己的工具,但Titlesec中提供的功能有限。
As usual, load the package in the standard way with \usepackage
. Then, redefine the sectioning commands with the simple, predefined settings (see section \Quick Reference") or with the provided commands if you want more elaborate formats (see section \Advanced Interface.") In the latter case, you only need to redefine the commands you’ll use. Both methods are available at the same time, but because \part
is usually implemented in a non-standard way, it remains untouched by the simple settings and should be changed with the help of the \Advanced Interface."
通常,可以按照标准的方式加载这个宏包,即使用\usepackage
命令。然后,使用简单的预定义设置(请参照 “快速指南”)重新定义节命令,或者使用提供的命令来定义你需要的更加详细的格式(参照 “高级接口”)。在第二种情况下,你只需要重新定义你要使用的命令。两种方法可以同时使用,但是因为 \part
通常是以一种非标准的方式实现的,它不会受到简单设置的影响,如果需要,可以借助于 “高级接口” 来进行调整。
-
Since the sectioning commands are rewritten, their behaviour could be somewhat different in some cases. ↩
-
However, be aware the AMS classes reimplement the original internal commands. These changes will be lost here. The compatibility with hyperref has been tested with dvips, dvipdfm and pdftex but it is an unsupported feature. Please, check your version of hyperref is compatible with titlesec. ↩