[PATCH 2/2] tweak manpage formatting

Subsystems: documentation, the rest

DORMANTno replies

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

[PATCH 2/2] tweak manpage formatting

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:28

This attempts to force fixed-font in manpages for literal
blocks.  I have tested this with docbook 1.71 and it seems to
work as expected.

Signed-off-by: Junio C Hamano <redacted>
---

 * The illustration in git-rev-parse.1 is much easier to read
   with this...

 Documentation/callouts.xsl |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl
index 6a361a2..7941af7 100644
--- a/Documentation/callouts.xsl
+++ b/Documentation/callouts.xsl
@@ -27,4 +27,17 @@
   </xsl:if>
 </xsl:template>
 
+<xsl:template match="literallayout[@class='monospaced']">
+  <xsl:text>.RS</xsl:text>
+  <xsl:if test="not($man.indent.width = '')">
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="$man.indent.width"/>
+  </xsl:if>
+  <xsl:text>&#10;</xsl:text>
+  <xsl:text>&#10;.ft C&#10;.nf&#10;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#10;.fi&#10;.ft&#10;</xsl:text>
+  <xsl:text>.RE&#10;</xsl:text>
+</xsl:template>
+
 </xsl:stylesheet>

Re: [PATCH 2/2] tweak manpage formatting

From: Brian Gernhardt <hidden>
Date: 2016-06-15 22:43:28

On Aug 10, 2007, at 3:49 AM, Junio C Hamano wrote:
This attempts to force fixed-font in manpages for literal
blocks.  I have tested this with docbook 1.71 and it seems to
work as expected.
This broke building the manpages with docbook-xsl 1.69.  Apparently  
it doesn't understand "man.indent.width".  I fixed it by updating to  
1.71 from fink.  I don't know if 1.71 is the minimum supported  
version so thought this might be worth a note.

~~ Brian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help