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

[PATCH] Properly force listingblocks to be monospaced in manpages

From
Mike Hommey <mh@glandium.org>
Date
Aug 19, 2007, 21:03 UTC
Message-ID
<20070819210317.GA3202@glandium.org>

Still insert a ".ft C" before and ".ft" after, but do it in a way as to avoid them to get escaped with "\&", which makes the manpages look pretty bad. Do it in a more docbook-xsl'ish way.

Reverts 281a53bb79786a6d7e54f9715cc8ad46fc2bdb0e.
Signed-off-by: Mike Hommey <mh@glandium.org>
---
 Documentation/asciidoc.conf |    6 ------
 Documentation/callouts.xsl  |    7 +++++++
 2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf
index af5b155..6b6220d 100644
--- a/Documentation/asciidoc.conf
+++ b/Documentation/asciidoc.conf
@@ -27,13 +27,7 @@ ifdef::backend-docbook[]
 [listingblock]
 <example><title>{title}</title>
 <literallayout>
-ifdef::doctype-manpage[]
-&#10;.ft C&#10;
-endif::doctype-manpage[]
 |
-ifdef::doctype-manpage[]
-&#10;.ft&#10;
-endif::doctype-manpage[]
 </literallayout>
 {title#}</example>
 endif::backend-docbook[]
diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl
index 6a361a2..e188f5e 100644
--- a/Documentation/callouts.xsl
+++ b/Documentation/callouts.xsl
@@ -27,4 +27,11 @@
   </xsl:if>
 </xsl:template>
 
+<!-- Force listingblocks to be monospaced in manpages -->
+<xsl:template match="literallayout">
+  <xsl:text>&#x2302;ft C&#10;</xsl:text>
+  <xsl:apply-templates/>
+  <xsl:text>&#x2302;ft&#10;</xsl:text>
+</xsl:template>
+
 </xsl:stylesheet>
-- 
1.5.3.rc4
Next: Mike Hommey
Message 1 of 4 in “Properly force listingblocks to be monospaced in manpages”
  1. Properly force listingblocks to be monospaced in manpagesMike Hommey, Aug 19, 2007
  2. Mike HommeyAug 19, 2007
  3. Force listingblocks to be monospaced in manpages with xslMike Hommey, Aug 19, 2007
  4. Mike HommeyAug 19, 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.