]> git.proxmox.com Git - pve-docs.git/blobdiff - asciidoc/pve-docbook.conf
totp: fix copy/paste mistake
[pve-docs.git] / asciidoc / pve-docbook.conf
index 044ea84e09d696a816f94c98f6022c51885dc10c..e179342147f39b5253c631bcb5d1e0ac088545b5 100644 (file)
@@ -5,6 +5,7 @@
 #
 # modified for Proxmox VE docs
 # - add thumbnail attribute
+# - render sect4 sections in manpages as formalpara title
 
 [miscellaneous]
 outfilesuffix=.xml
@@ -44,29 +45,29 @@ endif::asciidoc7compatible[]
 <simpara><?asciidoc-pagebreak?></simpara>
 
 [blockdef-pass]
-latexmath-style=template="latexmathblock",subs=()
+latexmath-style=template="latexmathblock",subs=(),posattrs=(),filter="unwraplatex.py"
 
 [macros]
 # math macros.
-(?su)[\\]?(?P<name>latexmath):(?P<subslist>\S*?)\[(?P<passtext>.*?)(?<!\\)\]=[]
-(?u)^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?P<passtext>.*?)\])$=#[]
+(?s)[\\]?(?P<name>latexmath):(?P<subslist>\S*?)\[(?:\$\s*)?(?P<passtext>.*?)(?:\s*\$)?(?<!\\)\]=[]
+^(?P<name>latexmath)::(?P<subslist>\S*?)(\[(?:\\\[\s*)?(?P<passtext>.*?)(?:\s*\\\])?\])$=#[]
 
 [latexmath-inlinemacro]
 <inlineequation>
-<alt><![CDATA[{passtext}]]></alt>
+<alt><![CDATA[${passtext}$]]></alt>
 <inlinemediaobject><textobject><phrase></phrase></textobject></inlinemediaobject>
 </inlineequation>
 
 [latexmath-blockmacro]
 <informalequation>
-<alt><![CDATA[{passtext}]]></alt>
+<alt><![CDATA[{backslash}[{passtext}{backslash}]]]></alt>
 <mediaobject><textobject><phrase></phrase></textobject></mediaobject>
 </informalequation>
 
 [latexmathblock]
-<equation{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}><title>{title}</title>
+<equation{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{floatstyle? floatstyle="{floatstyle}"}><title>{title}</title>
 {title%}<informalequation{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
-<alt><![CDATA[|]]></alt>
+<alt><![CDATA[\[|\]]]></alt>
 <mediaobject><textobject><phrase></phrase></textobject></mediaobject>
 {title#}</equation>
 {title%}</informalequation>
@@ -80,7 +81,7 @@ latexmath-style=template="latexmathblock",subs=()
 </inlinemediaobject>
 
 [image-blockmacro]
-<figure{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{pgwide-option? pgwide="1"}><title>{title}</title>
+<figure{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{floatstyle? floatstyle="{floatstyle}"}{pgwide-option? pgwide="1"}><title>{title}</title>
 {title%}<informalfigure{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>{pgwide-option?<?dbfo pgwide="1"?>}
 # DocBook XSL Stylesheets custom processing instructions.
 <?dbfo keep-together="{breakable-option#auto}"?>
@@ -246,7 +247,7 @@ endif::deprecated-quotes[]
 # xref:id[text]
 [xref-inlinemacro]
 <link linkend="{target}">{0}</link>
-{2%}<xref linkend="{target}"/>
+{0%}<xref linkend="{target}"/>
 # <<id,text>>
 [xref2-inlinemacro]
 <link linkend="{1}">{2}</link>
@@ -275,7 +276,7 @@ endif::deprecated-quotes[]
 <formalpara{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}><title>{title}</title><para>
 {thumbnail#}<mediaobject>
 {thumbnail#}  <imageobject>
-{thumbnail#}  <imagedata fileref="images/screenshot/{thumbnail}"{width? contentwidth="{width}"}{height? contentdepth="{height}"}{scale? scale="{scale}"}{scaledwidth? width="{scaledwidth}" scalefit="1"}{align? align="{align}"}/>
+{thumbnail#}  <imagedata fileref="images/{thumbnail}"{width? contentwidth="{width}"}{height? contentdepth="{height}"}{scale? scale="{scale}"}{scaledwidth? width="{scaledwidth}" scalefit="1"}{align? align="{align}"}/>
 {thumbnail#}  </imageobject>
 {thumbnail#}  <textobject><phrase>{alt={thumbnail}}</phrase></textobject>
 {thumbnail#}</mediaobject>
@@ -390,7 +391,7 @@ template::[quote-open]
 template::[quote-close]
 
 [exampleblock-open]
-<{title?example}{title!informalexample}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
+<{title?example}{title!informalexample}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{floatstyle? floatstyle="{floatstyle}"}>
 # DocBook XSL Stylesheets custom processing instructions.
 <?dbfo keep-together="{breakable-option#auto}"?>
 <?dbfo keep-together="{unbreakable-option#always}"?>
@@ -447,7 +448,7 @@ paragraph=
 paragraph=
 
 [table]
-<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}{pgwide-option? pgwide="1"}
+<{title?table}{title!informaltable}{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}{floatstyle? floatstyle="{floatstyle}"}"}{pgwide-option? pgwide="1"}
 frame="{frame=all}"
 {grid%rowsep="1" colsep="1"}
 rowsep="{grid@none|cols:0:1}" colsep="{grid@none|rows:0:1}"
@@ -620,6 +621,12 @@ template::[docinfo]
 |
 </section>
 
+[sect5]
+<section{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
+<title>{title}</title>
+|
+</section>
+
 endif::doctype-article[]
 
 #-------------------------
@@ -687,6 +694,16 @@ template::[docinfo]
 |
 </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[]
 
 #-------------------------
@@ -754,6 +771,12 @@ template::[docinfo]
 |
 </section>
 
+[sect5]
+<section{id? id="{id}"}{role? role="{role}"}{reftext? xreflabel="{reftext}"}>
+<title>{title}</title>
+|
+</section>
+
 endif::doctype-book[]
 
 ifdef::sgml[]