@pretextbook/pretext-html 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,5 +3,5 @@
3
3
  "repository": "PreTeXtBook/pretext",
4
4
  "ref": "master"
5
5
  },
6
- "refreshed": "2026-08-20T14:22:45.334Z"
6
+ "refreshed": "2026-08-21T22:01:23.781Z"
7
7
  }
@@ -482,13 +482,11 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
482
482
  <xsl:template match="node()|@*" mode="augment">
483
483
  <xsl:param name="parent-struct" select="''"/>
484
484
  <xsl:param name="level" select="0"/>
485
- <xsl:param name="ordered-list-level" select="0"/>
486
485
 
487
486
  <xsl:copy>
488
487
  <xsl:apply-templates select="node()|@*" mode="augment">
489
488
  <xsl:with-param name="parent-struct" select="$parent-struct"/>
490
489
  <xsl:with-param name="level" select="$level"/>
491
- <xsl:with-param name="ordered-list-level" select="$ordered-list-level"/>
492
490
  </xsl:apply-templates>
493
491
  </xsl:copy>
494
492
  </xsl:template>
@@ -3660,6 +3658,28 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3660
3658
  <!-- whole, and the deprecation warning says so plainly -->
3661
3659
  <xsl:template match="references/conclusion" mode="repair"/>
3662
3660
 
3661
+ <!-- 2026-08-20 "ol" structuring an "exercise" is deprecated -->
3662
+
3663
+ <!-- An "ol" as a child of an "exercise", or of its "statement", -->
3664
+ <!-- once lettered its items like exercise parts. The list is -->
3665
+ <!-- wrapped in a "p" here, like any other list in running prose. -->
3666
+ <!-- Within the divisions that historically lettered these lists, -->
3667
+ <!-- a stamp preserves the extra list level for existing sources; -->
3668
+ <!-- new sources letter a list with marker="(a)", or structure -->
3669
+ <!-- real parts with "task". The deprecation warning says so. -->
3670
+ <xsl:template match="exercise/ol|exercise/statement/ol" mode="repair">
3671
+ <p>
3672
+ <xsl:copy>
3673
+ <xsl:if test="ancestor::exercises or ancestor::reading-questions or ancestor::worksheet or ancestor::handout">
3674
+ <xsl:attribute name="pi:legacy-parts">
3675
+ <xsl:text>yes</xsl:text>
3676
+ </xsl:attribute>
3677
+ </xsl:if>
3678
+ <xsl:apply-templates select="node()|@*" mode="repair"/>
3679
+ </xsl:copy>
3680
+ </p>
3681
+ </xsl:template>
3682
+
3663
3683
  <!-- ########## -->
3664
3684
  <!-- Enrichment -->
3665
3685
  <!-- ########## -->
@@ -4034,7 +4054,6 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4034
4054
  <xsl:template match="part|chapter|appendix|section|subsection|subsubsection|exercises|solutions|reading-questions|references|glossary|worksheet|handout" mode="augment">
4035
4055
  <xsl:param name="parent-struct"/>
4036
4056
  <xsl:param name="level"/>
4037
- <xsl:param name="ordered-list-level" />
4038
4057
 
4039
4058
  <xsl:variable name="the-serial">
4040
4059
  <xsl:apply-templates select="." mode="division-serial-number"/>
@@ -4084,16 +4103,6 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4084
4103
  </xsl:choose>
4085
4104
  </xsl:variable>
4086
4105
  <xsl:variable name="next-level" select="$level + 1"/>
4087
- <xsl:variable name="next-ordered-list-level">
4088
- <xsl:choose>
4089
- <xsl:when test="self::exercises or self::worksheet or self::handout or self::reading-questions or self::references">
4090
- <xsl:number value="1" />
4091
- </xsl:when>
4092
- <xsl:otherwise>
4093
- <xsl:number value="0" />
4094
- </xsl:otherwise>
4095
- </xsl:choose>
4096
- </xsl:variable>
4097
4106
  <xsl:copy>
