@pretextbook/pretext-html 0.2.0 → 0.4.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.
Files changed (48) hide show
  1. package/README.md +37 -6
  2. package/assets/preview-html.xsl +8 -4
  3. package/assets/upstream.json +1 -1
  4. package/assets/xsl/README.md +25 -24
  5. package/assets/xsl/entities.ent +20 -0
  6. package/assets/xsl/extract-biblio-csl.xsl +1 -1
  7. package/assets/xsl/extract-pg.xsl +111 -297
  8. package/assets/xsl/extract-qrcode.xsl +11 -1
  9. package/assets/xsl/extract-sageplot.xsl +1 -1
  10. package/assets/xsl/latex/pretext-latex-texstyle.xsl +1 -2
  11. package/assets/xsl/localizations/README.md +24 -24
  12. package/assets/xsl/pretext-assembly.xsl +101 -11
  13. package/assets/xsl/pretext-beamer.xsl +43 -146
  14. package/assets/xsl/pretext-braille-preprint.xsl +457 -201
  15. package/assets/xsl/pretext-common.xsl +388 -423
  16. package/assets/xsl/pretext-epub.xsl +301 -72
  17. package/assets/xsl/pretext-fo.xsl +70 -86
  18. package/assets/xsl/pretext-html.xsl +331 -259
  19. package/assets/xsl/pretext-jupyter.xsl +534 -322
  20. package/assets/xsl/pretext-latex-classic.xsl +14 -15
  21. package/assets/xsl/pretext-latex-common.xsl +385 -2389
  22. package/assets/xsl/pretext-latex.xsl +1995 -5
  23. package/assets/xsl/pretext-markdown.xsl +919 -0
  24. package/assets/xsl/pretext-numbers.xsl +22 -4
  25. package/assets/xsl/pretext-revealjs.xsl +241 -33
  26. package/assets/xsl/pretext-runestone-fitb.xsl +20 -22
  27. package/assets/xsl/pretext-runestone.xsl +3 -3
  28. package/assets/xsl/pretext-sage-doctest.xsl +2 -2
  29. package/assets/xsl/pretext-text-utilities.xsl +69 -1
  30. package/assets/xsl/pretext-text.xsl +1077 -107
  31. package/assets/xsl/publisher-variables.xsl +396 -452
  32. package/assets/xsl/support/play-button/README.md +1 -3
  33. package/assets/xsl/tests/README.md +1 -1
  34. package/assets/xsl/utilities/README.md +6 -8
  35. package/assets/xsl/utilities/report-publisher-variables.xsl +15 -0
  36. package/assets/xsl-bundle.json +1 -1
  37. package/dist/assets.d.ts +43 -0
  38. package/dist/assets.js +76 -0
  39. package/dist/cli-Cp6C0sif.js +654 -0
  40. package/dist/cli.js +1 -1
  41. package/dist/index.browser.js +367 -307
  42. package/dist/index.d.ts +5 -0
  43. package/dist/index.js +16 -11
  44. package/dist/missing-asset.d.ts +31 -0
  45. package/dist/publication.d.ts +36 -1
  46. package/dist/renderer.d.ts +49 -0
  47. package/package.json +9 -1
  48. package/dist/cli-B2LiKunq.js +0 -588
@@ -105,6 +105,38 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
105
105
  <!-- as an empty string -->
106
106
  <xsl:variable name="chunk-level-entered" select="string($chunks)"/>
107
107
 
108
+ <!-- ############################# -->
109
+ <!-- Structure of the Version Tree -->
110
+ <!-- ############################# -->
111
+
112
+ <!-- Some defaults below depend on the document's structure, which -->
113
+ <!-- can differ by version, so they consult the assembly "version" -->
114
+ <!-- pass via $version-root. Later assembly passes depend on those -->
115
+ <!-- variables in turn; the dependencies stay acyclic because the -->
116
+ <!-- passes up to, and including, "version" never consult a -->
117
+ <!-- structure-dependent variable. The facts below are the crossing -->
118
+ <!-- point: the only place a publisher variable consults -->
119
+ <!-- $version-root, so the structure-dependent population is easy to -->
120
+ <!-- enumerate. (Exception: deprecated "docinfo" consultations, -->
121
+ <!-- marked where they occur, which will disappear with them.) -->
122
+
123
+ <!-- the document type is the element being converted -->
124
+ <xsl:variable name="version-doc-type" select="local-name($version-document-root)"/>
125
+
126
+ <!-- N.B. consumers disagree on which section-like elements make an -->
127
+ <!-- article "sectioned": numbering counts "worksheet", chunking -->
128
+ <!-- does not, and the table of contents also counts "handout". -->
129
+ <!-- The facts preserve those historical memberships. -->
130
+ <!-- TODO: harmonize the memberships — a deliberate, -->
131
+ <!-- behavior-changing design decision, deferred -->
132
+ <xsl:variable name="version-has-parts" select="boolean($version-root/book/part)"/>
133
+ <xsl:variable name="version-book-chapters" select="boolean($version-root/book/part/chapter|$version-root/book/chapter)"/>
134
+ <xsl:variable name="version-book-sections" select="boolean($version-root/book/part/chapter/section|$version-root/book/chapter/section)"/>
135
+ <xsl:variable name="version-article-sections" select="boolean($version-root/article/section)"/>
136
+ <xsl:variable name="version-article-worksheets" select="boolean($version-root/article/worksheet)"/>
137
+ <xsl:variable name="version-article-handouts" select="boolean($version-root/article/handout)"/>
138
+ <xsl:variable name="version-article-subsections" select="boolean($version-root/article/section/subsection)"/>
139
+
108
140
  <!-- A book must have a chapter -->
109
141
  <!-- An article need not have a section -->
110
142
  <!-- This gets replaced in -latex stylehseet -->
@@ -114,18 +146,18 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
114
146
  <xsl:template match="common/tableofcontents/pi:pub-attribute[@name='level']" mode="get-default-pub-variable">
115
147
  <xsl:choose>
116
148
  <!-- defaults purely by structure, not by output format -->
117
- <xsl:when test="$version-root/book/part/chapter/section">3</xsl:when>
118
- <xsl:when test="$version-root/book/part/chapter">2</xsl:when>
119
- <xsl:when test="$version-root/book/chapter/section">2</xsl:when>
120
- <xsl:when test="$version-root/book/chapter">1</xsl:when>
121
- <xsl:when test="$version-root/article/section/subsection">2</xsl:when>
122
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet|$version-root/article/handout">1</xsl:when>
123
- <xsl:when test="$version-root/article">0</xsl:when>
124
- <xsl:when test="$version-root/slideshow">0</xsl:when>
125
- <xsl:when test="$version-root/letter">0</xsl:when>
126
- <xsl:when test="$version-root/memo">0</xsl:when>
149
+ <xsl:when test="$version-has-parts and $version-book-sections">3</xsl:when>
150
+ <xsl:when test="$version-has-parts and $version-book-chapters">2</xsl:when>
151
+ <xsl:when test="$version-book-sections">2</xsl:when>
152
+ <xsl:when test="$version-book-chapters">1</xsl:when>
153
+ <xsl:when test="$version-article-subsections">2</xsl:when>
154
+ <xsl:when test="$version-article-sections or $version-article-worksheets or $version-article-handouts">1</xsl:when>
155
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
156
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
157
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
158
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
127
159
  <xsl:otherwise>
128
- <xsl:message>PTX:ERROR: Table of Contents level not determined</xsl:message>
160
+ <xsl:message>PTX:BUG: Table of Contents level not determined</xsl:message>
129
161
  </xsl:otherwise>
130
162
  </xsl:choose>
131
163
  </xsl:template>
@@ -358,7 +390,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
358
390
  <xsl:text>no</xsl:text>
359
391
  </xsl:when>
360
392
  <xsl:otherwise>
361
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-inline/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
393
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-inline/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
362
394
  <xsl:text>yes</xsl:text>
363
395
  </xsl:otherwise>
364
396
  </xsl:choose>
@@ -378,7 +410,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
378
410
  <xsl:value-of select="$exercise.text.statement" />
379
411
  </xsl:when>
380
412
  <xsl:otherwise>
381
- <xsl:message >PTX:WARNING: exercise.inline.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.statement" />". Proceeding with default value.</xsl:message>
413
+ <xsl:message >PTX:FALLBACK: exercise.inline.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.statement" />". Proceeding with default value.</xsl:message>
382
414
  </xsl:otherwise>
383
415
  </xsl:choose>
384
416
  </xsl:variable>
@@ -394,7 +426,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
394
426
  <xsl:text>no</xsl:text>
395
427
  </xsl:when>
396
428
  <xsl:otherwise>
397
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-inline/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
429
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-inline/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
398
430
  <xsl:text>yes</xsl:text>
399
431
  </xsl:otherwise>
400
432
  </xsl:choose>
@@ -414,7 +446,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
414
446
  <xsl:value-of select="$exercise.text.hint" />
415
447
  </xsl:when>
416
448
  <xsl:otherwise>
417
- <xsl:message >PTX:WARNING: exercise.inline.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.hint" />". Proceeding with default value.</xsl:message>
449
+ <xsl:message >PTX:FALLBACK: exercise.inline.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.hint" />". Proceeding with default value.</xsl:message>
418
450
  </xsl:otherwise>
419
451
  </xsl:choose>
420
452
  </xsl:variable>
@@ -430,7 +462,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
430
462
  <xsl:text>no</xsl:text>
431
463
  </xsl:when>
432
464
  <xsl:otherwise>
433
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-inline/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
465
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-inline/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
434
466
  <xsl:text>yes</xsl:text>
435
467
  </xsl:otherwise>
436
468
  </xsl:choose>
@@ -450,7 +482,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
450
482
  <xsl:value-of select="$exercise.text.answer" />
451
483
  </xsl:when>
452
484
  <xsl:otherwise>
453
- <xsl:message >PTX:WARNING: exercise.inline.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.answer" />". Proceeding with default value.</xsl:message>
485
+ <xsl:message >PTX:FALLBACK: exercise.inline.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.answer" />". Proceeding with default value.</xsl:message>
454
486
  </xsl:otherwise>
455
487
  </xsl:choose>
456
488
  </xsl:variable>
@@ -466,7 +498,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
466
498
  <xsl:text>no</xsl:text>
467
499
  </xsl:when>
468
500
  <xsl:otherwise>
469
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-inline/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
501
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-inline/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-inline/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
470
502
  <xsl:text>yes</xsl:text>
471
503
  </xsl:otherwise>
472
504
  </xsl:choose>
@@ -486,7 +518,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
486
518
  <xsl:value-of select="$exercise.text.solution" />
487
519
  </xsl:when>
488
520
  <xsl:otherwise>
489
- <xsl:message >PTX:WARNING: exercise.inline.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.solution" />". Proceeding with default value.</xsl:message>
521
+ <xsl:message >PTX:FALLBACK: exercise.inline.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.inline.solution" />". Proceeding with default value.</xsl:message>
490
522
  </xsl:otherwise>
491
523
  </xsl:choose>
492
524
  </xsl:variable>
@@ -502,7 +534,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
502
534
  <xsl:text>no</xsl:text>
503
535
  </xsl:when>
504
536
  <xsl:otherwise>
505
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-divisional/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
537
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-divisional/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
506
538
  <xsl:text>yes</xsl:text>
507
539
  </xsl:otherwise>
508
540
  </xsl:choose>
@@ -522,7 +554,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
522
554
  <xsl:value-of select="$exercise.divisional.statement" />
523
555
  </xsl:when>
524
556
  <xsl:otherwise>
525
- <xsl:message >PTX:WARNING: exercise.divisional.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.statement" />". Proceeding with default value.</xsl:message>
557
+ <xsl:message >PTX:FALLBACK: exercise.divisional.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.statement" />". Proceeding with default value.</xsl:message>
526
558
  </xsl:otherwise>
527
559
  </xsl:choose>
528
560
  </xsl:variable>
@@ -538,7 +570,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
538
570
  <xsl:text>no</xsl:text>
539
571
  </xsl:when>
540
572
  <xsl:otherwise>
541
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-divisional/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
573
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-divisional/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
542
574
  <xsl:text>yes</xsl:text>
543
575
  </xsl:otherwise>
544
576
  </xsl:choose>
@@ -558,7 +590,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
558
590
  <xsl:value-of select="$exercise.divisional.hint" />
559
591
  </xsl:when>
560
592
  <xsl:otherwise>
561
- <xsl:message >PTX:WARNING: exercise.divisional.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.hint" />". Proceeding with default value.</xsl:message>
593
+ <xsl:message >PTX:FALLBACK: exercise.divisional.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.hint" />". Proceeding with default value.</xsl:message>
562
594
  </xsl:otherwise>
563
595
  </xsl:choose>
564
596
  </xsl:variable>
@@ -574,7 +606,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
574
606
  <xsl:text>no</xsl:text>
575
607
  </xsl:when>
576
608
  <xsl:otherwise>
