summaryrefslogtreecommitdiff
path: root/Documentation/manpage-bold-literal.xsl
diff options
context:
space:
mode:
authorChris Johnsen <chris_johnsen@pobox.com>2009-03-27 01:44:05 -0500
committerJunio C Hamano <gitster@pobox.com>2009-03-27 00:33:20 -0700
commit5121a6d99368906292dfdf7fe0047fb89c4c1969 (patch)
tree5ff3c66774ec91929bb6c378a5c934ea5046158e /Documentation/manpage-bold-literal.xsl
parent0c04f5273579da4b8308c125b1eb4b8f888bffab (diff)
downloadgit-5121a6d99368906292dfdf7fe0047fb89c4c1969.tar.gz
Documentation: option to render literal text as bold for manpages
This allows manpages viewed on a tty to render inline literal text in a manner that is distinct from the surrounding text. The initial implementation (pre-mailing-list) of this patch included a conditional variant of the XSLT code in manpage-base.xsl and use xmlto's --stringparam option to optionally enable the functionality. It turns out that --stringparam is broken in all versions of xmlto except for the pre-release, SVN version. Since xmlto is a shell script the patch to fix it is simple enough, but I instead opted to use xmlto's "module" functionality. Testing done with asciidoc 8.3.1 and docbook-xsl 1.74.0. Signed-off-by: Chris Johnsen <chris_johnsen@pobox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/manpage-bold-literal.xsl')
-rw-r--r--Documentation/manpage-bold-literal.xsl17
1 files changed, 17 insertions, 0 deletions
diff --git a/Documentation/manpage-bold-literal.xsl b/Documentation/manpage-bold-literal.xsl
new file mode 100644
index 0000000000..608eb5df62
--- /dev/null
+++ b/Documentation/manpage-bold-literal.xsl
@@ -0,0 +1,17 @@
+<!-- manpage-bold-literal.xsl:
+ special formatting for manpages rendered from asciidoc+docbook -->
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ version="1.0">
+
+<!-- render literal text as bold (instead of plain or monospace);
+ this makes literal text easier to distinguish in manpages
+ viewed on a tty -->
+<xsl:template match="literal">
+ <xsl:value-of select="$git.docbook.backslash"/>
+ <xsl:text>fB</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:value-of select="$git.docbook.backslash"/>
+ <xsl:text>fR</xsl:text>
+</xsl:template>
+
+</xsl:stylesheet>