4098
4107
  <xsl:attribute name="pi:struct">
4099
4108
  <xsl:value-of select="$parent-struct"/>
@@ -4114,7 +4123,6 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4114
4123
  <xsl:apply-templates select="node()|@*" mode="augment">
4115
4124
  <xsl:with-param name="parent-struct" select="$new-struct"/>
4116
4125
  <xsl:with-param name="level" select="$next-level"/>
4117
- <xsl:with-param name="ordered-list-level" select="$next-ordered-list-level"/>
4118
4126
  </xsl:apply-templates>
4119
4127
  </xsl:copy>
4120
4128
  </xsl:template>
@@ -4130,7 +4138,6 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4130
4138
  <xsl:apply-templates select="node()|@*" mode="augment">
4131
4139
  <xsl:with-param name="parent-struct" select="''"/>
4132
4140
  <xsl:with-param name="level" select="0"/>
4133
- <xsl:with-param name="ordered-list-level" select="0"/>
4134
4141
  </xsl:apply-templates>
4135
4142
  </xsl:copy>
4136
4143
  </xsl:template>
@@ -4201,7 +4208,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4201
4208
  <xsl:when test="$level='2'">i</xsl:when>
4202
4209
  <xsl:when test="$level='3'">A</xsl:when>
4203
4210
  <xsl:otherwise>
4204
- <xsl:message>PTX:ERROR: ordered list is more than 4 levels deep (at level <xsl:value-of select="$level" />) or is inside an "exercise" and is more than 3 levels deep (at level <xsl:value-of select="$level - 1" />)</xsl:message>
4211
+ <xsl:message>PTX:ERROR: ordered list is more than 4 levels deep (at level <xsl:value-of select="$level" />; a legacy exercise-parts list counts one level extra)</xsl:message>
4205
4212
  </xsl:otherwise>
4206
4213
  </xsl:choose>
4207
4214
  </xsl:otherwise>
@@ -4209,8 +4216,11 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4209
4216
  </xsl:template>
4210
4217
 
4211
4218
  <xsl:template match="ol" mode="augment">
4212
- <xsl:param name="ordered-list-level"/>
4213
- <xsl:variable name="next-level" select="$ordered-list-level + 1" />
4219
+ <!-- The list level is intrinsic: a count of enclosing ordered -->
4220
+ <!-- lists, raised by one within a list the repair phase stamped -->
4221
+ <!-- as a legacy exercise-parts list (the stamp lifts the whole -->
4222
+ <!-- nest, so sublists letter as they always have). -->
4223
+ <xsl:variable name="ordered-list-level" select="count(ancestor::ol) + number(boolean(ancestor-or-self::ol[@pi:legacy-parts]))"/>
4214
4224
  <xsl:variable name="format-code">
4215
4225
  <xsl:apply-templates select="." mode="format-code">
4216
4226
  <xsl:with-param name="level" select="$ordered-list-level"/>
@@ -4256,9 +4266,62 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4256
4266
  <xsl:attribute name="pi:marker-suffix">
4257
4267
  <xsl:value-of select="$marker-suffix"/>
4258
4268
  </xsl:attribute>
