doc/man: add XSL files for man pages
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 1 Sep 2015 14:58:42 +0000 (10:58 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 17 Mar 2016 21:19:20 +0000 (17:19 -0400)
Those XSL files, some of them inspired by Git documentation's own
XSL files, manipulate the intermediate DocBook XML file to
fine-tune the man pages rendering.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
doc/man/xsl/manpage-base.xsl [new file with mode: 0644]
doc/man/xsl/manpage-bold-literal.xsl [new file with mode: 0644]
doc/man/xsl/manpage-ulinks.xsl [new file with mode: 0644]
doc/man/xsl/manpage.xsl [new file with mode: 0644]

diff --git a/doc/man/xsl/manpage-base.xsl b/doc/man/xsl/manpage-base.xsl
new file mode 100644 (file)
index 0000000..2f7a5d7
--- /dev/null
@@ -0,0 +1,17 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+   <xsl:template match="co">
+        <xsl:value-of select="concat('\','fB(',substring-after(@id,'-'),')','\','fR')"/>
+   </xsl:template>
+   <xsl:template match="calloutlist">
+        <xsl:value-of select="."/>
+        <xsl:text>sp&#10;</xsl:text>
+        <xsl:apply-templates/>
+        <xsl:text>&#10;</xsl:text>
+   </xsl:template>
+   <xsl:template match="callout">
+        <xsl:value-of select="concat('\','fB',substring-after(@arearefs,'-'),'. ','\','fR')"/>
+        <xsl:apply-templates/>
+        <xsl:value-of select="."/>
+        <xsl:text>br&#10;</xsl:text>
+   </xsl:template>
+</xsl:stylesheet>
diff --git a/doc/man/xsl/manpage-bold-literal.xsl b/doc/man/xsl/manpage-bold-literal.xsl
new file mode 100644 (file)
index 0000000..c0e0900
--- /dev/null
@@ -0,0 +1,7 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:template match="literal">
+        <xsl:text>\fB</xsl:text>
+        <xsl:value-of select="." />
+        <xsl:text>\fR</xsl:text>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/doc/man/xsl/manpage-ulinks.xsl b/doc/man/xsl/manpage-ulinks.xsl
new file mode 100644 (file)
index 0000000..5e4b794
--- /dev/null
@@ -0,0 +1,5 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:template match="ulink">
+        <xsl:apply-templates/>
+    </xsl:template>
+</xsl:stylesheet>
diff --git a/doc/man/xsl/manpage.xsl b/doc/man/xsl/manpage.xsl
new file mode 100644 (file)
index 0000000..50db189
--- /dev/null
@@ -0,0 +1,8 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+    <xsl:import href="manpage-base.xsl" />
+    <xsl:import href="manpage-bold-literal.xsl" />
+    <xsl:import href="manpage-ulinks.xsl" />
+
+    <!-- disable end notes -->
+    <xsl:param name="man.endnotes.are.numbered">0</xsl:param>
+</xsl:stylesheet>
This page took 0.026578 seconds and 4 git commands to generate.