I'm currently considering to use \section*
to add a nomenclature.
Unfortunately I can't find the exact answer, but I've read on stackexchange that using starred versions of sectioning commands is considered bad practice.
Can anyone tell me why?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI'm currently considering to use \section*
to add a nomenclature.
Unfortunately I can't find the exact answer, but I've read on stackexchange that using starred versions of sectioning commands is considered bad practice.
Can anyone tell me why?
Some consider it bad practice, as the holy grail of document mark-up is the separation of semantics from styling. An ideal almost achievable with the standard classes. However, the ideal breaks with the starred version of LaTeX sectioning commands as they have the same semantics (but are mostly used for styling).
A different approach is to expand the sectioning commands to include additional book sections with properties, for example one could have:
Nomenclature
toc = true
name = Nomenclature
numbering = none
Foreward
toc = false,
name = Foreward % Can change based on language
numbering = none
I don't know what Javier Bezos had in mind when he wrote "Using sectioning commands in the starred version is strongly discouraged...", but his idea is very similar as one can guess from his examples. In addition he is advocating environments rather than simple \section
type commands. I share similar thoughts on the subject, for complicated sectioning commands (i.e., cases where one might have an image for the Chapter head, and additional image for the toc, Foreward, Nomenclature etc).
See for example this document, Page 5, Pages 42-50, which is the doc
for a class, that I have been developing on and off for a while now (code at github). The code is still under development and not ready for general consumption (still buggy), but currently aiming at a just after Christmas release! Some examples the chapter head at left, has an image and goes into toc, where the one on the right (for a magazine has no number, has an image and a by-line and the heading can go into a toc).
LaTeX can do so much more than just maths. Anyone that has more time than I and wants to help the Project, please buzz me at chat.
titlesec
documentation, for example: "Using sectioning commands in the starred version is strongly discouraged. Instead, you can use a set of markup oriented commands which are easy to define and modify, if necessary."titlesec
, perhaps.titlesec
documentation is conceptual, and not purely technical.