4259
- <xsl:apply-templates select="node()|@*" mode="augment">
4260
- <xsl:with-param name="ordered-list-level" select="$next-level"/>
4269
+ <xsl:apply-templates select="node()|@*" mode="augment"/>
4270
+ </xsl:copy>
4271
+ </xsl:template>
4272
+
4273
+ <!-- The stamp has served its purpose once the level is recorded, -->
4274
+ <!-- so it does not survive into the assembled tree. -->
4275
+ <xsl:template match="@pi:legacy-parts" mode="augment"/>
4276
+
4277
+ <!-- List levels and format codes are ancestor-axis computations -->
4278
+ <!-- that *could* be made at conversion time in -common; we simply -->
4279
+ <!-- choose to make them once, here in assembly, and stamp the -->
4280
+ <!-- results. Unordered lists follow the pattern of ordered lists -->
4281
+ <!-- above: an authored @marker wins, else defaults cycle by depth. -->
4282
+
4283
+ <!-- Labels of unordered lists have format codes: -->
4284
+ <!-- disc, circle, square, or none. Default order: -->
4285
+ <!-- disc, circle, square, disc. -->
4286
+ <xsl:template match="ul" mode="format-code">
4287
+ <xsl:param name="level"/>
4288
+ <xsl:choose>
4289
+ <xsl:when test="@marker">
4290
+ <xsl:choose>
4291
+ <xsl:when test="@marker='disc'">disc</xsl:when>
4292
+ <xsl:when test="@marker='circle'">circle</xsl:when>
4293
+ <xsl:when test="@marker='square'">square</xsl:when>
4294
+ <xsl:when test="@marker=''">none</xsl:when>
4295
+ <xsl:otherwise>
4296
+ <xsl:message>PTX:ERROR: unordered list label (<xsl:value-of select="@marker" />) not recognized</xsl:message>
4297
+ </xsl:otherwise>
4298
+ </xsl:choose>
4299
+ </xsl:when>
4300
+ <xsl:otherwise>
4301
+ <xsl:choose>
4302
+ <xsl:when test="$level='0'">disc</xsl:when>
4303
+ <xsl:when test="$level='1'">circle</xsl:when>
4304
+ <xsl:when test="$level='2'">square</xsl:when>
4305
+ <xsl:when test="$level='3'">disc</xsl:when>
4306
+ <xsl:otherwise>
4307
+ <xsl:message>PTX:ERROR: unordered list is more than 4 levels deep (at level <xsl:value-of select="$level" />)</xsl:message>
4308
+ </xsl:otherwise>
4309
+ </xsl:choose>
4310
+ </xsl:otherwise>
4311
+ </xsl:choose>
4312
+ </xsl:template>
4313
+
4314
+ <xsl:template match="ul" mode="augment">
4315
+ <xsl:variable name="format-code">
4316
+ <xsl:apply-templates select="." mode="format-code">
4317
+ <xsl:with-param name="level" select="count(ancestor::ul)"/>
4261
4318
  </xsl:apply-templates>
4319
+ </xsl:variable>
4320
+ <xsl:copy>
4321
+ <xsl:attribute name="pi:format-code">
4322
+ <xsl:value-of select="$format-code"/>
4323
+ </xsl:attribute>
4324
+ <xsl:apply-templates select="node()|@*" mode="augment"/>
4262
4325
  </xsl:copy>
4263
4326
  </xsl:template>
4264
4327
 
@@ -1209,9 +1209,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1209
1209
  </xsl:template>
1210
1210
 
1211
1211
  <xsl:template match="ul/li" mode="unicode-list-marker">
1212
- <xsl:variable name="format-code">
1213
- <xsl:apply-templates select="parent::ul" mode="format-code"/>
1214
- </xsl:variable>
1212
+ <xsl:variable name="format-code" select="parent::ul/@pi:format-code"/>
1215
1213
  <!-- The list label. The file en-ueb-chardefs.uti -->
1216
1214
  <!-- associates these Unicode values with the indicated -->
1217
1215
  <!-- dot patterns. This jibes with [BANA-2016, 8.6.2], -->
@@ -5122,61 +5122,6 @@ Book (with parts), "section" at level 3
5122
5122
  <!-- Utility templates to determine the depth -->
5123
5123
  <!-- of a list, relative to nesting in other lists -->
5124
5124
 
