From 8f4ea79ce335361608f99624a1f78f228a1ede36 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Wed, 20 Jun 2007 12:21:13 +0000 Subject: [PATCH] Changed handling of bold and italic/underline output in manpages output. Should be transparent to users, but... This touches handling of all bold and italic/underline output. The exact change is that the mode="bold" and mode="italic" utility templates were changed to named templates. (I think maybe I've changed it back and forth from mode to named before, so this is maybe re-reverting it yet again). Anyway, the reason for the change is that the templates are sometimes call on dynamically node-sets, and using modes to format those doesn't allow passing info about the current/real context node from the source (not the node-set created by the stylesheet) to that formatting stage. The named templates allow the context to be passed in as a parameter, so that the bold/ital formatting template can use context-aware condition checking. This was basically necessary in order to suppress bold formatting in titles, which otherwise gets screwed up because of the numbnut way that roff handles nested bold/ital. Closes #1674534). Much thanks to Daniel Leidert, whose in his docbook-xsl bug-finding kung-fu has achieved Grand Master status. --- xsl/manpages/block.xsl | 15 +++++++--- xsl/manpages/endnotes.xsl | 8 ++++-- xsl/manpages/info.xsl | 25 +++++++++++------ xsl/manpages/inline.xsl | 59 +++++++++++++++++++++++++++++---------- xsl/manpages/lists.xsl | 27 +++++++++++++----- xsl/manpages/synop.xsl | 5 +++- xsl/manpages/utility.xsl | 35 +++++++++++++++-------- 7 files changed, 124 insertions(+), 50 deletions(-) diff --git a/xsl/manpages/block.xsl b/xsl/manpages/block.xsl index dc029d03d..968b69c56 100644 --- a/xsl/manpages/block.xsl +++ b/xsl/manpages/block.xsl @@ -24,12 +24,15 @@ - + .PP - + + + + . @@ -275,9 +278,13 @@ - + - + + + + + diff --git a/xsl/manpages/endnotes.xsl b/xsl/manpages/endnotes.xsl index 3c4e0f678..23df405ef 100644 --- a/xsl/manpages/endnotes.xsl +++ b/xsl/manpages/endnotes.xsl @@ -339,10 +339,12 @@ - + - + + + + diff --git a/xsl/manpages/info.xsl b/xsl/manpages/info.xsl index 5bbe063f6..b11e50653 100644 --- a/xsl/manpages/info.xsl +++ b/xsl/manpages/info.xsl @@ -251,14 +251,12 @@ - - - - - .PP - + + + + @@ -277,7 +275,10 @@ .PP - + + + + @@ -287,7 +288,10 @@ .PP - + + + + @@ -297,7 +301,10 @@ .PP - + + + + diff --git a/xsl/manpages/inline.xsl b/xsl/manpages/inline.xsl index 5583ff975..e2dc55f51 100644 --- a/xsl/manpages/inline.xsl +++ b/xsl/manpages/inline.xsl @@ -19,14 +19,20 @@ - + + + + - + + + + @@ -40,7 +46,10 @@ - + + + + - + + + + - + + + + - + + + + @@ -74,18 +92,28 @@ $man.break.after.slash = 0"> - + + + + - - + + + + + - + + + + @@ -100,9 +128,12 @@ - + - + + + + ( ) diff --git a/xsl/manpages/lists.xsl b/xsl/manpages/lists.xsl index 6b4fabcd5..9fc65bb41 100644 --- a/xsl/manpages/lists.xsl +++ b/xsl/manpages/lists.xsl @@ -49,7 +49,10 @@ .PP - + + + + @@ -176,7 +179,10 @@ .PP - + + + + @@ -199,7 +205,10 @@ procedure[ancestor::listitem or ancestor::step or ancestor::glossdef]"> .PP - + + + + @@ -275,7 +284,10 @@ .PP - + + + + .\" line length increase to cope w/ tbl weirdness @@ -312,9 +324,10 @@ - - - + + + + diff --git a/xsl/manpages/synop.xsl b/xsl/manpages/synop.xsl index 07678fc5a..080ce1421 100644 --- a/xsl/manpages/synop.xsl +++ b/xsl/manpages/synop.xsl @@ -32,7 +32,10 @@ - + + + + diff --git a/xsl/manpages/utility.xsl b/xsl/manpages/utility.xsl index 23bc7a2d9..93a75d3ab 100644 --- a/xsl/manpages/utility.xsl +++ b/xsl/manpages/utility.xsl @@ -24,9 +24,9 @@ - - - + + + @@ -35,16 +35,27 @@ - - - \fB - - \fR - + + + + + + + \fB + + \fR + + + + + + - - + + + + \fI \fR @@ -55,7 +66,7 @@ - + -- 2.40.0