mirror of
https://git.proxmox.com/git/pve-docs
synced 2025-05-29 22:27:11 +00:00
docbook: render 4th section level for manpages
In the manpage output the sections get rendered as refsections, but those only go up to level 3: > In DocBook, RefSect3 is the lowest-level section allowed in a > RefEntry. There is no element analogous to a Sect4. -- https://tdg.docbook.org/tdg/4.5/refsect3 While nesting refsect3 would work output wise, the DTD schema does not allows this, and disabling schema validation can lead to graver issues, so rather avoid that and use a formalpara [0], a paragraph with a title, instead, but only for the title, as the inner content will be a simpara (simple paragraph) that cannot be nested inside a formalpara, but the resulting rendering works out well enough. [0]: https://tdg.docbook.org/tdg/4.5/formalpara Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
4a06054e39
commit
c2eab5cc87
@ -5,6 +5,7 @@
|
|||||||
#
|
#
|
||||||
# modified for Proxmox VE docs
|
# modified for Proxmox VE docs
|
||||||
# - add thumbnail attribute
|
# - add thumbnail attribute
|
||||||
|
# - render sect4 sections in manpages as formalpara title
|
||||||
|
|
||||||
[miscellaneous]
|
[miscellaneous]
|
||||||
outfilesuffix=.xml
|
outfilesuffix=.xml
|
||||||
@ -693,6 +694,16 @@ template::[docinfo]
|
|||||||
|
|
|
|
||||||
</refsect3>
|
</refsect3>
|
||||||
|
|
||||||
|
# Proxmox: add custom section 4 level for manpages, as there is no refsect4 and
|
||||||
|
# the XML DTD schema does not allows nesting refsect3 (even if it would render
|
||||||
|
# OK). Use a formalpara, which is a paragraph with a title. As docbook always
|
||||||
|
# outputs a simpara (simple paragraph, very limited) for the inner content, we
|
||||||
|
# cannot nest that either, but rather just create an empty formalpara which can
|
||||||
|
# then be followed by whatever the original inner content is.
|
||||||
|
[sect4]
|
||||||
|
<formalpara{id? id="{id}"}{role? role="{role}"}><title>{title}</title><para></para></formalpara>
|
||||||
|
|
|
||||||
|
|
||||||
endif::doctype-manpage[]
|
endif::doctype-manpage[]
|
||||||
|
|
||||||
#-------------------------
|
#-------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user