5125
- <!-- We determine the depth of an unordered -->
5126
- <!-- list, relative only to other unordered -->
5127
- <!-- lists in a nesting, so as to determine -->
5128
- <!-- the right label to apply, esp. as defaults -->
5129
- <!-- The recursive template should be called -->
5130
- <!-- without a level, since it defaults to zero -->
5131
- <xsl:template match="ul" mode="unordered-list-level">
5132
- <!-- Start with level zero, and increment on successive calls -->
5133
- <xsl:param name="level" select="0"/>
5134
- <xsl:choose>
5135
- <!-- Another unordered list above, add one and recurse -->
5136
- <xsl:when test="ancestor::ul">
5137
- <xsl:apply-templates select="ancestor::ul[1]" mode="unordered-list-level">
5138
- <xsl:with-param name="level" select="$level + 1" />
5139
- </xsl:apply-templates>
5140
- </xsl:when>
5141
- <!-- No unordered list above, done, so return level -->
5142
- <xsl:otherwise>
5143
- <xsl:value-of select="$level" />
5144
- </xsl:otherwise>
5145
- </xsl:choose>
5146
- </xsl:template>
5147
-
5148
- <!-- Ordered lists follow the same strategy, -->
5149
- <!-- except we implement exercises and references -->
5150
- <!-- elements as ordered lists, so we need to absorb -->
5151
- <!-- them into the general treatment of nested lists -->
5152
- <!-- They do only occur as top-level elements, so that -->
5153
- <!-- assumption allows for some economy -->
5154
- <xsl:template match="ol" mode="ordered-list-level">
5155
- <xsl:param name="level" select="0"/>
5156
- <xsl:choose>
5157
- <!-- Since exercises divisions and references are top-level -->
5158
- <!-- ordered lists, when these are the only interesting -->
5159
- <!-- ancestor, we add one to the level and return -->
5160
- <xsl:when test="(ancestor::exercises or ancestor::worksheet or ancestor::handout or ancestor::reading-questions or ancestor::references) and not(ancestor::ol)">
5161
- <xsl:value-of select="$level + 1" />
5162
- </xsl:when>
5163
- <xsl:when test="ancestor::ol">
5164
- <xsl:apply-templates select="ancestor::ol[1]" mode="ordered-list-level">
5165
- <xsl:with-param name="level" select="$level + 1" />
5166
- </xsl:apply-templates>
5167
- </xsl:when>
5168
- <xsl:otherwise>
5169
- <xsl:value-of select="$level" />
5170
- </xsl:otherwise>
5171
- </xsl:choose>
5172
- </xsl:template>
5173
-
5174
- <!-- Exercises and References are -->
5175
- <!-- specialized top-level ordered lists -->
5176
- <xsl:template match="exercises|worksheet|handout|reading-questions|references" mode="ordered-list-level">
5177
- <xsl:value-of select="0" />
5178
- </xsl:template>
5179
-
5180
5125
  <!-- To indent properly in markdown, we -->
5181
5126
  <!-- need to count every type of list -->
5182
5127
  <xsl:template match="*" mode="list-level">
@@ -5205,41 +5150,6 @@ Book (with parts), "section" at level 3
5205
5150
  </xsl:choose>
5206
5151
  </xsl:template>
5207
5152
 
