git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Hommey <mh@glandium.org>
To: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH] Properly force listingblocks to be monospaced in manpages
Date: Sun, 19 Aug 2007 23:03:17 +0200	[thread overview]
Message-ID: <20070819210317.GA3202@glandium.org> (raw)

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

             reply	other threads:[~2007-08-19 21:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-19 21:03 Mike Hommey [this message]
2007-08-19 21:14 ` [PATCH] Properly force listingblocks to be monospaced in manpages Mike Hommey
2007-08-19 21:32   ` [PATCH] Force listingblocks to be monospaced in manpages with xsl Mike Hommey
2007-08-19 21:45     ` Mike Hommey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070819210317.GA3202@glandium.org \
    --to=mh@glandium.org \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).