git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 2/2] tweak manpage formatting

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 10, 2007, 07:49 UTC
Message-ID
<7vbqdfvng9.fsf@assigned-by-dhcp.cox.net>

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 <gitster@pobox.com>
---
 * 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>
Next: Brian Gernhardt
Message 1 of 5 in “tweak manpage formatting”
  1. 2/2 tweak manpage formattingJunio C Hamano, Aug 10, 2007
  2. Brian GernhardtAug 10, 2007
  3. Junio C HamanoAug 10, 2007
  4. Carlos RicaAug 10, 2007
  5. Brian GernhardtAug 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.