[publican-list] Supress section numbering

Jeff Fearn jfearn at redhat.com
Sun Aug 9 22:24:04 UTC 2015


On 08/08/15 13:53, Alan Murrell wrote:
> Hello,
> 
> I am wondering if it is possible to suppress certain "sections" from
> showing their numbers in the the document (i.e., just the "title", and
> still show up in the TOC)
> 
> I know I can use a "max depth" parameter to control how many levels use
> the numbering, but I think that is a global parameter, and I don;t want
> to do it globally.
> 
> What I am trying to do for a particular section is something like this:
> 
> 4. Backups
> 
> 4.1 Backup Devices
> 
> Tape Drives
> 
> USB Drives
> 
> and have the TOC show up like this:
> 
> 4. Backups................ 3
>   4.1. Backup Devices..... 3
>       Tape Drives......... 3
>       USB Drives.......... 3
> 
> But in other sections, I would still want that 3rd-layer of numbering
> (e.g., "5.1.1"), so I don't want to disable it completely
> 
> It's not a big deal if this can't be done, but I just thought i would ask.
> 
> Thanks! :-)
> 
> Regards,

Hi Alan,

Option 1: you will need a custom brand to do this as you have to set a
docbook option not exposed in publican.

The trick is to use bridgeheads instead of sections and set
bridgehead.in.toc to 1 in your XSL.

Note this is global, so if you use bridgeheads in other ways it will
conflict.


Option 2: AFAICT there is nothing in the DcoBook styles to do this with
sections, so you'd have to override the TOC generation.

See: http://www.sagehill.net/docbookxsl/TOCcontrol.html

Cheers, Jeff.




More information about the publican-list mailing list