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. This makes the ascii-art diagrams readable in PS output. In order for these roff commands to get through to the manpage they have to be element encoded to prevent quoting. In particular with docbook xsl 1.72.0 and newer we have to use U+2302 instead of . to prevent the roff command being escaped. We also add a small perl script for docbook < 1.72.0. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> --- On Thu, 19 Jul 2007, Julian Phillips wrote:I couldn't find any way to detect the docbook version - perhaps someone more with more knowledge of asciidoc might know? Otherwise, something like this perhaps? Documentation/Makefile | 3 +++ Documentation/asciidoc.conf | 6 ++++++ Documentation/replace_U+2303.pl | 6 ++++++ 3 files changed, 15 insertions(+), 0 deletions(-) create mode 100755 Documentation/replace_U+2303.pl diff --git a/Documentation/Makefile b/Documentation/Makefile index b062757..e381b2e 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -121,6 +121,9 @@ clean: %.1 %.5 %.7 : %.xml xmlto -m callouts.xsl man $< + mv $@ $@.tmp + ./replace_U+2303.pl < $@.tmp > $@ + $(RM) $@.tmp %.xml : %.txt $(RM) $@+ $@ diff --git a/Documentation/asciidoc.conf b/Documentation/asciidoc.conf index 6b6220d..d54fe29 100644 --- a/Documentation/asciidoc.conf +++ b/Documentation/asciidoc.conf @@ -27,7 +27,13 @@ ifdef::backend-docbook[] [listingblock] <example><title>{title}</title> <literallayout> +ifdef::doctype-manpage[] + ⌂ft C +endif::doctype-manpage[] | +ifdef::doctype-manpage[] + ⌂ft +endif::doctype-manpage[] </literallayout> {title#}</example> endif::backend-docbook[] diff --git a/Documentation/replace_U+2303.pl b/Documentation/replace_U+2303.pl new file mode 100755 index 0000000..b086949 --- /dev/null +++ b/Documentation/replace_U+2303.pl @@ -0,0 +1,6 @@ +#!/usr/bin/perl -w + +while ($line = <>) { + $line =~ s/^\x{2302}/./; + print $line; +} -- 1.5.2.2 - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| David Newall | Re: Slow DOWN, please!!! |
| Greg Kroah-Hartman | [PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO |
| Fernando Luis | [PATCH] affinity is not defined in non-smp kernels - x86_64 |
git: | |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 28/37] dccp: Integration of dynamic feature activation - part 3 (client side) |
| Jean-Louis Dupond | tg3 driver not advertising 1000mbit |