5208
- <!-- Labels of unordered list have formatting codes, which -->
5209
- <!-- we detect here and pass on to other more specialized -->
5210
- <!-- templates for implementation specifics -->
5211
- <!-- disc, circle, square or blank are the options -->
5212
- <!-- Default order: disc, circle, square, disc -->
5213
- <xsl:template match="ul" mode="format-code">
5214
- <xsl:choose>
5215
- <xsl:when test="@marker">
5216
- <xsl:choose>
5217
- <xsl:when test="@marker='disc'">disc</xsl:when>
5218
- <xsl:when test="@marker='circle'">circle</xsl:when>
5219
- <xsl:when test="@marker='square'">square</xsl:when>
5220
- <xsl:when test="@marker=''">none</xsl:when>
5221
- <xsl:otherwise>
5222
- <xsl:message>PTX:ERROR: unordered list label (<xsl:value-of select="@marker" />) not recognized</xsl:message>
5223
- </xsl:otherwise>
5224
- </xsl:choose>
5225
- </xsl:when>
5226
- <xsl:otherwise>
5227
- <xsl:variable name="level">
5228
- <xsl:apply-templates select="." mode="unordered-list-level" />
5229
- </xsl:variable>
5230
- <xsl:choose>
5231
- <xsl:when test="$level='0'">disc</xsl:when>
5232
- <xsl:when test="$level='1'">circle</xsl:when>
5233
- <xsl:when test="$level='2'">square</xsl:when>
5234
- <xsl:when test="$level='3'">disc</xsl:when>
5235
- <xsl:otherwise>
5236
- <xsl:message>PTX:ERROR: unordered list is more than 4 levels deep (at level <xsl:value-of select="$level" />)</xsl:message>
5237
- </xsl:otherwise>
5238
- </xsl:choose>
5239
- </xsl:otherwise>
5240
- </xsl:choose>
5241
- </xsl:template>
5242
-
5243
5153
  <!-- CSS class for multi-column lists. Context is an element with -->
5244
5154
  <!-- a potential "cols" attribute. Return value is "colsN" with -->
5245
5155
  <!-- 2 <= N <= 6, or empty when @cols is absent. -->
@@ -12030,6 +11940,20 @@ http://andrewmccarthy.ie/2014/11/06/swung-dash-in-latex/
12030
11940
  <xsl:with-param name="message" select="'a &quot;references&quot; division no longer has a &quot;conclusion&quot;. The element is discarded entirely: its content will not appear in any output. Please relocate the content, perhaps following the &quot;references&quot;'"/>
12031
11941
  </xsl:call-template>
12032
11942
  <!-- -->
11943
+ <!-- 2026-08-20 "ol" as a child of "exercise" is obsolete -->
11944
+ <xsl:call-template name="deprecation-message">
11945
+ <xsl:with-param name="occurrences" select="&quot;$document-root//exercise/ol&quot;" />
11946
+ <xsl:with-param name="date-string" select="'2026-08-20'" />
11947
+ <xsl:with-param name="message" select="'an &quot;ol&quot; is no longer a child of an &quot;exercise&quot;; a list belongs inside a &quot;p&quot;. We will wrap it for you, and lettered exercise parts will letter as before. Please convert: structure true parts with &quot;task&quot;, letter a plain list with marker=&quot;(a)&quot;, or consider an &quot;exercisegroup&quot; and its cols attribute for a compact multi-column layout'"/>
11948
+ </xsl:call-template>
11949
+ <!-- -->
11950
+ <!-- 2026-08-20 "ol" as a child of an exercise "statement" is obsolete -->
11951
+ <xsl:call-template name="deprecation-message">
11952
+ <xsl:with-param name="occurrences" select="&quot;$document-root//exercise/statement/ol&quot;" />
11953
+ <xsl:with-param name="date-string" select="'2026-08-20'" />
11954
+ <xsl:with-param name="message" select="'an &quot;ol&quot; is no longer a child of an &quot;exercise&quot; &quot;statement&quot;; a list belongs inside a &quot;p&quot;. We will wrap it for you, and lettered exercise parts will letter as before. Please convert: structure true parts with &quot;task&quot;, letter a plain list with marker=&quot;(a)&quot;, or consider an &quot;exercisegroup&quot; and its cols attribute for a compact multi-column layout'"/>
11955
+ </xsl:call-template>
11956
+ <!-- -->
12033
11957
  </xsl:template>
12034
11958
 
12035
11959
  <!-- Miscellaneous -->
@@ -2046,13 +2046,11 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2046
2046
  <xsl:value-of select="parent::ol/@pi:marker-suffix"/>
2047
2047
  </xsl:template>
2048
2048
 