577
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-divisional/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
609
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-divisional/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
578
610
  <xsl:text>yes</xsl:text>
579
611
  </xsl:otherwise>
580
612
  </xsl:choose>
@@ -594,7 +626,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
594
626
  <xsl:value-of select="$exercise.divisional.answer" />
595
627
  </xsl:when>
596
628
  <xsl:otherwise>
597
- <xsl:message >PTX:WARNING: exercise.divisional.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.answer" />". Proceeding with default value.</xsl:message>
629
+ <xsl:message >PTX:FALLBACK: exercise.divisional.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.answer" />". Proceeding with default value.</xsl:message>
598
630
  </xsl:otherwise>
599
631
  </xsl:choose>
600
632
  </xsl:variable>
@@ -610,7 +642,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
610
642
  <xsl:text>no</xsl:text>
611
643
  </xsl:when>
612
644
  <xsl:otherwise>
613
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-divisional/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
645
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-divisional/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-divisional/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
614
646
  <xsl:text>yes</xsl:text>
615
647
  </xsl:otherwise>
616
648
  </xsl:choose>
@@ -630,7 +662,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
630
662
  <xsl:value-of select="$exercise.divisional.solution" />
631
663
  </xsl:when>
632
664
  <xsl:otherwise>
633
- <xsl:message >PTX:WARNING: exercise.divisional.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.solution" />". Proceeding with default value.</xsl:message>
665
+ <xsl:message >PTX:FALLBACK: exercise.divisional.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.divisional.solution" />". Proceeding with default value.</xsl:message>
634
666
  </xsl:otherwise>
635
667
  </xsl:choose>
636
668
  </xsl:variable>
@@ -646,7 +678,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
646
678
  <xsl:text>no</xsl:text>
647
679
  </xsl:when>
648
680
  <xsl:otherwise>
649
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-worksheet/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
681
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-worksheet/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
650
682
  <xsl:text>yes</xsl:text>
651
683
  </xsl:otherwise>
652
684
  </xsl:choose>
@@ -666,7 +698,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
666
698
  <xsl:value-of select="$exercise.worksheet.statement" />
667
699
  </xsl:when>
668
700
  <xsl:otherwise>
669
- <xsl:message >PTX:WARNING: exercise.worksheet.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.statement" />". Proceeding with default value.</xsl:message>
701
+ <xsl:message >PTX:FALLBACK: exercise.worksheet.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.statement" />". Proceeding with default value.</xsl:message>
670
702
  </xsl:otherwise>
671
703
  </xsl:choose>
672
704
  </xsl:variable>
@@ -682,7 +714,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
682
714
  <xsl:text>no</xsl:text>
683
715
  </xsl:when>
684
716
  <xsl:otherwise>
685
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-worksheet/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
717
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-worksheet/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
686
718
  <xsl:text>yes</xsl:text>
687
719
  </xsl:otherwise>
688
720
  </xsl:choose>
@@ -702,7 +734,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
702
734
  <xsl:value-of select="$exercise.worksheet.hint" />
703
735
  </xsl:when>
704
736
  <xsl:otherwise>
705
- <xsl:message >PTX:WARNING: exercise.worksheet.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.hint" />". Proceeding with default value.</xsl:message>
737
+ <xsl:message >PTX:FALLBACK: exercise.worksheet.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.hint" />". Proceeding with default value.</xsl:message>
706
738
  </xsl:otherwise>
707
739
  </xsl:choose>
708
740
  </xsl:variable>
@@ -718,7 +750,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
718
750
  <xsl:text>no</xsl:text>
719
751
  </xsl:when>
720
752
  <xsl:otherwise>
721
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-worksheet/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
753
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-worksheet/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
722
754
  <xsl:text>yes</xsl:text>
723
755
  </xsl:otherwise>
724
756
  </xsl:choose>
@@ -738,7 +770,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
738
770
  <xsl:value-of select="$exercise.worksheet.answer" />
739
771
  </xsl:when>
740
772
  <xsl:otherwise>
741
- <xsl:message >PTX:WARNING: exercise.worksheet.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.answer" />". Proceeding with default value.</xsl:message>
773
+ <xsl:message >PTX:FALLBACK: exercise.worksheet.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.answer" />". Proceeding with default value.</xsl:message>
742
774
  </xsl:otherwise>
743
775
  </xsl:choose>
744
776
  </xsl:variable>
@@ -754,7 +786,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
754
786
  <xsl:text>no</xsl:text>
755
787
  </xsl:when>
756
788
  <xsl:otherwise>
757
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-worksheet/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
789
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-worksheet/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-worksheet/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
758
790
  <xsl:text>yes</xsl:text>
759
791
  </xsl:otherwise>
760
792
  </xsl:choose>
@@ -774,7 +806,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
774
806
  <xsl:value-of select="$exercise.worksheet.solution" />
775
807
  </xsl:when>
776
808
  <xsl:otherwise>
777
- <xsl:message >PTX:WARNING: exercise.worksheet.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.solution" />". Proceeding with default value.</xsl:message>
809
+ <xsl:message >PTX:FALLBACK: exercise.worksheet.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.worksheet.solution" />". Proceeding with default value.</xsl:message>
778
810
  </xsl:otherwise>
779
811
  </xsl:choose>
780
812
  </xsl:variable>
@@ -790,7 +822,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
790
822
  <xsl:text>no</xsl:text>
791
823
  </xsl:when>
792
824
  <xsl:otherwise>
793
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-reading/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
825
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-reading/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
794
826
  <xsl:text>yes</xsl:text>
795
827
  </xsl:otherwise>
796
828
  </xsl:choose>
@@ -810,7 +842,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
810
842
  <xsl:value-of select="$exercise.reading.statement" />
811
843
  </xsl:when>
812
844
  <xsl:otherwise>
813
- <xsl:message >PTX:WARNING: exercise.reading.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.statement" />". Proceeding with default value.</xsl:message>
845
+ <xsl:message >PTX:FALLBACK: exercise.reading.statement parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.statement" />". Proceeding with default value.</xsl:message>
814
846
  </xsl:otherwise>
815
847
  </xsl:choose>
816
848
  </xsl:variable>
@@ -826,7 +858,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
826
858
  <xsl:text>no</xsl:text>
827
859
  </xsl:when>
828
860
  <xsl:otherwise>
829
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-reading/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
861
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-reading/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
830
862
  <xsl:text>yes</xsl:text>
831
863
  </xsl:otherwise>
832
864
  </xsl:choose>
@@ -846,7 +878,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
846
878
  <xsl:value-of select="$exercise.reading.hint" />
847
879
  </xsl:when>
848
880
  <xsl:otherwise>
849
- <xsl:message >PTX:WARNING: exercise.reading.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.hint" />". Proceeding with default value.</xsl:message>
881
+ <xsl:message >PTX:FALLBACK: exercise.reading.hint parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.hint" />". Proceeding with default value.</xsl:message>
850
882
  </xsl:otherwise>
851
883
  </xsl:choose>
852
884
  </xsl:variable>
@@ -862,7 +894,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
862
894
  <xsl:text>no</xsl:text>
863
895
  </xsl:when>
864
896
  <xsl:otherwise>
865
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-reading/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
897
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-reading/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
866
898
  <xsl:text>yes</xsl:text>
867
899
  </xsl:otherwise>
868
900
  </xsl:choose>
@@ -882,7 +914,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
882
914
  <xsl:value-of select="$exercise.reading.answer" />
883
915
  </xsl:when>
884
916
  <xsl:otherwise>
885
- <xsl:message >PTX:WARNING: exercise.reading.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.answer" />". Proceeding with default value.</xsl:message>
917
+ <xsl:message >PTX:FALLBACK: exercise.reading.answer parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.answer" />". Proceeding with default value.</xsl:message>
886
918
  </xsl:otherwise>
887
919
  </xsl:choose>
888
920
  </xsl:variable>
@@ -898,7 +930,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
898
930
  <xsl:text>no</xsl:text>
899
931
  </xsl:when>
900
932
  <xsl:otherwise>
901
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-reading/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
933
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-reading/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-reading/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
902
934
  <xsl:text>yes</xsl:text>
903
935
  </xsl:otherwise>
904
936
  </xsl:choose>
@@ -918,7 +950,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
918
950
  <xsl:value-of select="$exercise.reading.solution" />
919
951
  </xsl:when>
920
952
  <xsl:otherwise>
921
- <xsl:message >PTX:WARNING: exercise.reading.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.solution" />". Proceeding with default value.</xsl:message>
953
+ <xsl:message >PTX:FALLBACK: exercise.reading.solution parameter should be "yes" or "no", not "<xsl:value-of select="$exercise.reading.solution" />". Proceeding with default value.</xsl:message>
922
954
  </xsl:otherwise>
923
955
  </xsl:choose>
924
956
  </xsl:variable>
@@ -934,7 +966,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
934
966
  <xsl:text>no</xsl:text>
935
967
  </xsl:when>
936
968
  <xsl:otherwise>
937
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-project/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
969
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-project/@statement in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@statement"/>". Proceeding with the default, which is "yes".</xsl:message>
938
970
  <xsl:text>yes</xsl:text>
939
971
  </xsl:otherwise>
940
972
  </xsl:choose>
@@ -949,7 +981,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
949
981
  <xsl:value-of select="$project.statement" />
950
982
  </xsl:when>
951
983
  <xsl:otherwise>
952
- <xsl:message >PTX:WARNING: project.statement parameter should be "yes" or "no", not "<xsl:value-of select="$project.statement" />". Proceeding with default value.</xsl:message>
984
+ <xsl:message >PTX:FALLBACK: project.statement parameter should be "yes" or "no", not "<xsl:value-of select="$project.statement" />". Proceeding with default value.</xsl:message>
953
985
  </xsl:otherwise>
954
986
  </xsl:choose>
955
987
  </xsl:variable>
@@ -965,7 +997,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
965
997
  <xsl:text>no</xsl:text>
966
998
  </xsl:when>
967
999
  <xsl:otherwise>
968
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-project/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
1000
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-project/@hint in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@hint"/>". Proceeding with the default, which is "yes".</xsl:message>
969
1001
  <xsl:text>yes</xsl:text>
970
1002
  </xsl:otherwise>
971
1003
  </xsl:choose>
@@ -985,7 +1017,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
985
1017
  <xsl:value-of select="$project.hint" />
986
1018
  </xsl:when>
987
1019
  <xsl:otherwise>
988
- <xsl:message >PTX:WARNING: project.hint parameter should be "yes" or "no", not "<xsl:value-of select="$project.hint" />". Proceeding with default value.</xsl:message>
1020
+ <xsl:message >PTX:FALLBACK: project.hint parameter should be "yes" or "no", not "<xsl:value-of select="$project.hint" />". Proceeding with default value.</xsl:message>
989
1021
  </xsl:otherwise>
990
1022
  </xsl:choose>
991
1023
  </xsl:variable>
@@ -1001,7 +1033,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1001
1033
  <xsl:text>no</xsl:text>
1002
1034
  </xsl:when>
1003
1035
  <xsl:otherwise>
1004
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-project/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
1036
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-project/@answer in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@answer"/>". Proceeding with the default, which is "yes".</xsl:message>
1005
1037
  <xsl:text>yes</xsl:text>
1006
1038
  </xsl:otherwise>
1007
1039
  </xsl:choose>
@@ -1021,7 +1053,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1021
1053
  <xsl:value-of select="$project.answer" />
1022
1054
  </xsl:when>
1023
1055
  <xsl:otherwise>
1024
- <xsl:message >PTX:WARNING: project.answer parameter should be "yes" or "no", not "<xsl:value-of select="$project.answer" />". Proceeding with default value.</xsl:message>
1056
+ <xsl:message >PTX:FALLBACK: project.answer parameter should be "yes" or "no", not "<xsl:value-of select="$project.answer" />". Proceeding with default value.</xsl:message>
1025
1057
  </xsl:otherwise>
1026
1058
  </xsl:choose>
1027
1059
  </xsl:variable>
@@ -1037,7 +1069,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1037
1069
  <xsl:text>no</xsl:text>
1038
1070
  </xsl:when>
1039
1071
  <xsl:otherwise>
