From: Michael Smith Date: Wed, 28 Sep 2005 09:36:46 +0000 (+0000) Subject: Added two new parameters for handling of multi-term varlistentry X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ca852ca635307d67467719dc03e02fde066db670;p=docbook-dsssl Added two new parameters for handling of multi-term varlistentry elements: variablelist.term.break.after: When the variablelist.term.break.after is non-zero, it will generate a line break after each term multi-term varlistentry. variablelist.term.separator: When a varlistentry contains multiple term elements, the string specified in the value of the variablelist.term.separator parameter is placed after each term except the last. The default is ", " (a comma followed by a space). To suppress rendering of the separator, set the value of variablelist.term.separator to the empty string (""). These parameters are primarily intended to be useful if you have multi-term varlistentries that have long terms. Closes #1306676. Thanks to Sam Steingold for providing an example "lots of long terms" doc that demonstrated the value of having these options. Also, added normalize-space() call to processing of each term. This change affects all output formats (HTML, PDF, manpages). The default behavior should pretty much remain the same as before, but it is possible (as always) that the change may introduce some new bugginess. --- diff --git a/xsl/fo/lists.xsl b/xsl/fo/lists.xsl index 482a5cea1..421d9dc37 100644 --- a/xsl/fo/lists.xsl +++ b/xsl/fo/lists.xsl @@ -565,11 +565,22 @@ - , - - - - + + + + + + + + + + + + + + + + diff --git a/xsl/fo/param.ent b/xsl/fo/param.ent index edcc6aa35..e2c979f77 100644 --- a/xsl/fo/param.ent +++ b/xsl/fo/param.ent @@ -193,6 +193,9 @@ + + + @@ -258,7 +261,6 @@ - diff --git a/xsl/fo/param.xweb b/xsl/fo/param.xweb index a7267b1ef..6f05851b2 100644 --- a/xsl/fo/param.xweb +++ b/xsl/fo/param.xweb @@ -387,15 +387,17 @@ zero by default, so this is simply the page-master region-left. Lists -&list.block.spacing; -&list.item.spacing; &compact.list.item.spacing; -&variablelist.max.termlength; -&list.block.properties; &itemizedlist.properties; &itemizedlist.label.properties; +&list.block.properties; +&list.block.spacing; +&list.item.spacing; &orderedlist.properties; &orderedlist.label.properties; +&variablelist.max.termlength; +&variablelist.term.separator; +&variablelist.term.break.after; Cross References @@ -808,6 +810,8 @@ around all these parameters. + + diff --git a/xsl/html/lists.xsl b/xsl/html/lists.xsl index 8b4de119b..5e516d109 100644 --- a/xsl/html/lists.xsl +++ b/xsl/html/lists.xsl @@ -442,15 +442,22 @@ - - , - - - - - - - + + + + + + + + + + + + +
+
+
+
diff --git a/xsl/html/param.ent b/xsl/html/param.ent index a1f867f14..0c388debb 100644 --- a/xsl/html/param.ent +++ b/xsl/html/param.ent @@ -228,6 +228,8 @@ + + diff --git a/xsl/html/param.xweb b/xsl/html/param.xweb index 37bc78d9b..138008a31 100644 --- a/xsl/html/param.xweb +++ b/xsl/html/param.xweb @@ -223,6 +223,13 @@ stylesheet like this: &olink.resolver;
+Lists +&segmentedlist.as.table; +&variablelist.as.table; +&variablelist.term.separator; +&variablelist.term.break.after; + + Bibliography &biblioentry.item.separator; &bibliography.collection; @@ -246,8 +253,6 @@ stylesheet like this: &shade.verbatim; &shade.verbatim.style; &punct.honorific; -&segmentedlist.as.table; -&variablelist.as.table; &tex.math.in.alt; &tex.math.file; &tex.math.delims; @@ -696,6 +701,8 @@ around all these parameters. + + diff --git a/xsl/manpages/lists.xsl b/xsl/manpages/lists.xsl index 6322f8419..7a69456dc 100644 --- a/xsl/manpages/lists.xsl +++ b/xsl/manpages/lists.xsl @@ -38,26 +38,54 @@
- .TP - - - - - - - + + + + + + .PP + + + .TP + + + + - - - - , - - - - - + + + + + + + + + + + + + + + + + .br + + + + - + + + + + .RS + + .RE + + + + + diff --git a/xsl/manpages/param.ent b/xsl/manpages/param.ent index d201fc225..1ecb8f12d 100644 --- a/xsl/manpages/param.ent +++ b/xsl/manpages/param.ent @@ -8,6 +8,8 @@ + + diff --git a/xsl/manpages/param.xweb b/xsl/manpages/param.xweb index bfe83a466..a81d69371 100644 --- a/xsl/manpages/param.xweb +++ b/xsl/manpages/param.xweb @@ -43,6 +43,11 @@ &man.links.are.underlined; &man.links.list.enabled; &man.links.list.heading; + + + Lists +&variablelist.term.separator; +&variablelist.term.break.after; Character/string substitution @@ -119,6 +124,8 @@ + + diff --git a/xsl/params/variablelist.term.break.after.xml b/xsl/params/variablelist.term.break.after.xml new file mode 100644 index 000000000..b62af9fab --- /dev/null +++ b/xsl/params/variablelist.term.break.after.xml @@ -0,0 +1,34 @@ + + +variablelist.term.break.after +boolean + + +variablelist.term.break.after +Generate line break after each term within a +multi-term varlistentry? + + + + +, + + +Description + +Set a non-zero value for the +variablelist.term.break.after parameter to +generate a line break between terms in a +multi-term varlistentry. + + +If you set a non-zero value for +variablelist.term.break.after, you may also +want to set the value of the +variablelist.term.separator parameter to an +empty string (to suppress rendering of the default comma and space +after each term). + + + + diff --git a/xsl/params/variablelist.term.separator.xml b/xsl/params/variablelist.term.separator.xml new file mode 100644 index 000000000..74b28cd57 --- /dev/null +++ b/xsl/params/variablelist.term.separator.xml @@ -0,0 +1,35 @@ + + +variablelist.term.separator +string + + +variablelist.term.separator +Text to separate terms within a multi-term +varlistentry + + + + +, + + +Description + +When a varlistentry contains multiple term +elements, the string specified in the value of the +variablelist.term.separator parameter is placed +after each term except the last. + + + To generate a line break between multiple terms in + a varlistentry, set a non-zero value for the + variablelist.term.break.after parameter. If + you do so, you may also want to set the value of the + variablelist.term.separator parameter to an + empty string (to suppress rendering of the default comma and space + after each term). + + + +