2049
- <!-- Bullets via the "format-code" machinery of pretext-common.xsl, -->
2050
- <!-- which cycles disc, circle, square by level, and honors an -->
2051
- <!-- authored @marker (the empty @marker giving no bullet at all). -->
2049
+ <!-- Bullets via the format code stamped during assembly, which -->
2050
+ <!-- cycles disc, circle, square by level, and honors an authored -->
2051
+ <!-- @marker (the empty @marker giving no bullet at all). -->
2052
2052
  <xsl:template match="ul/li" mode="list-label">
2053
- <xsl:variable name="format-code">
2054
- <xsl:apply-templates select="parent::ul" mode="format-code"/>
2055
- </xsl:variable>
2053
+ <xsl:variable name="format-code" select="parent::ul/@pi:format-code"/>
2056
2054
  <xsl:choose>
2057
2055
  <xsl:when test="$format-code = 'disc'">
2058
2056
  <xsl:text>&#x2022;</xsl:text>
@@ -6169,14 +6169,14 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
6169
6169
  <!-- Utility templates to translate PTX -->
6170
6170
  <!-- enumeration style to HTML list-style-type -->
6171
6171
  <xsl:template match="ol|ol-marker" mode="html-list-class">
6172
- <xsl:variable name="mbx-format-code" select="./@pi:format-code" />
6172
+ <xsl:variable name="ptx-format-code" select="./@pi:format-code" />
6173
6173
  <xsl:choose>
6174
- <xsl:when test="$mbx-format-code = '0'">decimal</xsl:when>
6175
- <xsl:when test="$mbx-format-code = '1'">decimal</xsl:when>
6176
- <xsl:when test="$mbx-format-code = 'a'">lower-alpha</xsl:when>
6177
- <xsl:when test="$mbx-format-code = 'A'">upper-alpha</xsl:when>
6178
- <xsl:when test="$mbx-format-code = 'i'">lower-roman</xsl:when>
6179
- <xsl:when test="$mbx-format-code = 'I'">upper-roman</xsl:when>
6174
+ <xsl:when test="$ptx-format-code = '0'">decimal</xsl:when>
6175
+ <xsl:when test="$ptx-format-code = '1'">decimal</xsl:when>
6176
+ <xsl:when test="$ptx-format-code = 'a'">lower-alpha</xsl:when>
6177
+ <xsl:when test="$ptx-format-code = 'A'">upper-alpha</xsl:when>
6178
+ <xsl:when test="$ptx-format-code = 'i'">lower-roman</xsl:when>
6179
+ <xsl:when test="$ptx-format-code = 'I'">upper-roman</xsl:when>
6180
6180
  <xsl:otherwise>
6181
6181
  <xsl:message>PTX:BUG: bad ordered list label format code in HTML conversion</xsl:message>
6182
6182
  </xsl:otherwise>
@@ -6184,14 +6184,12 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
6184
6184
  </xsl:template>
6185
6185
 
6186
6186
  <xsl:template match="ul" mode="html-list-class">
6187
- <xsl:variable name="mbx-format-code">
6188
- <xsl:apply-templates select="." mode="format-code" />
6189
- </xsl:variable>
6187
+ <xsl:variable name="ptx-format-code" select="./@pi:format-code"/>
6190
6188
  <xsl:choose>
6191
- <xsl:when test="$mbx-format-code = 'disc'">disc</xsl:when>
6192
- <xsl:when test="$mbx-format-code = 'circle'">circle</xsl:when>
6193
- <xsl:when test="$mbx-format-code = 'square'">square</xsl:when>
6194
- <xsl:when test="$mbx-format-code = 'none'">no-marker</xsl:when>
6189
+ <xsl:when test="$ptx-format-code = 'disc'">disc</xsl:when>
6190
+ <xsl:when test="$ptx-format-code = 'circle'">circle</xsl:when>
6191
+ <xsl:when test="$ptx-format-code = 'square'">square</xsl:when>
6192
+ <xsl:when test="$ptx-format-code = 'none'">no-marker</xsl:when>
6195
6193
  <xsl:otherwise>
