@matheusbsbs / matheus-bagliano / commits / 776e994af5
Fork 0

Properly render asciidoc "callouts" in git man pages.

Adds an xsl fragment to render docbook callouts when converting to man page format. Update the Makefile to have "xmlto" use it when generating man pages. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>

Sean Estabrooks committed Apr 28, 2006 at 09:15 UTC 776e994af5b85d77424581bda37fb615897063cc
2 files changed +17 -1
Documentation/Makefile
+1 -1
@@ -79,7 +79,7 @@ clean:
79 asciidoc -b xhtml11 -d manpage -f asciidoc.conf $<
80
81 %.1 %.7 : %.xml
82 - xmlto man $<
82 + xmlto -m callouts.xsl man $<
83
84 %.xml : %.txt
85 asciidoc -b docbook -d manpage -f asciidoc.conf $<
Documentation/callouts.xsl new
+16
@@ -0,0 +1,16 @@
1 +<!-- callout.xsl: converts asciidoc callouts to man page format -->
2 +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3 +<xsl:template match="co">
4 + <xsl:value-of select="concat('\fB(',substring-after(@id,'-'),')\fR')"/>
5 +</xsl:template>
6 +<xsl:template match="calloutlist">
7 + <xsl:text>.sp&#10;</xsl:text>
8 + <xsl:apply-templates/>
9 + <xsl:text>&#10;</xsl:text>
10 +</xsl:template>
11 +<xsl:template match="callout">
12 + <xsl:value-of select="concat('\fB',substring-after(@arearefs,'-'),'. \fR')"/>
13 + <xsl:apply-templates/>
14 + <xsl:text>.br&#10;</xsl:text>
15 +</xsl:template>
16 +</xsl:stylesheet>