From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonas Fonseca Subject: [PATCH] Force listingblocks to be monospaced in manpages Date: Thu, 19 Jul 2007 13:37:43 +0200 Message-ID: <20070719113743.GA27553@diku.dk> References: <20070718213725.31383.50523.julian@quantumfyre.co.uk> <7vr6n55krx.fsf@assigned-by-dhcp.cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Junio C Hamano , Fredrik Tolf , git@vger.kernel.org To: Julian Phillips X-From: git-owner@vger.kernel.org Thu Jul 19 13:38:02 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IBUKT-0000wU-Lr for gcvg-git@gmane.org; Thu, 19 Jul 2007 13:37:58 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1764756AbXGSLhu (ORCPT ); Thu, 19 Jul 2007 07:37:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1764648AbXGSLhu (ORCPT ); Thu, 19 Jul 2007 07:37:50 -0400 Received: from mgw1.diku.dk ([130.225.96.91]:39184 "EHLO mgw1.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1764756AbXGSLhr (ORCPT ); Thu, 19 Jul 2007 07:37:47 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw1.diku.dk (Postfix) with ESMTP id 8D628278051; Thu, 19 Jul 2007 13:37:45 +0200 (CEST) X-Virus-Scanned: amavisd-new at diku.dk Received: from mgw1.diku.dk ([127.0.0.1]) by localhost (mgw1.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zLMsm2i2D3by; Thu, 19 Jul 2007 13:37:43 +0200 (CEST) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw1.diku.dk (Postfix) with ESMTP id AA3BB27804B; Thu, 19 Jul 2007 13:37:43 +0200 (CEST) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id 3A2666DFB5B; Thu, 19 Jul 2007 13:34:26 +0200 (CEST) Received: by ask.diku.dk (Postfix, from userid 3873) id 8C34462BC4; Thu, 19 Jul 2007 13:37:43 +0200 (CEST) Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: For the html output we can use a stylesheet to make sure that the listingblocks are presented in a monospaced font. For the manpages do it manually by inserting a ".ft C" before and ".ft" after the block in question. In addition, also add an empty line after all verbatim blocks. Signed-off-by: Jonas Fonseca --- Julian Phillips wrote Thu, Jul 19, 2007: > On Wed, 18 Jul 2007, Junio C Hamano wrote: > > >I tried with your patch, both with asciidoc7 and asciidoc8. Did > >you really mean "⌂" above? Replacing them with "." gave > >me a series of these changes (diff between output before and > >after your patch with the "s/\⌂/./g" fixup): > > I did mean it. I originally just had .ft, but I was getting \&.ft in the > manpage, which then just came out as .ft in the console. This is because AsciiDoc does the escaping. I think it would be cleaner to do this thing when converting from DocBook to roff like we already do for other things. While fixing the above, a fix for separating verbatim blocks from any following blocks is easy to apply. diff --git a/Documentation/callouts.xsl b/Documentation/callouts.xsl index 6a361a2..44ab77d 100644 --- a/Documentation/callouts.xsl +++ b/Documentation/callouts.xsl @@ -27,4 +27,93 @@ + + + + + + + Yes + + + + + + + + + + + + + + + + + .sp + + + + + .RS + + + + + + + + + + + + + + + + + + + + + + + + + + .ft + + + .nf + + + .fi + .ft + + + + .nf + .ft C + + + .ft + + .fi + + + + + .RE + + + + + .sp + + + -- Jonas Fonseca