1040
- <xsl:message>PTX:WARNING: the exercise component visibility setting (common/exercise-project/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
1072
+ <xsl:message>PTX:FALLBACK: the exercise component visibility setting (common/exercise-project/@solution in the publisher file) must be "yes" or "no", not "<xsl:value-of select="$publication/common/exercise-project/@solution"/>". Proceeding with the default, which is "yes".</xsl:message>
1041
1073
  <xsl:text>yes</xsl:text>
1042
1074
  </xsl:otherwise>
1043
1075
  </xsl:choose>
@@ -1057,7 +1089,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1057
1089
  <xsl:value-of select="$project.solution" />
1058
1090
  </xsl:when>
1059
1091
  <xsl:otherwise>
1060
- <xsl:message >PTX:WARNING: project.solution parameter should be "yes" or "no", not "<xsl:value-of select="$project.solution" />". Proceeding with default value.</xsl:message>
1092
+ <xsl:message >PTX:FALLBACK: project.solution parameter should be "yes" or "no", not "<xsl:value-of select="$project.solution" />". Proceeding with default value.</xsl:message>
1061
1093
  </xsl:otherwise>
1062
1094
  </xsl:choose>
1063
1095
  </xsl:variable>
@@ -1132,7 +1164,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1132
1164
  <xsl:choose>
1133
1165
  <!-- leading path separator is an error -->
1134
1166
  <xsl:when test="substring($raw-input, 1, 1) = '/'">
1135
- <xsl:message>PTX:ERROR: an external-image directory (source/directories/@external in the publisher file) must be a relative path and not begin with "/" as in "<xsl:value-of select="$raw-input"/>". Proceeding with the default, which is an empty string, and may lead to unexpected results.</xsl:message>
1167
+ <xsl:message>PTX:FALLBACK: an external-image directory (source/directories/@external in the publisher file) must be a relative path and not begin with "/" as in "<xsl:value-of select="$raw-input"/>". Proceeding with the default, which is an empty string, and may lead to unexpected results.</xsl:message>
1136
1168
  <xsl:text/>
1137
1169
  </xsl:when>
1138
1170
  <!-- trailing path separator is good and -->
@@ -1157,7 +1189,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1157
1189
  <xsl:when test="$b-managed-directories">
1158
1190
  <xsl:choose>
1159
1191
  <xsl:when test="substring($raw-input, 1, 1) = '/'">
1160
- <xsl:message>PTX:WARNING: a generated-image directory (source/directories/@generated in the publisher file) must be a relative path and not begin with "/" as in "<xsl:value-of select="$raw-input"/>". Proceeding with the default, which is an empty string, and may lead to unexpected results.</xsl:message>
1192
+ <xsl:message>PTX:FALLBACK: a generated-image directory (source/directories/@generated in the publisher file) must be a relative path and not begin with "/" as in "<xsl:value-of select="$raw-input"/>". Proceeding with the default, which is an empty string, and may lead to unexpected results.</xsl:message>
1161
1193
  <xsl:text/>
1162
1194
  </xsl:when>
1163
1195
  <!-- trailing path separator is good -->
@@ -1201,7 +1233,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1201
1233
  <xsl:text>no</xsl:text>
1202
1234
  </xsl:when>
1203
1235
  <xsl:otherwise>
1204
- <xsl:message>PTX:ERROR: the publisher file specifies one of source/directories/@external and source/directories/@generated, but not both. Proceeding as if neither was specified.</xsl:message>
1236
+ <xsl:message>PTX:FALLBACK: the publisher file specifies one of source/directories/@external and source/directories/@generated, but not both. Proceeding as if neither was specified.</xsl:message>
1205
1237
  <xsl:text>no</xsl:text>
1206
1238
  </xsl:otherwise>
1207
1239
  </xsl:choose>
@@ -1255,7 +1287,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1255
1287
  </xsl:variable>
1256
1288
  <xsl:choose>
1257
1289
  <xsl:when test="substring($raw-input, 1, 1) = '/'">
1258
- <xsl:message>PTX:ERROR: a data directory (source/directories/@data in the publisher file) must be a relative path and not begin with "/" as in "<xsl:value-of select="$raw-input"/>". Proceeding with the default, which is an empty string, and may lead to unexpected results.</xsl:message>
1290
+ <xsl:message>PTX:FALLBACK: a data directory (source/directories/@data in the publisher file) must be a relative path and not begin with "/" as in "<xsl:value-of select="$raw-input"/>". Proceeding with the default, which is an empty string, and may lead to unexpected results.</xsl:message>
1259
1291
  <xsl:text/>
1260
1292
  </xsl:when>
1261
1293
  <!-- trailing path separator is good -->
@@ -1384,8 +1416,8 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1384
1416
  </xsl:when>
1385
1417
  <xsl:when test="$publication/source/@webwork-problems">
1386
1418
  <xsl:value-of select="str:replace($publication/source/@webwork-problems, '&#x20;', '%20')"/>
1387
- <xsl:message>PTX:ERROR: the publication file entry source/@webwork-problems is</xsl:message>
1388
- <xsl:message> deprecated, please move to using managed directories</xsl:message>
1419
+ <xsl:message>PTX:DEPRECATE: the publication file entry source/@webwork-problems is</xsl:message>
1420
+ <xsl:message> deprecated, please move to using managed directories</xsl:message>
1389
1421
  </xsl:when>
1390
1422
  <!-- no specification, so empty string for filename -->
1391
1423
  <!-- this will be noted where it is employed -->
@@ -1481,13 +1513,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1481
1513
  <!-- the default, and also an error-check upper-limit -->
1482
1514
  <xsl:variable name="max-feasible">
1483
1515
  <xsl:choose>
1484
- <xsl:when test="$version-root/book/part">5</xsl:when>
1485
- <xsl:when test="$version-root/book">4</xsl:when>
1486
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">3</xsl:when>
1487
- <xsl:when test="$version-root/article">0</xsl:when>
1488
- <xsl:when test="$version-root/letter">0</xsl:when>
1489
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1490
- <xsl:when test="$version-root/memo">0</xsl:when>
1516
+ <xsl:when test="$version-has-parts">5</xsl:when>
1517
+ <xsl:when test="$version-doc-type = 'book'">4</xsl:when>
1518
+ <xsl:when test="$version-article-sections or $version-article-worksheets">3</xsl:when>
1519
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
1520
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
1521
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
1522
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
1491
1523
  <xsl:otherwise>
1492
1524
  <xsl:message>PTX:BUG: a document type needs a maximum division level defined</xsl:message>
1493
1525
  </xsl:otherwise>
@@ -1501,7 +1533,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1501
1533
  <xsl:choose>
1502
1534
  <!-- NaN does not equal *anything*, so tests if a number -->
1503
1535
  <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1504
- <xsl:message>PTX:WARNING: numbering level for divisions given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1536
+ <xsl:message>PTX:FALLBACK: numbering level for divisions given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1505
1537
  <xsl:value-of select="$max-feasible"/>
1506
1538
  </xsl:when>
1507
1539
  <xsl:otherwise>
@@ -1522,7 +1554,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1522
1554
  <!-- check $candidate against upper bound, $max-feasible -->
1523
1555
  <xsl:choose>
1524
1556
  <xsl:when test="$candidate-maxlevel > $max-feasible">
1525
- <xsl:message>PTX:WARNING: numbering level set for divisions ("<xsl:value-of select="$candidate-maxlevel"/>") is greater than the maximum possible ("<xsl:value-of select="$max-feasible"/>") for this document type. The default value will be used instead</xsl:message>
1557
+ <xsl:message>PTX:FALLBACK: numbering level set for divisions ("<xsl:value-of select="$candidate-maxlevel"/>") is greater than the maximum possible ("<xsl:value-of select="$max-feasible"/>") for this document type. The default value will be used instead</xsl:message>
1526
1558
  <xsl:value-of select="$max-feasible"/>
1527
1559
  </xsl:when>
1528
1560
  <xsl:otherwise>
@@ -1537,402 +1569,155 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1537
1569
  <!-- parameterized by (a) publisher file entry, (b) old -->
1538
1570
  <!-- deprecated stringparam (or docinfo coming soon), -->
1539
1571
  <!-- (c) string for messages (e.g. "footnotes"). -->
1540
- <!-- EZ: make one "default" variable, since they all look identical -->
1541
-
1542
- <!-- User-supplied Numbering for Theorems, etc -->
1543
- <!-- Respect switch, or provide sensible defaults -->
1544
- <xsl:variable name="numbering-blocks-entered">
1545
- <xsl:variable name="default-blocks">
1546
- <xsl:choose>
1547
- <xsl:when test="$version-root/book/part">3</xsl:when>
1548
- <xsl:when test="$version-root/book">2</xsl:when>
1549
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">1</xsl:when>
1550
- <xsl:when test="$version-root/article">0</xsl:when>
1551
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1552
- <xsl:when test="$version-root/letter">0</xsl:when>
1553
- <xsl:when test="$version-root/memo">0</xsl:when>
1554
- <xsl:otherwise>
1555
- <xsl:message>PTX:BUG: a document type needs a default block numbering level defined</xsl:message>
1556
- </xsl:otherwise>
1557
- </xsl:choose>
1558
- </xsl:variable>
1559
- <xsl:variable name="candidate-blocks">
1572
+ <!-- The numbered-object families (blocks, projects, equations, -->
1573
+ <!-- footnotes, figures, inline exercises, open problems) share -->
1574
+ <!-- one default numbering level: set by the document type, and -->
1575
+ <!-- never more than the division depth the publisher elected -->
1576
+ <!-- ($numbering-maxlevel), so an unconfigured document always -->
1577
+ <!-- has a conforming value. -->
1578
+ <xsl:variable name="default-numbering-level">
1579
+ <xsl:variable name="document-type-level">
1560
1580
  <xsl:choose>
1561
- <!-- go with publisher file, check for numerical value -->
1562
- <xsl:when test="$publication/numbering/blocks/@level">
1563
- <xsl:variable name="the-number" select="$publication/numbering/blocks/@level"/>
1564
- <xsl:choose>
1565
- <!-- NaN does not equal *anything*, so tests if a number -->
1566
- <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1567
- <xsl:message>PTX:WARNING: numbering level for blocks given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1568
- <xsl:value-of select="$default-blocks"/>
1569
- </xsl:when>
1570
- <xsl:otherwise>
1571
- <xsl:value-of select="$publication/numbering/blocks/@level"/>
1572
- </xsl:otherwise>
1573
- </xsl:choose>
1574
- </xsl:when>
1575
- <!-- respect deprecated analog -->
1576
- <xsl:when test="$numbering.theorems.level != ''">
1577
- <xsl:value-of select="$numbering.theorems.level" />
1578
- </xsl:when>
1579
- <!-- use a default -->
1581
+ <xsl:when test="$version-has-parts">3</xsl:when>
1582
+ <xsl:when test="$version-doc-type = 'book'">2</xsl:when>
1583
+ <xsl:when test="$version-article-sections or $version-article-worksheets">1</xsl:when>
1584
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
1585
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
1586
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
1587
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
1580
1588
  <xsl:otherwise>
1581
- <xsl:value-of select="$default-blocks"/>
1589
+ <xsl:message>PTX:BUG: a document type needs a default numbering level defined</xsl:message>
1582
1590
  </xsl:otherwise>
1583
1591
  </xsl:choose>
1584
1592
  </xsl:variable>
1585
- <!-- check $candidate-blocks against upper bound, $numbering-maxlevel -->
1586
1593
  <xsl:choose>
1587
- <xsl:when test="$candidate-blocks > $numbering-maxlevel">
1588
- <xsl:message>PTX:WARNING: numbering level set for blocks ("<xsl:value-of select="$candidate-blocks"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value will be used instead</xsl:message>
1589
- <xsl:value-of select="$default-blocks"/>
1594
+ <xsl:when test="$document-type-level > $numbering-maxlevel">
1595
+ <xsl:value-of select="$numbering-maxlevel"/>
1590
1596
  </xsl:when>
1591
1597
  <xsl:otherwise>
1592
- <xsl:value-of select="$candidate-blocks"/>
1598
+ <xsl:value-of select="$document-type-level"/>
1593
1599
  </xsl:otherwise>
1594
1600
  </xsl:choose>
1595
1601
  </xsl:variable>
1596
- <xsl:variable name="numbering-blocks" select="number($numbering-blocks-entered)"/>
1597
1602
 
1598
- <!-- User-supplied Numbering for Projects, etc -->
1599
- <!-- Respect switch, or provide sensible defaults -->
1600
- <!-- PROJECT-LIKE -->
1601
- <!-- NB: this should become elective, more like the -->
1602
- <!-- schemes for inline exercises and figure-like. -->
1603
- <xsl:variable name="numbering-projects-entered">
1604
- <xsl:variable name="default-projects">
1605
- <xsl:choose>
1606
- <xsl:when test="$version-root/book/part">3</xsl:when>
1607
- <xsl:when test="$version-root/book">2</xsl:when>
1608
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">1</xsl:when>
1609
- <xsl:when test="$version-root/article">0</xsl:when>
1610
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1611
- <xsl:when test="$version-root/letter">0</xsl:when>
1612
- <xsl:when test="$version-root/memo">0</xsl:when>
1613
- <xsl:otherwise>
1614
- <xsl:message>PTX:BUG: a document type needs a default project level defined</xsl:message>
1615
- </xsl:otherwise>
1616
- </xsl:choose>
1617
- </xsl:variable>
1618
- <xsl:variable name="candidate-projects">
1603
+ <!-- Resolve one family's numbering level: the publisher file's -->
1604
+ <!-- entry, else a legacy analog (a string parameter, or in some -->
1605
+ <!-- cases a "docinfo" attribute), else the shared default. An -->
1606
+ <!-- authored value must be numeric, non-negative, and no more -->
1607
+ <!-- than $numbering-maxlevel; the default conforms by -->
1608
+ <!-- construction, so only an authored value can provoke a -->
1609
+ <!-- message. -->
1610
+ <xsl:template name="numbering-level">
1611
+ <xsl:param name="family"/>
1612
+ <xsl:param name="entered"/>
1613
+ <xsl:param name="legacy" select="''"/>
1614
+ <xsl:variable name="candidate">
1619
1615
  <xsl:choose>
1620
1616
  <!-- go with publisher file, check for numerical value -->
1621
- <xsl:when test="$publication/numbering/projects/@level">
1622
- <xsl:variable name="the-number" select="$publication/numbering/projects/@level"/>
1617
+ <xsl:when test="$entered">
1623
1618
  <xsl:choose>
1624
1619
  <!-- NaN does not equal *anything*, so tests if a number -->
1625
- <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1626
- <xsl:message>PTX:WARNING: numbering level for projects given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1627
- <xsl:value-of select="$default-projects"/>
1620
+ <xsl:when test="not(number($entered) = number($entered)) or ($entered &lt; 0)">
1621
+ <xsl:message>PTX:FALLBACK: numbering level for <xsl:value-of select="$family"/> given in the publisher file ("<xsl:value-of select="$entered"/>") is not a number or is negative. The default value ("<xsl:value-of select="$default-numbering-level"/>") will be used instead</xsl:message>
1622
+ <xsl:value-of select="$default-numbering-level"/>
1628
1623
  </xsl:when>
1629
1624
  <xsl:otherwise>
1630
- <xsl:value-of select="$publication/numbering/projects/@level"/>
1625
+ <xsl:value-of select="$entered"/>
1631
1626
  </xsl:otherwise>
1632
1627
  </xsl:choose>
1633
1628
  </xsl:when>
1634
- <!-- respect deprecated analog -->
1635
- <xsl:when test="$numbering.projects.level != ''">
1636
- <xsl:value-of select="$numbering.projects.level" />
1629
+ <!-- respect a legacy analog -->
1630
+ <xsl:when test="$legacy != ''">
1631
+ <xsl:value-of select="$legacy"/>
1637
1632
  </xsl:when>
1638
- <!-- use a default -->
1633
+ <!-- use the conforming default, no message possible -->
1639
1634
  <xsl:otherwise>
1640
- <xsl:value-of select="$default-projects"/>
1635
+ <xsl:value-of select="$default-numbering-level"/>
1641
1636
  </xsl:otherwise>
1642
1637
  </xsl:choose>
1643
1638
  </xsl:variable>
1644
- <!-- check $candidate-projects against upper bound, $numbering-maxlevel -->
1639
+ <!-- an authored candidate may exceed the upper bound, $numbering-maxlevel -->
1645
1640
  <xsl:choose>
1646
- <xsl:when test="$candidate-projects > $numbering-maxlevel">
1647
- <xsl:message>PTX:WARNING: numbering level set for projects ("<xsl:value-of select="$candidate-projects"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value will be used instead</xsl:message>
1648
- <xsl:value-of select="$default-projects"/>
1641
+ <xsl:when test="$candidate > $numbering-maxlevel">
1642
+ <xsl:message>PTX:FALLBACK: numbering level set for <xsl:value-of select="$family"/> ("<xsl:value-of select="$candidate"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value ("<xsl:value-of select="$default-numbering-level"/>") will be used instead</xsl:message>
1643
+ <xsl:value-of select="$default-numbering-level"/>
1649
1644
  </xsl:when>
1650
1645
  <xsl:otherwise>
1651
- <xsl:value-of select="$candidate-projects"/>
1646
+ <xsl:value-of select="$candidate"/>
1652
1647
  </xsl:otherwise>
1653
1648
  </xsl:choose>
1649
+ </xsl:template>
1650
+
1651
+ <xsl:variable name="numbering-blocks-entered">
1652
+ <xsl:call-template name="numbering-level">
1653
+ <xsl:with-param name="family" select="'blocks'"/>
1654
+ <xsl:with-param name="entered" select="$publication/numbering/blocks/@level"/>
1655
+ <xsl:with-param name="legacy" select="$numbering.theorems.level"/>
1656
+ </xsl:call-template>
1657
+ </xsl:variable>
1658
+ <xsl:variable name="numbering-blocks" select="number($numbering-blocks-entered)"/>
1659
+
1660
+ <xsl:variable name="numbering-projects-entered">
1661
+ <xsl:call-template name="numbering-level">
1662
+ <xsl:with-param name="family" select="'projects'"/>
1663
+ <xsl:with-param name="entered" select="$publication/numbering/projects/@level"/>
1664
+ <xsl:with-param name="legacy" select="$numbering.projects.level"/>
1665
+ </xsl:call-template>
1654
1666
  </xsl:variable>
1655
1667
  <xsl:variable name="numbering-projects" select="number($numbering-projects-entered)"/>
1656
1668
 
1657
- <!-- User-supplied Numbering for Equations -->
1658
- <!-- Respect switch, or provide sensible defaults -->
1659
1669
  <xsl:variable name="numbering-equations-entered">
1660
- <xsl:variable name="default-equations">
1661
- <xsl:choose>
1662
- <xsl:when test="$version-root/book/part">3</xsl:when>
1663
- <xsl:when test="$version-root/book">2</xsl:when>
1664
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">1</xsl:when>
1665
- <xsl:when test="$version-root/article">0</xsl:when>
1666
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1667
- <xsl:when test="$version-root/letter">0</xsl:when>
1668
- <xsl:when test="$version-root/memo">0</xsl:when>
1669
- <xsl:otherwise>
1670
- <xsl:message>PTX:BUG: a document type needs a default equation project level defined</xsl:message>
1671
- </xsl:otherwise>
1672
- </xsl:choose>
1673
- </xsl:variable>
1674
- <xsl:variable name="candidate-equations">
1675
- <xsl:choose>
1676
- <!-- go with publisher file, check for numerical value -->
1677
- <xsl:when test="$publication/numbering/equations/@level">
1678
- <xsl:variable name="the-number" select="$publication/numbering/equations/@level"/>
1679
- <xsl:choose>
1680
- <!-- NaN does not equal *anything*, so tests if a number -->
1681
- <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1682
- <xsl:message>PTX:WARNING: numbering level for equations given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1683
- <xsl:value-of select="$default-equations"/>
1684
- </xsl:when>
1685
- <xsl:otherwise>
1686
- <xsl:value-of select="$publication/numbering/equations/@level"/>
1687
- </xsl:otherwise>
1688
- </xsl:choose>
1689
- </xsl:when>
1690
- <!-- respect deprecated analog -->
1691
- <xsl:when test="$numbering.equations.level != ''">
1692
- <xsl:value-of select="$numbering.equations.level" />
1693
- </xsl:when>
1694
- <!-- use a default -->
1695
- <xsl:otherwise>
1696
- <xsl:value-of select="$default-equations"/>
1697
- </xsl:otherwise>
1698
- </xsl:choose>
1699
- </xsl:variable>
1700
- <!-- check $candidate-equations against upper bound, $numbering-maxlevel -->
1701
- <xsl:choose>
1702
- <xsl:when test="$candidate-equations > $numbering-maxlevel">
1703
- <xsl:message>PTX:WARNING: numbering level set for equations ("<xsl:value-of select="$candidate-equations"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value will be used instead</xsl:message>
1704
- <xsl:value-of select="$default-equations"/>
1705
- </xsl:when>
1706
- <xsl:otherwise>
1707
- <xsl:value-of select="$candidate-equations"/>
1708
- </xsl:otherwise>
1709
- </xsl:choose>
1670
+ <xsl:call-template name="numbering-level">
1671
+ <xsl:with-param name="family" select="'equations'"/>
1672
+ <xsl:with-param name="entered" select="$publication/numbering/equations/@level"/>
1673
+ <xsl:with-param name="legacy" select="$numbering.equations.level"/>
1674
+ </xsl:call-template>
1710
1675
  </xsl:variable>
1711
1676
  <xsl:variable name="numbering-equations" select="number($numbering-equations-entered)"/>
1712
1677
 
1713
- <!-- User-supplied Numbering for Footnotes -->
1714
- <!-- Respect switch, or provide sensible defaults -->
1715
1678
  <xsl:variable name="numbering-footnotes-entered">
1716
- <xsl:variable name="default-footnotes">
1717
- <xsl:choose>
1718
- <xsl:when test="$version-root/book/part">3</xsl:when>
1719
- <xsl:when test="$version-root/book">2</xsl:when>
1720
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">1</xsl:when>
1721
- <xsl:when test="$version-root/article">0</xsl:when>
1722
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1723
- <xsl:when test="$version-root/letter">0</xsl:when>
1724
- <xsl:when test="$version-root/memo">0</xsl:when>
1725
- <xsl:otherwise>
1726
- <xsl:message>PTX:BUG: a document type needs a default footnote project level defined</xsl:message>
1727
- </xsl:otherwise>
1728
- </xsl:choose>
1729
- </xsl:variable>
1730
- <xsl:variable name="candidate-footnotes">
1731
- <xsl:choose>
1732
- <!-- go with publisher file, check for numerical value -->
1733
- <xsl:when test="$publication/numbering/footnotes/@level">
1734
- <xsl:variable name="the-number" select="$publication/numbering/footnotes/@level"/>
1735
- <xsl:choose>
1736
- <!-- NaN does not equal *anything*, so tests if a number -->
1737
- <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1738
- <xsl:message>PTX:WARNING: numbering level for footnotes given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1739
- <xsl:value-of select="$default-footnotes"/>
1740
- </xsl:when>
1741
- <xsl:otherwise>
1742
- <xsl:value-of select="$publication/numbering/footnotes/@level"/>
1743
- </xsl:otherwise>
1744
- </xsl:choose>
1745
- </xsl:when>
1746
- <!-- respect deprecated analog -->
1747
- <xsl:when test="$numbering.footnotes.level != ''">
1748
- <xsl:value-of select="$numbering.footnotes.level" />
1749
- </xsl:when>
1750
- <!-- use a default -->
1751
- <xsl:otherwise>
1752
- <xsl:value-of select="$default-footnotes"/>
1753
- </xsl:otherwise>
1754
- </xsl:choose>
1755
- </xsl:variable>
1756
- <!-- check $candidate-footnotes against upper bound, $numbering-maxlevel -->
1757
- <xsl:choose>
1758
- <xsl:when test="$candidate-footnotes > $numbering-maxlevel">
1759
- <xsl:message>PTX:WARNING: numbering level set for footnotes ("<xsl:value-of select="$candidate-footnotes"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value will be used instead</xsl:message>
1760
- <xsl:value-of select="$default-footnotes"/>
1761
- </xsl:when>
1762
- <xsl:otherwise>
1763
- <xsl:value-of select="$candidate-footnotes"/>
1764
- </xsl:otherwise>
1765
- </xsl:choose>
1679
+ <xsl:call-template name="numbering-level">
1680
+ <xsl:with-param name="family" select="'footnotes'"/>
1681
+ <xsl:with-param name="entered" select="$publication/numbering/footnotes/@level"/>
1682
+ <xsl:with-param name="legacy" select="$numbering.footnotes.level"/>
1683
+ </xsl:call-template>
1766
1684
  </xsl:variable>
1767
1685
  <xsl:variable name="numbering-footnotes" select="number($numbering-footnotes-entered)"/>
1768
1686
 
1769
- <!-- User-supplied Numbering for Figure-Like -->
1770
- <!-- Respect switch, or provide sensible defaults -->
1687
+ <!-- The "legacy" consultations of a deprecated "docinfo" analog, -->
1688
+ <!-- here and for inline exercises just below, are ripe for -->
1689
+ <!-- deletion, certainly during any comprehensive "docinfo" work -->
1771
1690
  <xsl:variable name="numbering-figures-entered">
1772
- <xsl:variable name="default-figures">
1773
- <xsl:choose>
1774
- <xsl:when test="$version-root/book/part">3</xsl:when>
1775
- <xsl:when test="$version-root/book">2</xsl:when>
1776
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">1</xsl:when>
1777
- <xsl:when test="$version-root/article">0</xsl:when>
1778
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1779
- <xsl:when test="$version-root/letter">0</xsl:when>
1780
- <xsl:when test="$version-root/memo">0</xsl:when>
1781
- <xsl:otherwise>
1782
- <xsl:message>PTX:BUG: a document type needs a default figure level defined</xsl:message>
1783
- </xsl:otherwise>
1784
- </xsl:choose>
1785
- </xsl:variable>
1786
- <xsl:variable name="candidate-figures">
1787
- <xsl:choose>
1788
- <!-- go with publisher file, check for numerical value -->
1789
- <xsl:when test="$publication/numbering/figures/@level">
1790
- <xsl:variable name="the-number" select="$publication/numbering/figures/@level"/>
1791
- <xsl:choose>
1792
- <!-- NaN does not equal *anything*, so tests if a number -->
1793
- <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1794
- <xsl:message>PTX:WARNING: numbering level for figures given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1795
- <xsl:value-of select="$default-figures"/>
1796
- </xsl:when>
1797
- <xsl:otherwise>
1798
- <xsl:value-of select="$publication/numbering/figures/@level"/>
1799
- </xsl:otherwise>
1800
- </xsl:choose>
1801
- </xsl:when>
1802
- <!-- otherwise honor a deprecated docinfo level (assembled tree); warned elsewhere -->
1803
- <xsl:when test="$version-docinfo/numbering/figures/@level">
1804
- <xsl:value-of select="$version-docinfo/numbering/figures/@level"/>
1805
- </xsl:when>
1806
- <!-- use a default -->
1807
- <xsl:otherwise>
1808
- <xsl:value-of select="$default-figures"/>
1809
- </xsl:otherwise>
1810
- </xsl:choose>
1811
- </xsl:variable>
1812
- <!-- check $candidate-figures against upper bound, $numbering-maxlevel -->
1813
- <xsl:choose>
1814
- <xsl:when test="$candidate-figures > $numbering-maxlevel">
1815
- <xsl:message>PTX:WARNING: numbering level set for figures ("<xsl:value-of select="$candidate-figures"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value will be used instead</xsl:message>
1816
- <xsl:value-of select="$default-figures"/>
1817
- </xsl:when>
1818
- <xsl:otherwise>
1819
- <xsl:value-of select="$candidate-figures"/>
1820
- </xsl:otherwise>
1821
- </xsl:choose>
1691
+ <xsl:call-template name="numbering-level">
1692
+ <xsl:with-param name="family" select="'figures'"/>
1693
+ <xsl:with-param name="entered" select="$publication/numbering/figures/@level"/>
1694
+ <xsl:with-param name="legacy" select="$version-docinfo/numbering/figures/@level"/>
1695
+ </xsl:call-template>
1822
1696
  </xsl:variable>
1823
1697
  <xsl:variable name="numbering-figures" select="number($numbering-figures-entered)"/>
1824
1698
 
1825
- <!-- User-supplied Numbering for Inline Exercises -->
1826
- <!-- Respect switch, or provide sensible defaults -->
1827
1699
  <xsl:variable name="numbering-exercises-entered">
1828
- <xsl:variable name="default-exercises">
1829
- <xsl:choose>
1830
- <xsl:when test="$version-root/book/part">3</xsl:when>
1831
- <xsl:when test="$version-root/book">2</xsl:when>
1832
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">1</xsl:when>
1833
- <xsl:when test="$version-root/article">0</xsl:when>
1834
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1835
- <xsl:when test="$version-root/letter">0</xsl:when>
1836
- <xsl:when test="$version-root/memo">0</xsl:when>
1837
- <xsl:otherwise>
1838
- <xsl:message>PTX:BUG: a document type needs a default inline exercise level defined</xsl:message>
1839
- </xsl:otherwise>
1840
- </xsl:choose>
1841
- </xsl:variable>
1842
- <xsl:variable name="candidate-exercises">
1843
- <xsl:choose>
1844
- <!-- go with publisher file, check for numerical value -->
1845
- <xsl:when test="$publication/numbering/exercises/@level">
1846
- <xsl:variable name="the-number" select="$publication/numbering/exercises/@level"/>
1847
- <xsl:choose>
1848
- <!-- NaN does not equal *anything*, so tests if a number -->
1849
- <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1850
- <xsl:message>PTX:WARNING: numbering level for inline exercises given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1851
- <xsl:value-of select="$default-exercises"/>
1852
- </xsl:when>
1853
- <xsl:otherwise>
1854
- <xsl:value-of select="$publication/numbering/exercises/@level"/>
1855
- </xsl:otherwise>
1856
- </xsl:choose>
1857
- </xsl:when>
1858
- <!-- otherwise honor a deprecated docinfo level (assembled tree); warned elsewhere -->
1859
- <xsl:when test="$version-docinfo/numbering/exercises/@level">
1860
- <xsl:value-of select="$version-docinfo/numbering/exercises/@level"/>
1861
- </xsl:when>
1862
- <!-- use a default -->
1863
- <xsl:otherwise>
1864
- <xsl:value-of select="$default-exercises"/>
1865
- </xsl:otherwise>
1866
- </xsl:choose>
1867
- </xsl:variable>
1868
- <!-- check $candidate-exercises against upper bound, $numbering-maxlevel -->
1869
- <xsl:choose>
1870
- <xsl:when test="$candidate-exercises > $numbering-maxlevel">
1871
- <xsl:message>PTX:WARNING: numbering level set for inline exercises ("<xsl:value-of select="$candidate-exercises"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value will be used instead</xsl:message>
1872
- <xsl:value-of select="$default-exercises"/>
1873
- </xsl:when>
1874
- <xsl:otherwise>
1875
- <xsl:value-of select="$candidate-exercises"/>
1876
- </xsl:otherwise>
1877
- </xsl:choose>
1700
+ <xsl:call-template name="numbering-level">
1701
+ <xsl:with-param name="family" select="'inline exercises'"/>
1702
+ <xsl:with-param name="entered" select="$publication/numbering/exercises/@level"/>
1703
+ <xsl:with-param name="legacy" select="$version-docinfo/numbering/exercises/@level"/>
1704
+ </xsl:call-template>
1878
1705
  </xsl:variable>
1879
1706
  <xsl:variable name="numbering-exercises" select="number($numbering-exercises-entered)"/>
1880
1707
 
1881
- <!-- User-supplied Numbering for Open Problems -->
1882
- <!-- Respect switch, or provide sensible defaults -->
1883
1708
  <xsl:variable name="numbering-openproblems-entered">
1884
- <xsl:variable name="default-openproblems">
1885
- <xsl:choose>
1886
- <xsl:when test="$version-root/book/part">3</xsl:when>
1887
- <xsl:when test="$version-root/book">2</xsl:when>
1888
- <xsl:when test="$version-root/article/section|$version-root/article/worksheet">1</xsl:when>
1889
- <xsl:when test="$version-root/article">0</xsl:when>
1890
- <xsl:when test="$version-root/slideshow">0</xsl:when>
1891
- <xsl:when test="$version-root/letter">0</xsl:when>
1892
- <xsl:when test="$version-root/memo">0</xsl:when>
1893
- <xsl:otherwise>
1894
- <xsl:message>PTX:BUG: a document type needs a default open problem level defined</xsl:message>
1895
- </xsl:otherwise>
1896
- </xsl:choose>
1897
- </xsl:variable>
1898
- <xsl:variable name="candidate-openproblems">
1899
- <xsl:choose>
1900
- <!-- go with publisher file, check for numerical value -->
1901
- <xsl:when test="$publication/numbering/openproblems/@level">
1902
- <xsl:variable name="the-number" select="$publication/numbering/openproblems/@level"/>
1903
- <xsl:choose>
1904
- <!-- NaN does not equal *anything*, so tests if a number -->
1905
- <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1906
- <xsl:message>PTX:WARNING: numbering level for open problems given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1907
- <xsl:value-of select="$default-openproblems"/>
1908
- </xsl:when>
1909
- <xsl:otherwise>
1910
- <xsl:value-of select="$publication/numbering/openproblems/@level"/>
1911
- </xsl:otherwise>
1912
- </xsl:choose>
1913
- </xsl:when>
1914
- <!-- use a default -->
1915
- <xsl:otherwise>
1916
- <xsl:value-of select="$default-openproblems"/>
1917
- </xsl:otherwise>
1918
- </xsl:choose>
1919
- </xsl:variable>
1920
- <!-- check $candidate-openproblems against upper bound, $numbering-maxlevel -->
1921
- <xsl:choose>
1922
- <xsl:when test="$candidate-openproblems > $numbering-maxlevel">
1923
- <xsl:message>PTX:WARNING: numbering level set for open problems ("<xsl:value-of select="$candidate-openproblems"/>") is greater than the maximum possible levels ("<xsl:value-of select="$numbering-maxlevel"/>") configured. The default value will be used instead</xsl:message>
1924
- <xsl:value-of select="$default-openproblems"/>
1925
- </xsl:when>
1926
- <xsl:otherwise>
1927
- <xsl:value-of select="$candidate-openproblems"/>
1928
- </xsl:otherwise>
1929
- </xsl:choose>
1709
+ <xsl:call-template name="numbering-level">
1710
+ <xsl:with-param name="family" select="'open problems'"/>
1711
+ <xsl:with-param name="entered" select="$publication/numbering/openproblems/@level"/>
1712
+ </xsl:call-template>
1930
1713
  </xsl:variable>
1931
1714
  <xsl:variable name="numbering-openproblems" select="number($numbering-openproblems-entered)"/>
1932
1715
 
1933
1716
  <!-- A block group may run on its own counter. When its publisher -->
1934
1717
  <!-- switch is absent, the deprecated source is honored, then the -->
1935
- <!-- default. Warnings live with the other deprecations. -->
1718
+ <!-- default. Warnings live with the other deprecations. The two -->
1719
+ <!-- deprecated "docinfo" consultations are ripe for deletion, -->
1720
+ <!-- certainly during any comprehensive "docinfo" work. -->
1936
1721
  <xsl:variable name="b-number-figure-distinct" select="($publication/numbering/figures/@distinct = 'yes') or (not($publication/numbering/figures/@distinct) and boolean($version-docinfo/numbering/figures))"/>
1937
1722
  <xsl:variable name="b-number-project-distinct" select="($publication/numbering/projects/@distinct = 'yes') or (not($publication/numbering/projects/@distinct) and ($debug.project.number = ''))"/>
1938
1723
  <xsl:variable name="b-number-exercise-distinct" select="($publication/numbering/exercises/@distinct = 'yes') or (not($publication/numbering/exercises/@distinct) and boolean($version-docinfo/numbering/exercises))"/>
@@ -1945,7 +1730,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1945
1730
  <xsl:choose>
1946
1731
  <!-- NaN does not equal *anything*, so tests if a number -->
1947
1732
  <xsl:when test="not(number($the-number) = number($the-number)) or ($the-number &lt; 0)">
1948
- <xsl:message>PTX:WARNING: starting number for chapters given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1733
+ <xsl:message>PTX:FALLBACK: starting number for chapters given in the publisher file ("<xsl:value-of select="$the-number"/>") is not a number or is negative. The default value will be used instead</xsl:message>
1949
1734
  <xsl:value-of select="1"/>
1950
1735
  </xsl:when>
1951
1736
  <xsl:otherwise>
@@ -1969,13 +1754,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1969
1754
  <xsl:choose>
1970
1755
  <!-- no parts, just record as absent, -->
1971
1756
  <!-- but warn of ill-advised attempts -->
1972
- <xsl:when test="not($version-root/book/part)">
1757
+ <xsl:when test="not($version-has-parts)">
1973
1758
  <xsl:choose>
1974
1759
  <xsl:when test="$publication/numbering/divisions/@part-structure">
1975
- <xsl:message>PTX:WARNING: your document is not a book with parts, so the publisher file numbering/divisions/@part-structure entry is being ignored</xsl:message>
1760
+ <xsl:message>PTX:FALLBACK: your document is not a book with parts, so the publisher file numbering/divisions/@part-structure entry is being ignored</xsl:message>
1976
1761
  </xsl:when>
1977
1762
  <xsl:when test="$version-docinfo/numbering/division/@part">
1978
- <xsl:message>PTX:WARNING: your document is not a book with parts, and docinfo/numbering/division/@part is deprecated anyway and is being ignored</xsl:message>
1763
+ <xsl:message>PTX:DEPRECATE: your document is not a book with parts, and docinfo/numbering/division/@part is deprecated anyway and is being ignored</xsl:message>
1979
1764
  </xsl:when>
1980
1765
  </xsl:choose>
1981
1766
  <!-- flag this situation -->
@@ -1992,7 +1777,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1992
1777
  <xsl:text>decorative</xsl:text>
1993
1778
  </xsl:when>
1994
1779
  <xsl:otherwise>
1995
- <xsl:message>PTX:WARNING: the publisher file numbering/divisions/@part-structure entry should be "decorative" or "structural", not "<xsl:value-of select="$publication/numbering/divisions/@part-structure" />". The default will be used instead.</xsl:message>
1780
+ <xsl:message>PTX:FALLBACK: the publisher file numbering/divisions/@part-structure entry should be "decorative" or "structural", not "<xsl:value-of select="$publication/numbering/divisions/@part-structure" />". The default will be used instead.</xsl:message>
1996
1781
  <xsl:text>decorative</xsl:text>
1997
1782
  </xsl:otherwise>
1998
1783
  </xsl:choose>
@@ -2007,7 +1792,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2007
1792
  <xsl:text>decorative</xsl:text>
2008
1793
  </xsl:when>
2009
1794
  <xsl:otherwise>
2010
- <xsl:message>PTX:WARNING: the docinfo/numbering/division/@part entry should be "decorative" or "structural", not "<xsl:value-of select="$version-docinfo/numbering/division/@part"/>". The default will be used instead.</xsl:message>
1795
+ <xsl:message>PTX:FALLBACK: the docinfo/numbering/division/@part entry should be "decorative" or "structural", not "<xsl:value-of select="$version-docinfo/numbering/division/@part"/>". The default will be used instead.</xsl:message>
2011
1796
  <xsl:text>decorative</xsl:text>
2012
1797
  </xsl:otherwise>
2013
1798
  </xsl:choose>
@@ -2045,6 +1830,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2045
1830
  </xsl:variable>
2046
1831
  <xsl:variable name="b-has-calculator" select="not($html-calculator = 'none')" />
2047
1832
 
1833
+ <!-- Third-party annotation of the HTML output. Default is "none". -->
1834
+ <!-- Only "hypothesis" (Hypothes.is) is supported at present. -->
1835
+ <xsl:variable name="html-annotation">
1836
+ <xsl:apply-templates select="$publisher-attribute-options/html/annotation/pi:pub-attribute[@name='platform']" mode="set-pubfile-variable"/>
1837
+ </xsl:variable>
1838
+ <xsl:variable name="b-activate-hypothesis" select="$html-annotation = 'hypothesis'" />
1839
+
2048
1840
  <!-- Scratch ActiveCode Window -->
2049
1841
  <!-- Pop-up a window for testing program code. So "calculator-like" but we -->
2050
1842
  <!-- reserve the word "calculator" for the hand-held type (even if more modern). -->
@@ -2095,14 +1887,14 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2095
1887
  </xsl:when>
2096
1888
  <!-- sounds good, but no, not the right build -->
2097
1889
  <xsl:otherwise>
2098
- <xsl:message>PTX:WARNING: HTML calculator/@activecode in publisher file requests "<xsl:value-of select="$entered-lang"/>", but this language is not supported unless the publisher file also indicates the build is meant to be hosted on a Runestone server. Proceeding with the default value for current build: "<xsl:value-of select="$activecode-default"/>"</xsl:message>
1890
+ <xsl:message>PTX:FALLBACK: HTML calculator/@activecode in publisher file requests "<xsl:value-of select="$entered-lang"/>", but this language is not supported unless the publisher file also indicates the build is meant to be hosted on a Runestone server. Proceeding with the default value for current build: "<xsl:value-of select="$activecode-default"/>"</xsl:message>
2099
1891
  <xsl:value-of select="$activecode-default"/>
2100
1892
  </xsl:otherwise>
2101
1893
  </xsl:choose>
2102
1894
  </xsl:when>
2103
1895
  <!-- an attempt was made, but failed to be any sort of language -->
2104
1896
  <xsl:when test="$publication/html/calculator/@activecode">
2105
- <xsl:message>PTX:WARNING: HTML calculator/@activecode in publisher file should be a programming language or "none", not "<xsl:value-of select="$publication/html/calculator/@activecode"/>". Proceeding with the default value for current build: "<xsl:value-of select="$activecode-default"/>"</xsl:message>
1897
+ <xsl:message>PTX:FALLBACK: HTML calculator/@activecode in publisher file should be a programming language or "none", not "<xsl:value-of select="$publication/html/calculator/@activecode"/>". Proceeding with the default value for current build: "<xsl:value-of select="$activecode-default"/>"</xsl:message>
2106
1898
  <xsl:value-of select="$activecode-default"/>
2107
1899
  </xsl:when>
2108
1900
  <!-- no attempt to specify build-dependent default value -->
@@ -2144,7 +1936,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2144
1936
  </xsl:when>
2145
1937
  <!-- bad choice, set to empty string -->
2146
1938
  <xsl:when test="not(id($entered-ref))">
2147
- <xsl:message>PTX:WARNING: the requested HTML index page cannot be constructed since "<xsl:value-of select="$entered-ref"/>" is not an @xml:id anywhere in the document. Defaults will be used instead</xsl:message>
1939
+ <xsl:message>PTX:FALLBACK: the requested HTML index page cannot be constructed since "<xsl:value-of select="$entered-ref"/>" is not an @xml:id anywhere in the document. Defaults will be used instead</xsl:message>
2148
1940
  <xsl:text/>
2149
1941
  </xsl:when>
2150
1942
  <xsl:otherwise>
@@ -2216,7 +2008,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2216
2008
  </xsl:when>
2217
2009
  <!-- attempted to set, but wrong -->
2218
2010
  <xsl:when test="$publication/html/webwork/@inline">
2219
- <xsl:message>PTX:WARNING: HTML WeBWorK @inline setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@inline"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2011
+ <xsl:message>PTX:FALLBACK: HTML WeBWorK @inline setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@inline"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2220
2012
  <xsl:value-of select="$ww-default"/>
2221
2013
  </xsl:when>
2222
2014
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2247,7 +2039,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2247
2039
  </xsl:when>
2248
2040
  <!-- attempted to set, but wrong -->
2249
2041
  <xsl:when test="$publication/html/webwork/@divisional">
2250
- <xsl:message>PTX:WARNING: HTML WeBWorK @divisional setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@divisional"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2042
+ <xsl:message>PTX:FALLBACK: HTML WeBWorK @divisional setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@divisional"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2251
2043
  <xsl:value-of select="$ww-default"/>
2252
2044
  </xsl:when>
2253
2045
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2278,7 +2070,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2278
2070
  </xsl:when>
2279
2071
  <!-- attempted to set, but wrong -->
2280
2072
  <xsl:when test="$publication/html/webwork/@reading">
2281
- <xsl:message>PTX:WARNING: HTML WeBWorK @reading setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@reading"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2073
+ <xsl:message>PTX:FALLBACK: HTML WeBWorK @reading setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@reading"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2282
2074
  <xsl:value-of select="$ww-default"/>
2283
2075
  </xsl:when>
2284
2076
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2309,7 +2101,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2309
2101
  </xsl:when>
2310
2102
  <!-- attempted to set, but wrong -->
2311
2103
  <xsl:when test="$publication/html/webwork/@worksheet">
2312
- <xsl:message>PTX:WARNING: HTML WeBWorK @worksheet setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@worksheet"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2104
+ <xsl:message>PTX:FALLBACK: HTML WeBWorK @worksheet setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@worksheet"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2313
2105
  <xsl:value-of select="$ww-default"/>
2314
2106
  </xsl:when>
2315
2107
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2340,7 +2132,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2340
2132
  </xsl:when>
2341
2133
  <!-- attempted to set, but wrong -->
2342
2134
  <xsl:when test="$publication/html/webwork/@project">
2343
- <xsl:message>PTX:WARNING: HTML WeBWorK @project setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@project"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2135
+ <xsl:message>PTX:FALLBACK: HTML WeBWorK @project setting in publisher file should be "static" or "dynamic", not "<xsl:value-of select="$publication/html/webwork/@project"/>". Proceeding with default value: "<xsl:value-of select="$ww-default"/>"</xsl:message>
2344
2136
  <xsl:value-of select="$ww-default"/>
2345
2137
  </xsl:when>
2346
2138
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2543,7 +2335,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2543
2335
  <xsl:apply-templates select="$publisher-attribute-options/html/tableofcontents/pi:pub-attribute[@name='preexpanded-levels']" mode="set-pubfile-variable"/>
2544
2336
  </xsl:variable>
2545
2337
  <xsl:if test="not($b-html-toc-focused) and $preexpanded-value > 0">
2546
- <xsl:message>PTX:WARNING: the preexpanded-levels setting (html/tableofcontents/@preexpanded-levels in the publisher file) has no effect if the table of contents is not set to focused mode (/html/tableofcontents/@focused is "yes")."</xsl:message>
2338
+ <xsl:message>PTX:FALLBACK: the preexpanded-levels setting (html/tableofcontents/@preexpanded-levels in the publisher file) has no effect if the table of contents is not set to focused mode (/html/tableofcontents/@focused is "yes")."</xsl:message>
2547
2339
  </xsl:if>
2548
2340
  <xsl:value-of select="$preexpanded-value"/>
2549
2341
  </xsl:variable>
@@ -2583,7 +2375,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2583
2375
  <xsl:param name="debug.html.theme-name" select="''" />
2584
2376
 
2585
2377
  <xsl:variable name="html-theme-name">
2586
- <xsl:variable name="warning-message">PTX:WARNING: The "FROMSTYLE" style requested in publication/html/css is deprecated. Your book will be built with theme="TOSTYLE". See the PreTeXt Guide for options for the newer HTML themes and their specification .</xsl:variable>
2378
+ <xsl:variable name="warning-message">PTX:DEPRECATE: The "FROMSTYLE" style requested in publication/html/css is deprecated. Your book will be built with theme="TOSTYLE". See the PreTeXt Guide for options for the newer HTML themes and their specification .</xsl:variable>
2587
2379
  <xsl:choose>
2588
2380
  <xsl:when test="$debug.html.theme-name != ''">
2589
2381
  <xsl:value-of select="$debug.html.theme-name"/>
@@ -2882,7 +2674,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2882
2674
  </xsl:when>
2883
2675
  <!-- set, but not correct, so inform and use default -->
2884
2676
  <xsl:when test="$publication/html/search/@variant">
2885
- <xsl:message>PTX:WARNING: HTML search/@variant in publisher file should be "none", "textbook", "reference" or "default", not "<xsl:value-of select="$publication/html/search/@variant"/>". Proceeding with default value: "<xsl:value-of select="$default-native-search"/>"</xsl:message>
2677
+ <xsl:message>PTX:FALLBACK: HTML search/@variant in publisher file should be "none", "textbook", "reference" or "default", not "<xsl:value-of select="$publication/html/search/@variant"/>". Proceeding with default value: "<xsl:value-of select="$default-native-search"/>"</xsl:message>
2886
2678
  <xsl:value-of select="$default-native-search"/>
2887
2679
  </xsl:when>
2888
2680
  <!-- unset, so use default -->
@@ -2958,15 +2750,15 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2958
2750
  <xsl:when test="$chunk-level-entered != ''">
2959
2751
  <xsl:value-of select="$chunk-level-entered" />
2960
2752
  </xsl:when>
2961
- <xsl:when test="$version-root/book/part">3</xsl:when>
2962
- <xsl:when test="$version-root/book">2</xsl:when>
2963
- <xsl:when test="$version-root/article/section">1</xsl:when>
2964
- <xsl:when test="$version-root/article">0</xsl:when>
2965
- <xsl:when test="$version-root/slideshow">0</xsl:when>
2966
- <xsl:when test="$version-root/letter">0</xsl:when>
2967
- <xsl:when test="$version-root/memo">0</xsl:when>
2753
+ <xsl:when test="$version-has-parts">3</xsl:when>
2754
+ <xsl:when test="$version-doc-type = 'book'">2</xsl:when>
2755
+ <xsl:when test="$version-article-sections">1</xsl:when>
2756
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
2757
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
2758
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
2759
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
2968
2760
  <xsl:otherwise>
2969
- <xsl:message>PTX:ERROR: HTML chunk level not determined</xsl:message>
2761
+ <xsl:message>PTX:BUG: HTML chunk level not determined</xsl:message>
2970
2762
  </xsl:otherwise>
2971
2763
  </xsl:choose>
2972
2764
  </xsl:variable>
@@ -3041,6 +2833,77 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3041
2833
  </xsl:choose>
3042
2834
  </xsl:variable>
3043
2835
 
2836
+ <!-- The kernel a Jupyter notebook opens with; "sagemath" -->
2837
+ <!-- names the latest kernel of the Sage distribution's -->
2838
+ <!-- Jupyter, and of CoCalc -->
2839
+ <xsl:variable name="jupyter-kernel">
2840
+ <xsl:choose>
2841
+ <!-- The stringparam (deprecated 2026-07-10) once accepted many -->
2842
+ <!-- spellings of the Python kernel's name; each normalizes to -->
2843
+ <!-- "python3", with a warning. The canonical values continue -->
2844
+ <!-- through the generic machinery, which has its own warning. -->
2845
+ <xsl:when test="not($jupyter.kernel = '') and not($jupyter.kernel = 'python3') and not($jupyter.kernel = 'sagemath') and contains('|Python3|python 3|Python 3|py|Py|python|Python|', concat('|', $jupyter.kernel, '|'))">
2846
+ <xsl:text>python3</xsl:text>
2847
+ <xsl:message>PTX:DEPRECATE: the stringparam "jupyter.kernel" is deprecated (2026-07-10), and your value "<xsl:value-of select="$jupyter.kernel"/>" has been interpreted as "python3". Move to the publication file entry, jupyter/@kernel, with the value "python3".</xsl:message>
2848
+ </xsl:when>
2849
+ <xsl:otherwise>
2850
+ <xsl:apply-templates select="$publisher-attribute-options/jupyter/pi:pub-attribute[@name='kernel']" mode="set-pubfile-variable"/>
2851
+ </xsl:otherwise>
2852
+ </xsl:choose>
2853
+ </xsl:variable>
2854
+
2855
+
2856
+ <!-- ##################### -->
2857
+ <!-- Text-Specific Options -->
2858
+ <!-- ##################### -->
2859
+
2860
+ <!-- The character repertoire of the plain text and markdown -->
2861
+ <!-- conversions: genuine Unicode characters (dashes, quotation -->
2862
+ <!-- marks, ...) or 7-bit ASCII stand-ins. -->
2863
+ <xsl:variable name="text-characters">
2864
+ <xsl:apply-templates select="$publisher-attribute-options/text/pi:pub-attribute[@name='characters']" mode="set-pubfile-variable"/>
2865
+ </xsl:variable>
2866
+ <xsl:variable name="b-text-unicode" select="$text-characters = 'unicode'"/>
2867
+
2868
+
2869
+ <!-- ######################## -->
2870
+ <!-- Braille-Specific Options -->
2871
+ <!-- ######################## -->
2872
+
2873
+ <!-- Page geometry of embossed output: cells in a line, lines on a -->
2874
+ <!-- page. Freeform entries, validated here to positive integers, -->
2875
+ <!-- with the common North American embosser page as the default. -->
2876
+
2877
+ <xsl:variable name="braille-page-width-entered">
2878
+ <xsl:apply-templates select="$publisher-attribute-options/braille/page/pi:pub-attribute[@name='width']" mode="set-pubfile-variable"/>
2879
+ </xsl:variable>
2880
+ <xsl:variable name="braille-page-width">
2881
+ <xsl:choose>
2882
+ <xsl:when test="(number($braille-page-width-entered) = round(number($braille-page-width-entered))) and (number($braille-page-width-entered) &gt; 0)">
2883
+ <xsl:value-of select="round(number($braille-page-width-entered))"/>
2884
+ </xsl:when>
2885
+ <xsl:otherwise>
2886
+ <xsl:message>PTX:FALLBACK: the braille page width in the publication file ("<xsl:value-of select="$braille-page-width-entered"/>") must be a positive whole number of cells, using the default, 40</xsl:message>
2887
+ <xsl:text>40</xsl:text>
2888
+ </xsl:otherwise>
2889
+ </xsl:choose>
2890
+ </xsl:variable>
2891
+
2892
+ <xsl:variable name="braille-page-height-entered">
2893
+ <xsl:apply-templates select="$publisher-attribute-options/braille/page/pi:pub-attribute[@name='height']" mode="set-pubfile-variable"/>
2894
+ </xsl:variable>
2895
+ <xsl:variable name="braille-page-height">
2896
+ <xsl:choose>
2897
+ <xsl:when test="(number($braille-page-height-entered) = round(number($braille-page-height-entered))) and (number($braille-page-height-entered) &gt; 0)">
2898
+ <xsl:value-of select="round(number($braille-page-height-entered))"/>
2899
+ </xsl:when>
2900
+ <xsl:otherwise>
2901
+ <xsl:message>PTX:FALLBACK: the braille page height in the publication file ("<xsl:value-of select="$braille-page-height-entered"/>") must be a positive whole number of lines, using the default, 25</xsl:message>
2902
+ <xsl:text>25</xsl:text>
2903
+ </xsl:otherwise>
2904
+ </xsl:choose>
2905
+ </xsl:variable>
2906
+
3044
2907
 
3045
2908
  <!-- ###################### -->
3046
2909
  <!-- LaTeX-Specific Options -->
@@ -3120,7 +2983,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3120
2983
  </xsl:when>
3121
2984
  <!-- attempted to set, but wrong -->
3122
2985
  <xsl:when test="$publication/latex/page/@right-alignment">
3123
- <xsl:message>PTX:WARNING: LaTeX right-alignment setting in publisher file should be "flush" or "ragged", not "<xsl:value-of select="$publication/latex/page/@right-alignment"/>". Proceeding with default value: "<xsl:value-of select="$default-align"/>"</xsl:message>
2986
+ <xsl:message>PTX:FALLBACK: LaTeX right-alignment setting in publisher file should be "flush" or "ragged", not "<xsl:value-of select="$publication/latex/page/@right-alignment"/>". Proceeding with default value: "<xsl:value-of select="$default-align"/>"</xsl:message>
3124
2987
  <xsl:value-of select="$default-align"/>
3125
2988
  </xsl:when>
3126
2989
  <!-- or respect deprecated stringparam in use, text.alignment -->
@@ -3190,7 +3053,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3190
3053
  <xsl:text>pt</xsl:text>
3191
3054
  </xsl:when>
3192
3055
  <xsl:otherwise>
3193
- <xsl:message>PTX:WARNING: LaTeX @font-size in publication file should be 8, 9, 10, 11, 12, 14, 17 or 20 points, not "<xsl:value-of select="$publication/latex/@font-size"/>". Proceeding with default value: "10"</xsl:message>
3056
+ <xsl:message>PTX:FALLBACK: LaTeX @font-size in publication file should be 8, 9, 10, 11, 12, 14, 17 or 20 points, not "<xsl:value-of select="$publication/latex/@font-size"/>". Proceeding with default value: "10"</xsl:message>
3194
3057
  <xsl:text>10pt</xsl:text>
3195
3058
  </xsl:otherwise>
3196
3059
  </xsl:choose>
@@ -3209,7 +3072,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3209
3072
  <xsl:when test="$latex.font.size='20pt'"><xsl:value-of select="$latex.font.size" /></xsl:when>
3210
3073
  <xsl:otherwise>
3211
3074
  <xsl:text>10pt</xsl:text>
3212
- <xsl:message>PTX:ERROR the *deprecated* latex.font.size parameter must be 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, or 20pt, not "<xsl:value-of select="$latex.font.size" />". Using the default ("10pt")</xsl:message>
3075
+ <xsl:message>PTX:FALLBACK: the *deprecated* latex.font.size parameter must be 8pt, 9pt, 10pt, 11pt, 12pt, 14pt, 17pt, or 20pt, not "<xsl:value-of select="$latex.font.size" />". Using the default ("10pt")</xsl:message>
3213
3076
  </xsl:otherwise>
3214
3077
  </xsl:choose>
3215
3078
  </xsl:when>
@@ -3233,7 +3096,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3233
3096
  </xsl:when>
3234
3097
  <!-- attempted to set, but not a recognized key -->
3235
3098
  <xsl:when test="$publication/pdf/@font">
3236
- <xsl:message>PTX:WARNING: PDF (XSL-FO) font setting in publisher file should be "latin-modern", not "<xsl:value-of select="$publication/pdf/@font"/>". Proceeding with default value: "<xsl:value-of select="$default-pdf-font"/>"</xsl:message>
3099
+ <xsl:message>PTX:FALLBACK: PDF (XSL-FO) font setting in publisher file should be "latin-modern", not "<xsl:value-of select="$publication/pdf/@font"/>". Proceeding with default value: "<xsl:value-of select="$default-pdf-font"/>"</xsl:message>
3237
3100
  <xsl:value-of select="$default-pdf-font"/>
3238
3101
  </xsl:when>
3239
3102
  <!-- no attempt at all, so default -->
@@ -3313,7 +3176,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3313
3176
  <xsl:choose>
3314
3177
  <!-- fail when no base URL is given -->
3315
3178
  <xsl:when test="not($b-has-baseurl)">
3316
- <xsl:message>PTX WARNING: baseurl must be set in publisher file to enable links from Asymptote images</xsl:message>
3179
+ <xsl:message>PTX:WARNING: baseurl must be set in publisher file to enable links from Asymptote images</xsl:message>
3317
3180
  <xsl:text>no</xsl:text>
3318
3181
  </xsl:when>
3319
3182
  <xsl:otherwise>
@@ -3326,7 +3189,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3326
3189
  </xsl:when>
3327
3190
  <!-- set, but not correct, so inform and use default -->
3328
3191
  <xsl:when test="$publication/latex/asymptote/@links">
3329
- <xsl:message>PTX WARNING: LaTeX links to Asymptote publisher file should be "yes" (links to HTML) or "no" (no links), not "<xsl:value-of select="$publication/latex/asymptote/@links"/>". Proceeding with default value: "no" (no links)</xsl:message>
3192
+ <xsl:message>PTX:FALLBACK: LaTeX links to Asymptote publisher file should be "yes" (links to HTML) or "no" (no links), not "<xsl:value-of select="$publication/latex/asymptote/@links"/>". Proceeding with default value: "no" (no links)</xsl:message>
3330
3193
  <xsl:text>no</xsl:text>
3331
3194
  </xsl:when>
3332
3195
  <!-- unset, use the default, which is "no" since -->
@@ -3348,7 +3211,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3348
3211
  <xsl:choose>
3349
3212
  <!-- fail when no base URL is given -->
3350
3213
  <xsl:when test="not($b-has-baseurl)">
3351
- <xsl:message>PTX WARNING: baseurl must be set in publisher file to enable links from Asymptote images</xsl:message>
3214
+ <xsl:message>PTX:WARNING: baseurl must be set in publisher file to enable links from Asymptote images</xsl:message>
3352
3215
  <xsl:text>no</xsl:text>
3353
3216
  </xsl:when>
3354
3217
  <xsl:otherwise>
@@ -3361,7 +3224,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3361
3224
  </xsl:when>
3362
3225
  <!-- set, but not correct, so inform and use default -->
3363
3226
  <xsl:when test="$publication/html/asymptote/@links">
3364
- <xsl:message>PTX WARNING: HTML links to Asymptote publisher file should be "yes" (adds link below image) or "no" (no links), not "<xsl:value-of select="$publication/latex/asymptote/@links"/>". Proceeding with default value: "no" (no links)</xsl:message>
3227
+ <xsl:message>PTX:FALLBACK: HTML links to Asymptote publisher file should be "yes" (adds link below image) or "no" (no links), not "<xsl:value-of select="$publication/latex/asymptote/@links"/>". Proceeding with default value: "no" (no links)</xsl:message>
3365
3228
  <xsl:text>no</xsl:text>
3366
3229
  </xsl:when>
3367
3230
  <!-- unset, use the default, which is "no" since -->
@@ -3486,33 +3349,80 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3486
3349
  <xsl:apply-templates select="$publisher-attribute-options/revealjs/navigation/pi:pub-attribute[@name='mode']" mode="set-pubfile-variable"/>
3487
3350
  </xsl:variable>
3488
3351
 
3352
+ <!-- "online" (default) loads MathJax in the browser; "embedded" -->
3353
+ <!-- replaces each piece of mathematics with an SVG image, with a -->
3354
+ <!-- speech string, both manufactured at build time, so the -->
3355
+ <!-- slideshow performs no typesetting at all. The default flips -->
3356
+ <!-- to "embedded" when the resources are embedded (a custom -->
3357
+ <!-- default template below), since a network-detached slideshow -->
3358
+ <!-- cannot load MathJax. -->
3359
+ <xsl:variable name="reveal-math-source">
3360
+ <xsl:apply-templates select="$publisher-attribute-options/revealjs/resources/pi:pub-attribute[@name='math']" mode="set-pubfile-variable"/>
3361
+ </xsl:variable>
3362
+ <xsl:variable name="b-reveal-embedded-math" select="$reveal-math-source = 'embedded'"/>
3363
+
3364
+ <xsl:template match="revealjs/resources/pi:pub-attribute[@name='math']" mode="get-default-pub-variable">
3365
+ <xsl:choose>
3366
+ <xsl:when test="$publication/revealjs/resources/@host = 'embedded'">
3367
+ <xsl:text>embedded</xsl:text>
3368
+ </xsl:when>
3369
+ <xsl:otherwise>
3370
+ <xsl:text>online</xsl:text>
3371
+ </xsl:otherwise>
3372
+ </xsl:choose>
3373
+ </xsl:template>
3374
+
3489
3375
  <!-- Reveal.js Resources file location -->
3490
3376
 
3377
+ <!-- The *effective* host. Embedded resources require embedded -->
3378
+ <!-- mathematics: an authored "math" left unspecified defaults to -->
3379
+ <!-- "embedded" (above), but an explicit online election contradicts -->
3380
+ <!-- the request for a network-detached file, so the whole slideshow -->
3381
+ <!-- falls back to fully online, with an error. -->
3382
+ <xsl:variable name="reveal-resources-host">
3383
+ <xsl:choose>
3384
+ <xsl:when test="($publication/revealjs/resources/@host = 'embedded') and not($b-reveal-embedded-math)">
3385
+ <xsl:message>PTX:ERROR: the publisher file elects embedded reveal.js resources (revealjs/resources/@host) but online mathematics (revealjs/resources/@math). A network-detached slideshow cannot load MathJax, so both entries will be treated as online. Remove the "math" entry, or set it to "embedded", to embed the resources.</xsl:message>
3386
+ <xsl:text>cdn</xsl:text>
3387
+ </xsl:when>
3388
+ <xsl:when test="$publication/revealjs/resources/@host">
3389
+ <xsl:value-of select="$publication/revealjs/resources/@host"/>
3390
+ </xsl:when>
3391
+ <!-- default to the CDN if no specification -->
3392
+ <xsl:otherwise>
3393
+ <xsl:text>cdn</xsl:text>
3394
+ </xsl:otherwise>
3395
+ </xsl:choose>
3396
+ </xsl:variable>
3397
+ <xsl:variable name="b-reveal-embedded-resources" select="$reveal-resources-host = 'embedded'"/>
3398
+
3491
3399
  <!-- String to prefix reveal.js resources -->
3492
3400
  <xsl:variable name="reveal-root">
3493
3401
  <!-- CDN is used twice, so just edit here -->
3494
3402
  <!-- NB: deprecation is frozen -->
3403
+ <!-- The "@6" is a semantic-version range: jsdelivr serves the -->
3404
+ <!-- newest 6.x release, so fixes arrive automatically while a -->
3405
+ <!-- breaking 7.0 cannot. Same pattern as the MathJax "@4" URLs. -->
3495
3406
  <xsl:variable name="cdn-url">
3496
- <xsl:text>https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2</xsl:text>
3407
+ <xsl:text>https://cdn.jsdelivr.net/npm/reveal.js@6/dist</xsl:text>
3497
3408
  </xsl:variable>
3498
3409
 
3499
3410
  <xsl:choose>
3500
3411
  <!-- if publisher.xml file has CDN option specified, use it -->
3501
3412
  <!-- keep this URL updated, but not for the deprecation situation -->
3502
- <xsl:when test="$publication/revealjs/resources/@host = 'cdn'">
3413
+ <!-- Embedded resources emit the same CDN references: the -->
3414
+ <!-- pretext/pretext script replaces them with the file contents, -->
3415
+ <!-- and any other processing degrades gracefully to the CDN. -->
3416
+ <xsl:when test="($reveal-resources-host = 'cdn') or ($reveal-resources-host = 'embedded')">
3503
3417
  <xsl:value-of select="$cdn-url"/>
3504
3418
  </xsl:when>
3505
3419
  <!-- if publisher.xml file has the local option specified, use it -->
3506
- <xsl:when test="$publication/revealjs/resources/@host = 'local'">
3420
+ <xsl:when test="$reveal-resources-host = 'local'">
3507
3421
  <xsl:text>.</xsl:text>
3508
3422
  </xsl:when>
3509
3423
  <!-- Experimental - just some file path/url -->
3510
- <xsl:when test="$publication/revealjs/resources/@host">
3511
- <xsl:value-of select="$publication/revealjs/resources/@host"/>
3512
- </xsl:when>
3513
- <!-- default to the CDN if no specification -->
3514
3424
  <xsl:otherwise>
3515
- <xsl:value-of select="$cdn-url"/>
3425
+ <xsl:value-of select="$reveal-resources-host"/>
3516
3426
  </xsl:otherwise>
3517
3427
  </xsl:choose>
3518
3428
  </xsl:variable>
@@ -3600,6 +3510,9 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3600
3510
  <calculator>
3601
3511
  <pi:pub-attribute name="model" default="none" options="geogebra-classic geogebra-graphing geogebra-geometry geogebra-3d" legacy-stringparam="html.calculator"/>
3602
3512
  </calculator>
3513
+ <annotation>
3514
+ <pi:pub-attribute name="platform" default="none" options="hypothesis" legacy-stringparam="html.annotation"/>
3515
+ </annotation>
3603
3516
  <css>
3604
3517
  <pi:pub-attribute name="palette" freeform="yes"/>
3605
3518
  </css>
@@ -3690,6 +3603,9 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3690
3603
  <pi:pub-attribute name="front" freeform="yes"/>
3691
3604
  </cover>
3692
3605
  </epub>
3606
+ <jupyter>
3607
+ <pi:pub-attribute name="kernel" default="sagemath" options="python3" legacy-stringparam="jupyter.kernel"/>
3608
+ </jupyter>
3693
3609
  <latex>
3694
3610
  <pi:pub-attribute name="sides" options="one two" legacy-stringparam="latex.sides"/>
3695
3611
  <pi:pub-attribute name="print" default="no" options="yes" legacy-stringparam="latex.print"/>
@@ -3728,6 +3644,15 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3728
3644
  <stack>
3729
3645
  <pi:pub-attribute name="server" default="https://stack-api.maths.ed.ac.uk" freeform="yes"/>
3730
3646
  </stack>
3647
+ <braille>
3648
+ <page>
3649
+ <pi:pub-attribute name="width" default="40" freeform="yes"/>
3650
+ <pi:pub-attribute name="height" default="25" freeform="yes"/>
3651
+ </page>
3652
+ </braille>
3653
+ <text>
3654
+ <pi:pub-attribute name="characters" default="unicode" options="ascii"/>
3655
+ </text>
3731
3656
  <revealjs>
3732
3657
  <appearance>
3733
3658
  <pi:pub-attribute name="theme" default="simple" freeform="yes"/>
@@ -3742,6 +3667,12 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3742
3667
  <navigation>
3743
3668
  <pi:pub-attribute name="mode" default="default" options="linear grid"/>
3744
3669
  </navigation>
3670
+ <!-- "@host" is also authored on "resources", but its values -->
3671
+ <!-- are not an enumeration (an arbitrary path is legal), so -->
3672
+ <!-- it is consulted directly by the "reveal-root" variable -->
3673
+ <resources>
3674
+ <pi:pub-attribute name="math" default="online" options="embedded"/>
3675
+ </resources>
3745
3676
  </revealjs>
3746
3677
  </pi:publisher>
3747
3678
 
@@ -3777,14 +3708,14 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3777
3708
  <!-- it is among the legal options, use it and issue warning -->
3778
3709
  <xsl:when test="not($pubfile-attribute) and @legacy-stringparam and (@freeform = 'yes' or dyn:evaluate(concat('$', @legacy-stringparam)) = $all-options)">
3779
3710
  <xsl:value-of select="dyn:evaluate(concat('$', @legacy-stringparam))"/>
3780
- <xsl:message>PTX:WARNING: the stringparam "<xsl:value-of select="@legacy-stringparam"/>" is deprecated. Your value, "<xsl:value-of select="dyn:evaluate(concat('$', @legacy-stringparam))"/>" will be used. However you should move to using a publisher file entry for <xsl:value-of select="$full-path"/> instead.</xsl:message>
3711
+ <xsl:message>PTX:DEPRECATE: the stringparam "<xsl:value-of select="@legacy-stringparam"/>" is deprecated. Your value, "<xsl:value-of select="dyn:evaluate(concat('$', @legacy-stringparam))"/>" will be used. However you should move to using a publisher file entry for <xsl:value-of select="$full-path"/> instead.</xsl:message>
3781
3712
  </xsl:when>
3782
3713
  <!-- if nothing is declared in the publisher file, not even as null -->
3783
3714
  <!-- and if there is an old stringparam that we still honor, and if -->
3784
3715
  <!-- it is among the legacy options, use default and issue warning -->
3785
3716
  <xsl:when test="not($pubfile-attribute) and @legacy-stringparam and dyn:evaluate(concat('$', @legacy-stringparam)) = $legacy-options">
3786
3717
  <xsl:value-of select="$the-default"/>
3787
- <xsl:message>PTX:WARNING: the stringparam "<xsl:value-of select="@legacy-stringparam"/>" is deprecated. Also your value, "<xsl:value-of select="dyn:evaluate(concat('$', @legacy-stringparam))"/>" has been retired. You should move to using a publisher file entry <xsl:value-of select="$full-path"/> with possible values: <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3718
+ <xsl:message>PTX:DEPRECATE: the stringparam "<xsl:value-of select="@legacy-stringparam"/>" is deprecated. Also your value, "<xsl:value-of select="dyn:evaluate(concat('$', @legacy-stringparam))"/>" has been retired. You should move to using a publisher file entry <xsl:value-of select="$full-path"/> with possible values: <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3788
3719
  </xsl:when>
3789
3720
  <!-- if nothing is declared in the publisher file, not even as null -->
3790
3721
  <!-- and if there is an old stringparam that we still honor, but its -->
@@ -3792,7 +3723,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3792
3723
  <!-- then use default and issue warning -->
3793
3724
  <xsl:when test="not($pubfile-attribute) and @legacy-stringparam and dyn:evaluate(concat('$', @legacy-stringparam)) != ''">
3794
3725
  <xsl:value-of select="$the-default"/>
3795
- <xsl:message>PTX:WARNING: the stringparam "<xsl:value-of select="@legacy-stringparam"/>" is deprecated. Also your value, "<xsl:value-of select="dyn:evaluate(concat('$', @legacy-stringparam))"/>" is not a legal option. You should move to using a publisher file entry <xsl:value-of select="$full-path"/> with possible values: <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3726
+ <xsl:message>PTX:DEPRECATE: the stringparam "<xsl:value-of select="@legacy-stringparam"/>" is deprecated. Also your value, "<xsl:value-of select="dyn:evaluate(concat('$', @legacy-stringparam))"/>" is not a legal option. You should move to using a publisher file entry <xsl:value-of select="$full-path"/> with possible values: <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3796
3727
  </xsl:when>
3797
3728
  <!-- if nothing is declared in the publisher file or it is declared -->
3798
3729
  <!-- as null, use the default, which might be null -->
@@ -3812,13 +3743,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3812
3743
  <!-- if it's among the legacy options, use default and issue warning -->
3813
3744
  <xsl:when test="$pubfile-attribute = $legacy-options">
3814
3745
  <xsl:value-of select="$the-default"/>
3815
- <xsl:message>PTX:WARNING: your value "<xsl:value-of select="$pubfile-attribute"/>" for the publisher file entry <xsl:value-of select="$path"/> has been retired; possible values are <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3746
+ <xsl:message>PTX:FALLBACK: your value "<xsl:value-of select="$pubfile-attribute"/>" for the publisher file entry <xsl:value-of select="$path"/> has been retired; possible values are <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3816
3747
  </xsl:when>
3817
3748
  <!-- pubfile has some string that is not among legal options, and -->
3818
3749
  <!-- freeform is disallowed, so give a warning and use default -->
3819
3750
  <xsl:otherwise>
3820
3751
  <xsl:value-of select="$the-default"/>
3821
- <xsl:message>PTX:WARNING: the publisher file <xsl:value-of select="$path"/> entry should not have value "<xsl:value-of select="$pubfile-attribute"/>". Possible values are: <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3752
+ <xsl:message>PTX:FALLBACK: the publisher file <xsl:value-of select="$path"/> entry should not have value "<xsl:value-of select="$pubfile-attribute"/>". Possible values are: <xsl:apply-templates select="$all-options" mode="quoted-list"/>. The default, "<xsl:value-of select="$the-default"/>", will be used instead.</xsl:message>
3822
3753
  </xsl:otherwise>
3823
3754
  </xsl:choose>
3824
3755
  </xsl:template>
@@ -3979,6 +3910,8 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3979
3910
  <xsl:param name="chunk.level" select="''" />
3980
3911
  <!-- 2021-01-03 toc.level to publisher file -->
3981
3912
  <xsl:param name="toc.level" select="''" />
3913
+ <!-- 2026-07-10 jupyter.kernel to publisher file -->
3914
+ <xsl:param name="jupyter.kernel" select="''" />
3982
3915
 
3983
3916
  <!-- Deprecated 2021-01-23, but still respected -->
3984
3917
  <xsl:param name="html.knowl.theorem" select="''" />
@@ -4093,6 +4026,10 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4093
4026
  <!-- Deprecated 2026-06-07, but still respected -->
4094
4027
  <xsl:param name="debug.project.number" select="''" />
4095
4028
 
4029
+ <!-- DEPRECATED: 2026-07-25 In favor of -->
4030
+ <!-- html/annotation/@platform in publisher file -->
4031
+ <xsl:param name="html.annotation" select="''" />
4032
+
4096
4033
  <!-- ###################################### -->
4097
4034
  <!-- Parameter Deprecation Warning Messages -->
4098
4035
  <!-- ###################################### -->
@@ -4751,6 +4688,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4751
4688
  <xsl:with-param name="incorrect-use" select="($debug.project.number != '')" />
4752
4689
  </xsl:call-template>
4753
4690
  <!-- -->
4691
+ <!-- 2026-07-25 HTML annotation platform controlled by publisher file -->
4692
+ <xsl:call-template name="parameter-deprecation-message">
4693
+ <xsl:with-param name="date-string" select="'2026-07-25'" />
4694
+ <xsl:with-param name="message" select="'the html.annotation parameter has been replaced by the html/annotation/@platform entry in the publisher file. We will attempt to honor your selection. But please switch to using the Publishers File for configuration, as documented in the PreTeXt Guide.'" />
4695
+ <xsl:with-param name="incorrect-use" select="($html.annotation != '')" />
4696
+ </xsl:call-template>
4697
+ <!-- -->
4754
4698
  </xsl:template>
4755
4699
 
4756
4700
  </xsl:stylesheet>