6196
6194
  <xsl:message>PTX:BUG: bad unordered list label format code in HTML conversion</xsl:message>
6197
6195
  </xsl:otherwise>
@@ -6205,18 +6203,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
6205
6203
  <xsl:template match="ol|ul">
6206
6204
  <xsl:param name="b-original" select="true()" />
6207
6205
  <xsl:param name="heading-level"/>
6208
- <!-- need to switch on 0-1 for ol Arabic -->
6209
- <!-- no harm if called on "ul" -->
6210
- <xsl:variable name="mbx-format-code">
6211
- <xsl:choose>
6212
- <xsl:when test="self::ol">
6213
- <xsl:value-of select="./@pi:format-code" />
6214
- </xsl:when>
6215
- <xsl:otherwise>
6216
- <xsl:apply-templates select="." mode="format-code" />
6217
- </xsl:otherwise>
6218
- </xsl:choose>
6219
- </xsl:variable>
6206
+ <xsl:variable name="ptx-format-code" select="./@pi:format-code"/>
6220
6207
  <!-- newline inserted to encourage formatted output -->
6221
6208
  <xsl:text>&#xa;</xsl:text>
6222
6209
  <xsl:element name="{local-name(.)}">
@@ -6241,7 +6228,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
6241
6228
  <xsl:attribute name="id">
6242
6229
  <xsl:apply-templates select="." mode="html-id" />
6243
6230
  </xsl:attribute>
6244
- <xsl:if test="$mbx-format-code = '0'">
6231
+ <xsl:if test="$ptx-format-code = '0'">
6245
6232
  <xsl:attribute name="start">
6246
6233
  <xsl:text>0</xsl:text>
6247
6234
  </xsl:attribute>
@@ -5733,9 +5733,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
5733
5733
  </xsl:template>
5734
5734
 
5735
5735
  <xsl:template match="ul" mode="latex-list-label">
5736
- <xsl:variable name="format-code">
5737
- <xsl:apply-templates select="." mode="format-code" />
5738
- </xsl:variable>
5736
+ <xsl:variable name="format-code" select="./@pi:format-code"/>
5739
5737
  <xsl:choose>
5740
5738
  <xsl:when test="$format-code = 'disc'">\ptxlistdisc</xsl:when>
5741
5739
  <xsl:when test="$format-code = 'circle'">\ptxlistcircle</xsl:when>
@@ -5748,26 +5746,6 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
5748
5746
  </xsl:template>
5749
5747
 
5750
5748
 
5751
- <!-- Utility template to translate unordered -->
5752
- <!-- list level to HTML list-style-type -->
5753
- <!-- This is similar to Firefox default choices -->
5754
- <!-- but different in the fourth slot -->
5755
- <!-- disc, circle, square, disc -->
5756
- <xsl:template match="*" mode="latex-unordered-list-label-default">
5757
- <xsl:variable name="level">
5758
- <xsl:apply-templates select="." mode="unordered-list-level" />
5759
- </xsl:variable>
5760
- <xsl:choose>
5761
- <xsl:when test="$level='0'">\ptxlistdisc</xsl:when>
5762
- <xsl:when test="$level='1'">\ptxlistcircle</xsl:when>
5763
- <xsl:when test="$level='2'">\ptxlistsquare</xsl:when>
5764
- <xsl:when test="$level='3'">\ptxlistdisc</xsl:when>
5765
- <xsl:otherwise>
5766
- <xsl:message>PTX:ERROR: unordered list is more than 4 levels deep</xsl:message>
5767
- </xsl:otherwise>
5768
- </xsl:choose>
5769
- </xsl:template>
5770
-
5771
5749
  <!-- Lists themselves -->
5772
5750
  <!-- If columns are specified, we -->
5773
5751
  <!-- wrap in the multicolumn environment -->