Ceci est une ancienne révision du document !
Welcome to another in this series of explorations of the Tex / Latex packages available at CTAN.ORG. There are eight topics in the H section, two are languages, Hungarian and Hebrew. The others are headings, humanities, hyper, and three are about hyphenation. Normally headings are predefined by the document class being used. Often the default heading formatting is acceptable to the writer or the publisher. As with Latex document classes, in major word processors there are predefined heading styles (and other styles) to use in documents. In my experience most users do not use styles. They format each bit of text as it is typed. This leads to inconsistencies in documents. It also leads to poorly designed documents. Tex/Latex avoids these inconsistencies by using predefined heading levels. Because the heading levels are predefined, the document will be consistent and will be reasonably well designed. As should be obvious, changing the font family used in a document will change the look of all the headings as well as the body text. However changing the font will not affect the size relationships between the various levels of text in a Latex document. I tested many of the heading packages available at CTAN.. The following worked well in my TexLive 2024 installation and look like fun to work with.
The quotchap package (code shown right) redefines the chapter and chapter* commands to produce fancy chapter headings (see image). It also allows for adding quotations at the beginning of each chapter if desired. The documentation is quite short, only six pages, most of which describes the coding of the package. There is one example of implementation at the user level which is easy to follow. There is also a sample four-page document available in the package on ctan.org. This package was last updated in 2020. (shown right) The fncychap package has eight built-in (and named) chapter heading styles. One command in the preamble is all that is required to use any of these eight styles. Since these are chapter headings, the book document class needs to be used. Other document classes do not have chapter headings. Using the book document class automatically means double-sided printed and each chapter will start on a right-hand page. The eleven page documentation includes examples of seven of the built-in styles. There are also some instructions about how to modify the macro if you desire. (shown right) If you wish to have control over the way sections, subsections, etc., are numbered then use the secnum package. The documentation for this package is ten pages long and has some examples of its use. The documentation is written using the package which helps clarify some of the instructions.
The number formats can be either upper or lower case letters, upper or lower case Roman numerals or arabic numbers. Separators between numbering levels can be used. Almost any keyboard character can be used for numbering except the codings for the numbering (A, a, I, i, 1), except curly braces, the number sign (pound sign) and except the space. If the comma is used in the setsecnum command the numbering of that section will not be displayed with the subordinate sections. You can see examples of both in the images with this article. There are two other options available. The depth of the Table of Contents is controlled using tocdep = some integer from 1 to 5. The default “breaking” indicator is the comma as described in the previous paragraph. However it can be changed to any key other than the ones listed in the previous paragraph. The bulk of the documentation focuses on the commands in the macro. This is useful if you wish to modify the package. (See image far right) Without the comma separator: \usepackage{secnum} \setsecnum{A.1.i} %No comma separator \begin{document} \chapter{Formats}
The number formats can be either upper or lower case letters, upper or lower case Roman numerals or arabic numbers. Separators between numbering levels can be used. Almost any keyboard character except the codings for the numbering (A, a, I, i, 1) and except curly braces and the number sign (pound sign) and except the space. \section{Comma} The comma is used in the setsecnum command; the number of that section will not be displayed with the subordinate sections. \section{Options} There are two other options available. The depth of the Table of Contents is controlled using tocdep = some integer from 1 to 5. The default “breaking” indicator is the comma as described in the previous paragraph. However it can be changed to any key other than the ones listed in the previous paragraph. \subsection{Bulk} The bulk of the documentation focuses on the commands in the macro. This is useful if you wish to modify the package. Next month I will take a break from examining packages at CTAN. Instead I will embark on a practical project using some of the packages I have demonstrated in the last while. I hope you will join me.