From b5200779472e68294bf9cff8e9dd28fcc597566f Mon Sep 17 00:00:00 2001 From: Bob Stayton Date: Tue, 17 Mar 2009 07:24:29 +0000 Subject: [PATCH] Add two new qanda.defaultlabel values so that numbered sections and numbered questions can be distinguished. Satisfies Feature Request #1539045. --- xsl/common/labels.xsl | 43 ++++++++--- xsl/fo/qandaset.xsl | 118 +++++++++++++++--------------- xsl/html/qandaset.xsl | 24 ++++-- xsl/params/qanda.defaultlabel.xml | 65 +++++++++++++--- 4 files changed, 164 insertions(+), 86 deletions(-) diff --git a/xsl/common/labels.xsl b/xsl/common/labels.xsl index 4cfeae94e..3d9ce5ca5 100644 --- a/xsl/common/labels.xsl +++ b/xsl/common/labels.xsl @@ -570,9 +570,14 @@ element label. - - + + + + + + + @@ -603,19 +608,35 @@ element label. - + - + - + + + + +   + + + + + + + + + + + @@ -722,11 +743,11 @@ element label. + from="chapter|appendix" level="any"/> + from="book|article" level="any"/> @@ -838,9 +859,9 @@ Custom stylesheets may override it to get more selective behavior. - - - + + + Unexpected .autolabel value: diff --git a/xsl/fo/qandaset.xsl b/xsl/fo/qandaset.xsl index a29692f67..f6c4d3948 100644 --- a/xsl/fo/qandaset.xsl +++ b/xsl/fo/qandaset.xsl @@ -20,24 +20,8 @@ - - - - - - - - - - - - - - em * 0.50 - - 2.5em - + @@ -113,6 +97,43 @@ + + + + + + + + + + + + + + + + + + + em * 0.50 + + + 5em + + + 4em + + + 3em + + 2.5em + + + - - - - - - - - - - - - - *0.6em - - 2.5em - + - + - - - - - - - - + - - - - - - + + + + + + @@ -293,15 +291,7 @@ - - - - - - - - + @@ -332,6 +322,18 @@ + + + + + + + + + + + diff --git a/xsl/html/qandaset.xsl b/xsl/html/qandaset.xsl index 30dbdb1a4..48702b9b7 100644 --- a/xsl/html/qandaset.xsl +++ b/xsl/html/qandaset.xsl @@ -198,7 +198,7 @@ - + @@ -268,8 +268,13 @@ - - + + + + + + + @@ -332,7 +337,7 @@
- + @@ -363,6 +368,10 @@ + + + + @@ -379,7 +388,7 @@ - +
@@ -404,10 +413,13 @@ - 1% + + 1% + + diff --git a/xsl/params/qanda.defaultlabel.xml b/xsl/params/qanda.defaultlabel.xml index 0b3f19411..d75114cd6 100644 --- a/xsl/params/qanda.defaultlabel.xml +++ b/xsl/params/qanda.defaultlabel.xml @@ -25,20 +25,63 @@ Description If no defaultlabel attribute is specified on -a qandaset, this value is used. It must be one of the legal -values for the defaultlabel attribute, one from none, number or -qanda. The default value is 'number'. +a qandaset, this value is used. It is generally one of the legal +values for the defaultlabel attribute (none, +number or +qanda), or one of the additional stylesheet-specific values +(qnumber or qnumberanda). +The default value is 'number'. -Meaning -qanda - questions are labeled “Q:” and answers are labeled “A:”. -number - The entries are enumerated. -none - No distinguishing label precedes Questions or Answers. +The values are rendered as follows: + +qanda + +questions are labeled "Q:" and +answers are labeled "A:". + + + +number + +The questions are enumerated and the answers +are not labeled. + + + +qnumber + +The questions are labeled "Q:" followed by a number, and answers are not +labeled. +When sections are numbered, adding a label +to the number distinguishes the question numbers +from the section numbers. +This value is not allowed in the +defaultlabel attribute +of a qandaset element. + + + +qnumberanda + +The questions are labeled "Q:" followed by a number, and +the answers are labeled "A:". +When sections are numbered, adding a label +to the number distinguishes the question numbers +from the section numbers. +This value is not allowed in the +defaultlabel attribute +of a qandaset element. + + + +none + +No distinguishing label precedes Questions or Answers. - - - - + + + -- 2.40.0