@pretextbook/pretext-html 0.3.0 → 0.5.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 (58) hide show
  1. package/README.md +106 -10
  2. package/assets/preview-html.xsl +8 -4
  3. package/assets/preview-revealjs.xsl +85 -0
  4. package/assets/upstream.json +1 -1
  5. package/assets/xsl/LICENSE-pretext +16 -0
  6. package/assets/xsl/README.md +25 -24
  7. package/assets/xsl/entities.ent +27 -0
  8. package/assets/xsl/extract-biblio-csl.xsl +6 -4
  9. package/assets/xsl/extract-dynamic.xsl +14 -12
  10. package/assets/xsl/extract-interactive.xsl +2 -2
  11. package/assets/xsl/extract-pg.xsl +123 -306
  12. package/assets/xsl/extract-qrcode.xsl +12 -2
  13. package/assets/xsl/extract-sageplot.xsl +1 -1
  14. package/assets/xsl/extract-trace.xsl +3 -3
  15. package/assets/xsl/extract-youtube.xsl +1 -1
  16. package/assets/xsl/latex/pretext-latex-texstyle.xsl +4 -5
  17. package/assets/xsl/localizations/README.md +24 -24
  18. package/assets/xsl/pretext-assembly.xsl +463 -368
  19. package/assets/xsl/pretext-beamer.xsl +43 -146
  20. package/assets/xsl/pretext-braille-preprint.xsl +458 -202
  21. package/assets/xsl/pretext-common.xsl +486 -510
  22. package/assets/xsl/pretext-epub.xsl +318 -78
  23. package/assets/xsl/pretext-fo.xsl +80 -96
  24. package/assets/xsl/pretext-html.xsl +413 -318
  25. package/assets/xsl/pretext-jupyter.xsl +534 -322
  26. package/assets/xsl/pretext-latex-classic.xsl +14 -15
  27. package/assets/xsl/pretext-latex-common.xsl +393 -2397
  28. package/assets/xsl/pretext-latex.xsl +1995 -5
  29. package/assets/xsl/pretext-markdown.xsl +919 -0
  30. package/assets/xsl/pretext-numbers.xsl +57 -39
  31. package/assets/xsl/pretext-revealjs.xsl +241 -33
  32. package/assets/xsl/pretext-runestone-fitb.xsl +34 -35
  33. package/assets/xsl/pretext-runestone-static.xsl +17 -17
  34. package/assets/xsl/pretext-runestone.xsl +36 -34
  35. package/assets/xsl/pretext-sage-doctest.xsl +2 -2
  36. package/assets/xsl/pretext-text-utilities.xsl +69 -1
  37. package/assets/xsl/pretext-text.xsl +1077 -107
  38. package/assets/xsl/pretext-view-source.xsl +5 -3
  39. package/assets/xsl/pretext-ww-problem-sets.xsl +6 -1
  40. package/assets/xsl/publisher-variables.xsl +397 -477
  41. package/assets/xsl/support/play-button/README.md +1 -3
  42. package/assets/xsl/tests/README.md +1 -1
  43. package/assets/xsl/utilities/README.md +6 -8
  44. package/assets/xsl/utilities/report-publisher-variables.xsl +15 -0
  45. package/assets/xsl-bundle.json +1 -1
  46. package/dist/cli-DZsyZERX.js +694 -0
  47. package/dist/cli.js +1 -1
  48. package/dist/index.browser.d.ts +5 -0
  49. package/dist/index.browser.js +499 -344
  50. package/dist/index.d.ts +5 -0
  51. package/dist/index.js +23 -18
  52. package/dist/publication.d.ts +26 -12
  53. package/dist/renderer.d.ts +68 -0
  54. package/dist/reveal.d.ts +77 -0
  55. package/dist/reveal.js +110 -0
  56. package/dist/target.d.ts +34 -0
  57. package/package.json +12 -1
  58. package/dist/cli-CzoinNle.js +0 -639
@@ -105,6 +105,35 @@ 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
+ <!-- An article is "sectioned" for every structure-driven default -->
127
+ <!-- below when it has a "section", a "worksheet", or a "handout": -->
128
+ <!-- the three are peers at the same level, so a workbook of -->
129
+ <!-- printouts numbers and chunks as a sectioned article does. -->
130
+ <xsl:variable name="version-has-parts" select="boolean($version-root/book/part)"/>
131
+ <xsl:variable name="version-book-chapters" select="boolean($version-root/book/part/chapter|$version-root/book/chapter)"/>
132
+ <xsl:variable name="version-book-sections" select="boolean($version-root/book/part/chapter/section|$version-root/book/chapter/section)"/>
133
+ <xsl:variable name="version-article-sections" select="boolean($version-root/article/section)"/>
134
+ <xsl:variable name="version-article-printouts" select="boolean($version-root/article/worksheet|$version-root/article/handout)"/>
135
+ <xsl:variable name="version-article-subsections" select="boolean($version-root/article/section/subsection)"/>
136
+
108
137
  <!-- A book must have a chapter -->
109
138
  <!-- An article need not have a section -->
110
139
  <!-- This gets replaced in -latex stylehseet -->
@@ -114,18 +143,18 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
114
143
  <xsl:template match="common/tableofcontents/pi:pub-attribute[@name='level']" mode="get-default-pub-variable">
115
144
  <xsl:choose>
116
145
  <!-- 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>
146
+ <xsl:when test="$version-has-parts and $version-book-sections">3</xsl:when>
147
+ <xsl:when test="$version-has-parts and $version-book-chapters">2</xsl:when>
148
+ <xsl:when test="$version-book-sections">2</xsl:when>
149
+ <xsl:when test="$version-book-chapters">1</xsl:when>
150
+ <xsl:when test="$version-article-subsections">2</xsl:when>
151
+ <xsl:when test="$version-article-sections or $version-article-printouts">1</xsl:when>
152
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
153
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
154
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
155
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
127
156
  <xsl:otherwise>
128
- <xsl:message>PTX:ERROR: Table of Contents level not determined</xsl:message>
157
+ <xsl:message>PTX:BUG: Table of Contents level not determined</xsl:message>
129
158
  </xsl:otherwise>
130
159
  </xsl:choose>
131
160
  </xsl:template>
@@ -358,7 +387,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
358
387
  <xsl:text>no</xsl:text>
359
388
  </xsl:when>
360
389
  <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>
390
+ <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
391
  <xsl:text>yes</xsl:text>
363
392
  </xsl:otherwise>
364
393
  </xsl:choose>
@@ -378,7 +407,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
378
407
  <xsl:value-of select="$exercise.text.statement" />
379
408
  </xsl:when>
380
409
  <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>
410
+ <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
411
  </xsl:otherwise>
383
412
  </xsl:choose>
384
413
  </xsl:variable>
@@ -394,7 +423,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
394
423
  <xsl:text>no</xsl:text>
395
424
  </xsl:when>
396
425
  <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>
426
+ <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
427
  <xsl:text>yes</xsl:text>
399
428
  </xsl:otherwise>
400
429
  </xsl:choose>
@@ -414,7 +443,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
414
443
  <xsl:value-of select="$exercise.text.hint" />
415
444
  </xsl:when>
416
445
  <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>
446
+ <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
447
  </xsl:otherwise>
419
448
  </xsl:choose>
420
449
  </xsl:variable>
@@ -430,7 +459,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
430
459
  <xsl:text>no</xsl:text>
431
460
  </xsl:when>
432
461
  <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>
462
+ <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
463
  <xsl:text>yes</xsl:text>
435
464
  </xsl:otherwise>
436
465
  </xsl:choose>
@@ -450,7 +479,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
450
479
  <xsl:value-of select="$exercise.text.answer" />
451
480
  </xsl:when>
452
481
  <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>
482
+ <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
483
  </xsl:otherwise>
455
484
  </xsl:choose>
456
485
  </xsl:variable>
@@ -466,7 +495,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
466
495
  <xsl:text>no</xsl:text>
467
496
  </xsl:when>
468
497
  <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>
498
+ <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
499
  <xsl:text>yes</xsl:text>
471
500
  </xsl:otherwise>
472
501
  </xsl:choose>
@@ -486,7 +515,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
486
515
  <xsl:value-of select="$exercise.text.solution" />
487
516
  </xsl:when>
488
517
  <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>
518
+ <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
519
  </xsl:otherwise>
491
520
  </xsl:choose>
492
521
  </xsl:variable>
@@ -502,7 +531,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
502
531
  <xsl:text>no</xsl:text>
503
532
  </xsl:when>
504
533
  <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>
534
+ <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
535
  <xsl:text>yes</xsl:text>
507
536
  </xsl:otherwise>
508
537
  </xsl:choose>
@@ -522,7 +551,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
522
551
  <xsl:value-of select="$exercise.divisional.statement" />
523
552
  </xsl:when>
524
553
  <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>
554
+ <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
555
  </xsl:otherwise>
527
556
  </xsl:choose>
528
557
  </xsl:variable>
@@ -538,7 +567,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
538
567
  <xsl:text>no</xsl:text>
539
568
  </xsl:when>
540
569
  <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>
570
+ <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
571
  <xsl:text>yes</xsl:text>
543
572
  </xsl:otherwise>
544
573
  </xsl:choose>
@@ -558,7 +587,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
558
587
  <xsl:value-of select="$exercise.divisional.hint" />
559
588
  </xsl:when>
560
589
  <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>
590
+ <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
591
  </xsl:otherwise>
563
592
  </xsl:choose>
564
593
  </xsl:variable>
@@ -574,7 +603,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
574
603
  <xsl:text>no</xsl:text>
575
604
  </xsl:when>
576
605
  <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>
606
+ <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
607
  <xsl:text>yes</xsl:text>
579
608
  </xsl:otherwise>
580
609
  </xsl:choose>
@@ -594,7 +623,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
594
623
  <xsl:value-of select="$exercise.divisional.answer" />
595
624
  </xsl:when>
596
625
  <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>
626
+ <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
627
  </xsl:otherwise>
599
628
  </xsl:choose>
600
629
  </xsl:variable>
@@ -610,7 +639,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
610
639
  <xsl:text>no</xsl:text>
611
640
  </xsl:when>
612
641
  <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>
642
+ <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
643
  <xsl:text>yes</xsl:text>
615
644
  </xsl:otherwise>
616
645
  </xsl:choose>
@@ -630,7 +659,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
630
659
  <xsl:value-of select="$exercise.divisional.solution" />
631
660
  </xsl:when>
632
661
  <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>
662
+ <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
663
  </xsl:otherwise>
635
664
  </xsl:choose>
636
665
  </xsl:variable>
@@ -646,7 +675,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
646
675
  <xsl:text>no</xsl:text>
647
676
  </xsl:when>
648
677
  <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>
678
+ <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
679
  <xsl:text>yes</xsl:text>
651
680
  </xsl:otherwise>
652
681
  </xsl:choose>
@@ -666,7 +695,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
666
695
  <xsl:value-of select="$exercise.worksheet.statement" />
667
696
  </xsl:when>
668
697
  <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>
698
+ <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
699
  </xsl:otherwise>
671
700
  </xsl:choose>
672
701
  </xsl:variable>
@@ -682,7 +711,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
682
711
  <xsl:text>no</xsl:text>
683
712
  </xsl:when>
684
713
  <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>
714
+ <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
715
  <xsl:text>yes</xsl:text>
687
716
  </xsl:otherwise>
688
717
  </xsl:choose>
@@ -702,7 +731,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
702
731
  <xsl:value-of select="$exercise.worksheet.hint" />
703
732
  </xsl:when>
704
733
  <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>
734
+ <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
735
  </xsl:otherwise>
707
736
  </xsl:choose>
708
737
  </xsl:variable>
@@ -718,7 +747,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
718
747
  <xsl:text>no</xsl:text>
719
748
  </xsl:when>
720
749
  <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>
750
+ <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
751
  <xsl:text>yes</xsl:text>
723
752
  </xsl:otherwise>
724
753
  </xsl:choose>
@@ -738,7 +767,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
738
767
  <xsl:value-of select="$exercise.worksheet.answer" />
739
768
  </xsl:when>
740
769
  <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>
770
+ <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
771
  </xsl:otherwise>
743
772
  </xsl:choose>
744
773
  </xsl:variable>
@@ -754,7 +783,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
754
783
  <xsl:text>no</xsl:text>
755
784
  </xsl:when>
756
785
  <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>
786
+ <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
787
  <xsl:text>yes</xsl:text>
759
788
  </xsl:otherwise>
760
789
  </xsl:choose>
@@ -774,7 +803,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
774
803
  <xsl:value-of select="$exercise.worksheet.solution" />
775
804
  </xsl:when>
776
805
  <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>
806
+ <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
807
  </xsl:otherwise>
779
808
  </xsl:choose>
780
809
  </xsl:variable>
@@ -790,7 +819,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
790
819
  <xsl:text>no</xsl:text>
791
820
  </xsl:when>
792
821
  <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>
822
+ <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
823
  <xsl:text>yes</xsl:text>
795
824
  </xsl:otherwise>
796
825
  </xsl:choose>
@@ -810,7 +839,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
810
839
  <xsl:value-of select="$exercise.reading.statement" />
811
840
  </xsl:when>
812
841
  <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>
842
+ <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
843
  </xsl:otherwise>
815
844
  </xsl:choose>
816
845
  </xsl:variable>
@@ -826,7 +855,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
826
855
  <xsl:text>no</xsl:text>
827
856
  </xsl:when>
828
857
  <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>
858
+ <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
859
  <xsl:text>yes</xsl:text>
831
860
  </xsl:otherwise>
832
861
  </xsl:choose>
@@ -846,7 +875,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
846
875
  <xsl:value-of select="$exercise.reading.hint" />
847
876
  </xsl:when>
848
877
  <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>
878
+ <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
879
  </xsl:otherwise>
851
880
  </xsl:choose>
852
881
  </xsl:variable>
@@ -862,7 +891,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
862
891
  <xsl:text>no</xsl:text>
863
892
  </xsl:when>
864
893
  <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>
894
+ <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
895
  <xsl:text>yes</xsl:text>
867
896
  </xsl:otherwise>
868
897
  </xsl:choose>
@@ -882,7 +911,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
882
911
  <xsl:value-of select="$exercise.reading.answer" />
883
912
  </xsl:when>
884
913
  <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>
914
+ <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
915
  </xsl:otherwise>
887
916
  </xsl:choose>
888
917
  </xsl:variable>
@@ -898,7 +927,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
898
927
  <xsl:text>no</xsl:text>
899
928
  </xsl:when>
900
929
  <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>
930
+ <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
931
  <xsl:text>yes</xsl:text>
903
932
  </xsl:otherwise>
904
933
  </xsl:choose>
@@ -918,7 +947,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
918
947
  <xsl:value-of select="$exercise.reading.solution" />
919
948
  </xsl:when>
920
949
  <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>
950
+ <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
951
  </xsl:otherwise>
923
952
  </xsl:choose>
924
953
  </xsl:variable>
@@ -934,7 +963,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
934
963
  <xsl:text>no</xsl:text>
935
964
  </xsl:when>
936
965
  <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>
966
+ <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
967
  <xsl:text>yes</xsl:text>
939
968
  </xsl:otherwise>
940
969
  </xsl:choose>
@@ -949,7 +978,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
949
978
  <xsl:value-of select="$project.statement" />
950
979
  </xsl:when>
951
980
  <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>
981
+ <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
982
  </xsl:otherwise>
954
983
  </xsl:choose>
955
984
  </xsl:variable>
@@ -965,7 +994,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
965
994
  <xsl:text>no</xsl:text>
966
995
  </xsl:when>
967
996
  <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>
997
+ <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
998
  <xsl:text>yes</xsl:text>
970
999
  </xsl:otherwise>
971
1000
  </xsl:choose>
@@ -985,7 +1014,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
985
1014
  <xsl:value-of select="$project.hint" />
986
1015
  </xsl:when>
987
1016
  <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>
1017
+ <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
1018
  </xsl:otherwise>
990
1019
  </xsl:choose>
991
1020
  </xsl:variable>
@@ -1001,7 +1030,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1001
1030
  <xsl:text>no</xsl:text>
1002
1031
  </xsl:when>
1003
1032
  <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>
1033
+ <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
1034
  <xsl:text>yes</xsl:text>
1006
1035
  </xsl:otherwise>
1007
1036
  </xsl:choose>
@@ -1021,7 +1050,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1021
1050
  <xsl:value-of select="$project.answer" />
1022
1051
  </xsl:when>
1023
1052
  <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>
1053
+ <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
1054
  </xsl:otherwise>
1026
1055
  </xsl:choose>
1027
1056
  </xsl:variable>
@@ -1037,7 +1066,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1037
1066
  <xsl:text>no</xsl:text>
1038
1067
  </xsl:when>
1039
1068
  <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>
1069
+ <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
1070
  <xsl:text>yes</xsl:text>
1042
1071
  </xsl:otherwise>
1043
1072
  </xsl:choose>
@@ -1057,7 +1086,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1057
1086
  <xsl:value-of select="$project.solution" />
1058
1087
  </xsl:when>
1059
1088
  <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>
1089
+ <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
1090
  </xsl:otherwise>
1062
1091
  </xsl:choose>
1063
1092
  </xsl:variable>
@@ -1132,7 +1161,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1132
1161
  <xsl:choose>
1133
1162
  <!-- leading path separator is an error -->
1134
1163
  <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>
1164
+ <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
1165
  <xsl:text/>
1137
1166
  </xsl:when>
1138
1167
  <!-- trailing path separator is good and -->
@@ -1157,7 +1186,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1157
1186
  <xsl:when test="$b-managed-directories">
1158
1187
  <xsl:choose>
1159
1188
  <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>
1189
+ <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
1190
  <xsl:text/>
1162
1191
  </xsl:when>
1163
1192
  <!-- trailing path separator is good -->
@@ -1201,7 +1230,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1201
1230
  <xsl:text>no</xsl:text>
1202
1231
  </xsl:when>
1203
1232
  <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>
1233
+ <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
1234
  <xsl:text>no</xsl:text>
1206
1235
  </xsl:otherwise>
1207
1236
  </xsl:choose>
@@ -1255,7 +1284,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1255
1284
  </xsl:variable>
1256
1285
  <xsl:choose>
1257
1286
  <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>
1287
+ <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
1288
  <xsl:text/>
1260
1289
  </xsl:when>
1261
1290
  <!-- trailing path separator is good -->
@@ -1367,7 +1396,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1367
1396
  <!-- WeBWorK problem representations are formed by Python routines -->
1368
1397
  <!-- in the pretext.py module that communicates with a WeBWorK -->
1369
1398
  <!-- server. One file per exercise is written into this directory, -->
1370
- <!-- named by the exercise's @assembly-id. This variable is only -->
1399
+ <!-- named by the exercise's @pi:assembly-id. This variable is only-->
1371
1400
  <!-- relevant for consumption of WW representations into output. -->
1372
1401
  <!-- Keep this variable silent since it may not be necessary. -->
1373
1402
  <xsl:variable name="webwork-representations-dir">
@@ -1384,8 +1413,8 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1384
1413
  </xsl:when>
1385
1414
  <xsl:when test="$publication/source/@webwork-problems">
1386
1415
  <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>
1416
+ <xsl:message>PTX:DEPRECATE: the publication file entry source/@webwork-problems is</xsl:message>
1417
+ <xsl:message> deprecated, please move to using managed directories</xsl:message>
1389
1418
  </xsl:when>
1390
1419
  <!-- no specification, so empty string for filename -->
1391
1420
  <!-- this will be noted where it is employed -->
@@ -1481,13 +1510,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1481
1510
  <!-- the default, and also an error-check upper-limit -->
1482
1511
  <xsl:variable name="max-feasible">
1483
1512
  <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>
1513
+ <xsl:when test="$version-has-parts">5</xsl:when>
1514
+ <xsl:when test="$version-doc-type = 'book'">4</xsl:when>
1515
+ <xsl:when test="$version-article-sections or $version-article-printouts">3</xsl:when>
1516
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
1517
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
1518
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
1519
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
1491
1520
  <xsl:otherwise>
1492
1521
  <xsl:message>PTX:BUG: a document type needs a maximum division level defined</xsl:message>
1493
1522
  </xsl:otherwise>
@@ -1501,7 +1530,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1501
1530
  <xsl:choose>
1502
1531
  <!-- NaN does not equal *anything*, so tests if a number -->
1503
1532
  <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>
1533
+ <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
1534
  <xsl:value-of select="$max-feasible"/>
1506
1535
  </xsl:when>
1507
1536
  <xsl:otherwise>
@@ -1522,7 +1551,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1522
1551
  <!-- check $candidate against upper bound, $max-feasible -->
1523
1552
  <xsl:choose>
1524
1553
  <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>
1554
+ <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
1555
  <xsl:value-of select="$max-feasible"/>
1527
1556
  </xsl:when>
1528
1557
  <xsl:otherwise>
@@ -1537,405 +1566,153 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1537
1566
  <!-- parameterized by (a) publisher file entry, (b) old -->
1538
1567
  <!-- deprecated stringparam (or docinfo coming soon), -->
1539
1568
  <!-- (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">
1569
+ <!-- The numbered-object families (blocks, projects, equations, -->
1570
+ <!-- footnotes, figures, inline exercises, open problems) share -->
1571
+ <!-- one default numbering level: set by the document type, and -->
1572
+ <!-- never more than the division depth the publisher elected -->
1573
+ <!-- ($numbering-maxlevel), so an unconfigured document always -->
1574
+ <!-- has a conforming value. -->
1575
+ <xsl:variable name="default-numbering-level">
1576
+ <xsl:variable name="document-type-level">
1546
1577
  <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>
1578
+ <xsl:when test="$version-has-parts">3</xsl:when>
1579
+ <xsl:when test="$version-doc-type = 'book'">2</xsl:when>
1580
+ <xsl:when test="$version-article-sections or $version-article-printouts">1</xsl:when>
1581
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
1582
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
1583
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
1584
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
1554
1585
  <xsl:otherwise>
1555
- <xsl:message>PTX:BUG: a document type needs a default block numbering level defined</xsl:message>
1586
+ <xsl:message>PTX:BUG: a document type needs a default numbering level defined</xsl:message>
1556
1587
  </xsl:otherwise>
1557
1588
  </xsl:choose>
1558
1589
  </xsl:variable>
1559
- <xsl:variable name="candidate-blocks">
1560
- <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 -->
1580
- <xsl:otherwise>
1581
- <xsl:value-of select="$default-blocks"/>
1582
- </xsl:otherwise>
1583
- </xsl:choose>
1584
- </xsl:variable>
1585
- <!-- check $candidate-blocks against upper bound, $numbering-maxlevel -->
1586
1590
  <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"/>
1591
+ <xsl:when test="$document-type-level > $numbering-maxlevel">
1592
+ <xsl:value-of select="$numbering-maxlevel"/>
1590
1593
  </xsl:when>
1591
1594
  <xsl:otherwise>
1592
- <xsl:value-of select="$candidate-blocks"/>
1595
+ <xsl:value-of select="$document-type-level"/>
1593
1596
  </xsl:otherwise>
1594
1597
  </xsl:choose>
1595
1598
  </xsl:variable>
1596
- <xsl:variable name="numbering-blocks" select="number($numbering-blocks-entered)"/>
1597
1599
 
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">
1600
+ <!-- Resolve one family's numbering level: the publisher file's -->
1601
+ <!-- entry, else a legacy analog (a string parameter, or in some -->
1602
+ <!-- cases a "docinfo" attribute), else the shared default. An -->
1603
+ <!-- authored value must be numeric, non-negative, and no more -->
1604
+ <!-- than $numbering-maxlevel; the default conforms by -->
1605
+ <!-- construction, so only an authored value can provoke a -->
1606
+ <!-- message. -->
1607
+ <xsl:template name="numbering-level">
1608
+ <xsl:param name="family"/>
1609
+ <xsl:param name="entered"/>
1610
+ <xsl:param name="legacy" select="''"/>
1611
+ <xsl:variable name="candidate">
1619
1612
  <xsl:choose>
1620
1613
  <!-- 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"/>
1614
+ <xsl:when test="$entered">
1623
1615
  <xsl:choose>
1624
1616
  <!-- 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"/>
1617
+ <xsl:when test="not(number($entered) = number($entered)) or ($entered &lt; 0)">
1618
+ <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>
1619
+ <xsl:value-of select="$default-numbering-level"/>
1628
1620
  </xsl:when>
1629
1621
  <xsl:otherwise>
1630
- <xsl:value-of select="$publication/numbering/projects/@level"/>
1622
+ <xsl:value-of select="$entered"/>
1631
1623
  </xsl:otherwise>
1632
1624
  </xsl:choose>
1633
1625
  </xsl:when>
1634
- <!-- respect deprecated analog -->
1635
- <xsl:when test="$numbering.projects.level != ''">
1636
- <xsl:value-of select="$numbering.projects.level" />
1626
+ <!-- respect a legacy analog -->
1627
+ <xsl:when test="$legacy != ''">
1628
+ <xsl:value-of select="$legacy"/>
1637
1629
  </xsl:when>
1638
- <!-- use a default -->
1630
+ <!-- use the conforming default, no message possible -->
1639
1631
  <xsl:otherwise>
1640
- <xsl:value-of select="$default-projects"/>
1632
+ <xsl:value-of select="$default-numbering-level"/>
1641
1633
  </xsl:otherwise>
1642
1634
  </xsl:choose>
1643
1635
  </xsl:variable>
1644
- <!-- check $candidate-projects against upper bound, $numbering-maxlevel -->
1636
+ <!-- an authored candidate may exceed the upper bound, $numbering-maxlevel -->
1645
1637
  <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"/>
1638
+ <xsl:when test="$candidate > $numbering-maxlevel">
1639
+ <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>
1640
+ <xsl:value-of select="$default-numbering-level"/>
1649
1641
  </xsl:when>
1650
1642
  <xsl:otherwise>
1651
- <xsl:value-of select="$candidate-projects"/>
1643
+ <xsl:value-of select="$candidate"/>
1652
1644
  </xsl:otherwise>
1653
1645
  </xsl:choose>
1646
+ </xsl:template>
1647
+
1648
+ <xsl:variable name="numbering-blocks-entered">
1649
+ <xsl:call-template name="numbering-level">
1650
+ <xsl:with-param name="family" select="'blocks'"/>
1651
+ <xsl:with-param name="entered" select="$publication/numbering/blocks/@level"/>
1652
+ <xsl:with-param name="legacy" select="$numbering.theorems.level"/>
1653
+ </xsl:call-template>
1654
+ </xsl:variable>
1655
+ <xsl:variable name="numbering-blocks" select="number($numbering-blocks-entered)"/>
1656
+
1657
+ <xsl:variable name="numbering-projects-entered">
1658
+ <xsl:call-template name="numbering-level">
1659
+ <xsl:with-param name="family" select="'projects'"/>
1660
+ <xsl:with-param name="entered" select="$publication/numbering/projects/@level"/>
1661
+ <xsl:with-param name="legacy" select="$numbering.projects.level"/>
1662
+ </xsl:call-template>
1654
1663
  </xsl:variable>
1655
1664
  <xsl:variable name="numbering-projects" select="number($numbering-projects-entered)"/>
1656
1665
 
1657
- <!-- User-supplied Numbering for Equations -->
1658
- <!-- Respect switch, or provide sensible defaults -->
1659
1666
  <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>
1667
+ <xsl:call-template name="numbering-level">
1668
+ <xsl:with-param name="family" select="'equations'"/>
1669
+ <xsl:with-param name="entered" select="$publication/numbering/equations/@level"/>
1670
+ <xsl:with-param name="legacy" select="$numbering.equations.level"/>
1671
+ </xsl:call-template>
1710
1672
  </xsl:variable>
1711
1673
  <xsl:variable name="numbering-equations" select="number($numbering-equations-entered)"/>
1712
1674
 
1713
- <!-- User-supplied Numbering for Footnotes -->
1714
- <!-- Respect switch, or provide sensible defaults -->
1715
1675
  <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>
1676
+ <xsl:call-template name="numbering-level">
1677
+ <xsl:with-param name="family" select="'footnotes'"/>
1678
+ <xsl:with-param name="entered" select="$publication/numbering/footnotes/@level"/>
1679
+ <xsl:with-param name="legacy" select="$numbering.footnotes.level"/>
1680
+ </xsl:call-template>
1766
1681
  </xsl:variable>
1767
1682
  <xsl:variable name="numbering-footnotes" select="number($numbering-footnotes-entered)"/>
1768
1683
 
1769
- <!-- User-supplied Numbering for Figure-Like -->
1770
- <!-- Respect switch, or provide sensible defaults -->
1771
1684
  <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>
1685
+ <xsl:call-template name="numbering-level">
1686
+ <xsl:with-param name="family" select="'figures'"/>
1687
+ <xsl:with-param name="entered" select="$publication/numbering/figures/@level"/>
1688
+ </xsl:call-template>
1822
1689
  </xsl:variable>
1823
1690
  <xsl:variable name="numbering-figures" select="number($numbering-figures-entered)"/>
1824
1691
 
1825
- <!-- User-supplied Numbering for Inline Exercises -->
1826
- <!-- Respect switch, or provide sensible defaults -->
1827
1692
  <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>
1693
+ <xsl:call-template name="numbering-level">
1694
+ <xsl:with-param name="family" select="'inline exercises'"/>
1695
+ <xsl:with-param name="entered" select="$publication/numbering/exercises/@level"/>
1696
+ </xsl:call-template>
1878
1697
  </xsl:variable>
1879
1698
  <xsl:variable name="numbering-exercises" select="number($numbering-exercises-entered)"/>
1880
1699
 
1881
- <!-- User-supplied Numbering for Open Problems -->
1882
- <!-- Respect switch, or provide sensible defaults -->
1883
1700
  <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>
1701
+ <xsl:call-template name="numbering-level">
1702
+ <xsl:with-param name="family" select="'open problems'"/>
1703
+ <xsl:with-param name="entered" select="$publication/numbering/openproblems/@level"/>
1704
+ </xsl:call-template>
1930
1705
  </xsl:variable>
1931
1706
  <xsl:variable name="numbering-openproblems" select="number($numbering-openproblems-entered)"/>
1932
1707
 
1933
- <!-- A block group may run on its own counter. When its publisher -->
1934
- <!-- switch is absent, the deprecated source is honored, then the -->
1935
- <!-- default. Warnings live with the other deprecations. -->
1936
- <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
- <xsl:variable name="b-number-project-distinct" select="($publication/numbering/projects/@distinct = 'yes') or (not($publication/numbering/projects/@distinct) and ($debug.project.number = ''))"/>
1938
- <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))"/>
1708
+ <!-- A block group may run on its own counter, elected by the -->
1709
+ <!-- publisher switch. The deprecated "docinfo" analogs for -->
1710
+ <!-- figures and inline exercises, and the deprecated -->
1711
+ <!-- debug.project.number parameter, are ignored; warnings live -->
1712
+ <!-- with the other deprecations. -->
1713
+ <xsl:variable name="b-number-figure-distinct" select="$publication/numbering/figures/@distinct = 'yes'"/>
1714
+ <xsl:variable name="b-number-project-distinct" select="$publication/numbering/projects/@distinct = 'yes'"/>
1715
+ <xsl:variable name="b-number-exercise-distinct" select="$publication/numbering/exercises/@distinct = 'yes'"/>
1939
1716
  <xsl:variable name="b-number-openproblem-distinct" select="$publication/numbering/openproblems/@distinct = 'yes'"/>
1940
1717
 
1941
1718
  <xsl:variable name="chapter-start-entered">
@@ -1945,7 +1722,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1945
1722
  <xsl:choose>
1946
1723
  <!-- NaN does not equal *anything*, so tests if a number -->
1947
1724
  <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>
1725
+ <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
1726
  <xsl:value-of select="1"/>
1950
1727
  </xsl:when>
1951
1728
  <xsl:otherwise>
@@ -1969,13 +1746,10 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1969
1746
  <xsl:choose>
1970
1747
  <!-- no parts, just record as absent, -->
1971
1748
  <!-- but warn of ill-advised attempts -->
1972
- <xsl:when test="not($version-root/book/part)">
1749
+ <xsl:when test="not($version-has-parts)">
1973
1750
  <xsl:choose>
1974
1751
  <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>
1976
- </xsl:when>
1977
- <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>
1752
+ <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>
1979
1753
  </xsl:when>
1980
1754
  </xsl:choose>
1981
1755
  <!-- flag this situation -->
@@ -1992,27 +1766,14 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
1992
1766
  <xsl:text>decorative</xsl:text>
1993
1767
  </xsl:when>
1994
1768
  <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>
1769
+ <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
1770
  <xsl:text>decorative</xsl:text>
1997
1771
  </xsl:otherwise>
1998
1772
  </xsl:choose>
1999
1773
  </xsl:when>
2000
- <!-- Preserve much of old behavior, warning is elsewhere -->
2001
- <xsl:when test="$version-docinfo/numbering/division/@part">
2002
- <xsl:choose>
2003
- <xsl:when test="$version-docinfo/numbering/division/@part = 'structural'">
2004
- <xsl:text>structural</xsl:text>
2005
- </xsl:when>
2006
- <xsl:when test="$version-docinfo/numbering/division/@part = 'decorative'">
2007
- <xsl:text>decorative</xsl:text>
2008
- </xsl:when>
2009
- <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>
2011
- <xsl:text>decorative</xsl:text>
2012
- </xsl:otherwise>
2013
- </xsl:choose>
2014
- </xsl:when>
2015
- <!-- no specification, use default -->
1774
+ <!-- no specification, use default; the deprecated -->
1775
+ <!-- docinfo/numbering/division/@part is ignored (warnings -->
1776
+ <!-- live with the other deprecations) -->
2016
1777
  <xsl:otherwise>
2017
1778
  <xsl:text>decorative</xsl:text>
2018
1779
  </xsl:otherwise>
@@ -2045,6 +1806,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2045
1806
  </xsl:variable>
2046
1807
  <xsl:variable name="b-has-calculator" select="not($html-calculator = 'none')" />
2047
1808
 
1809
+ <!-- Third-party annotation of the HTML output. Default is "none". -->
1810
+ <!-- Only "hypothesis" (Hypothes.is) is supported at present. -->
1811
+ <xsl:variable name="html-annotation">
1812
+ <xsl:apply-templates select="$publisher-attribute-options/html/annotation/pi:pub-attribute[@name='platform']" mode="set-pubfile-variable"/>
1813
+ </xsl:variable>
1814
+ <xsl:variable name="b-activate-hypothesis" select="$html-annotation = 'hypothesis'" />
1815
+
2048
1816
  <!-- Scratch ActiveCode Window -->
2049
1817
  <!-- Pop-up a window for testing program code. So "calculator-like" but we -->
2050
1818
  <!-- reserve the word "calculator" for the hand-held type (even if more modern). -->
@@ -2095,14 +1863,14 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2095
1863
  </xsl:when>
2096
1864
  <!-- sounds good, but no, not the right build -->
2097
1865
  <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>
1866
+ <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
1867
  <xsl:value-of select="$activecode-default"/>
2100
1868
  </xsl:otherwise>
2101
1869
  </xsl:choose>
2102
1870
  </xsl:when>
2103
1871
  <!-- an attempt was made, but failed to be any sort of language -->
2104
1872
  <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>
1873
+ <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
1874
  <xsl:value-of select="$activecode-default"/>
2107
1875
  </xsl:when>
2108
1876
  <!-- no attempt to specify build-dependent default value -->
@@ -2144,7 +1912,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2144
1912
  </xsl:when>
2145
1913
  <!-- bad choice, set to empty string -->
2146
1914
  <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>
1915
+ <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
1916
  <xsl:text/>
2149
1917
  </xsl:when>
2150
1918
  <xsl:otherwise>
@@ -2216,7 +1984,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2216
1984
  </xsl:when>
2217
1985
  <!-- attempted to set, but wrong -->
2218
1986
  <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>
1987
+ <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
1988
  <xsl:value-of select="$ww-default"/>
2221
1989
  </xsl:when>
2222
1990
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2247,7 +2015,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2247
2015
  </xsl:when>
2248
2016
  <!-- attempted to set, but wrong -->
2249
2017
  <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>
2018
+ <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
2019
  <xsl:value-of select="$ww-default"/>
2252
2020
  </xsl:when>
2253
2021
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2278,7 +2046,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2278
2046
  </xsl:when>
2279
2047
  <!-- attempted to set, but wrong -->
2280
2048
  <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>
2049
+ <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
2050
  <xsl:value-of select="$ww-default"/>
2283
2051
  </xsl:when>
2284
2052
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2309,7 +2077,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2309
2077
  </xsl:when>
2310
2078
  <!-- attempted to set, but wrong -->
2311
2079
  <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>
2080
+ <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
2081
  <xsl:value-of select="$ww-default"/>
2314
2082
  </xsl:when>
2315
2083
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2340,7 +2108,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2340
2108
  </xsl:when>
2341
2109
  <!-- attempted to set, but wrong -->
2342
2110
  <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>
2111
+ <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
2112
  <xsl:value-of select="$ww-default"/>
2345
2113
  </xsl:when>
2346
2114
  <!-- backwards compatibility: 'yes' indicated static, -->
@@ -2543,7 +2311,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2543
2311
  <xsl:apply-templates select="$publisher-attribute-options/html/tableofcontents/pi:pub-attribute[@name='preexpanded-levels']" mode="set-pubfile-variable"/>
2544
2312
  </xsl:variable>
2545
2313
  <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>
2314
+ <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
2315
  </xsl:if>
2548
2316
  <xsl:value-of select="$preexpanded-value"/>
2549
2317
  </xsl:variable>
@@ -2583,7 +2351,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2583
2351
  <xsl:param name="debug.html.theme-name" select="''" />
2584
2352
 
2585
2353
  <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>
2354
+ <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
2355
  <xsl:choose>
2588
2356
  <xsl:when test="$debug.html.theme-name != ''">
2589
2357
  <xsl:value-of select="$debug.html.theme-name"/>
@@ -2882,7 +2650,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2882
2650
  </xsl:when>
2883
2651
  <!-- set, but not correct, so inform and use default -->
2884
2652
  <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>
2653
+ <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
2654
  <xsl:value-of select="$default-native-search"/>
2887
2655
  </xsl:when>
2888
2656
  <!-- unset, so use default -->
@@ -2958,15 +2726,15 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
2958
2726
  <xsl:when test="$chunk-level-entered != ''">
2959
2727
  <xsl:value-of select="$chunk-level-entered" />
2960
2728
  </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>
2729
+ <xsl:when test="$version-has-parts">3</xsl:when>
2730
+ <xsl:when test="$version-doc-type = 'book'">2</xsl:when>
2731
+ <xsl:when test="$version-article-sections or $version-article-printouts">1</xsl:when>
2732
+ <xsl:when test="$version-doc-type = 'article'">0</xsl:when>
2733
+ <xsl:when test="$version-doc-type = 'slideshow'">0</xsl:when>
2734
+ <xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
2735
+ <xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
2968
2736
  <xsl:otherwise>
2969
- <xsl:message>PTX:ERROR: HTML chunk level not determined</xsl:message>
2737
+ <xsl:message>PTX:BUG: HTML chunk level not determined</xsl:message>
2970
2738
  </xsl:otherwise>
2971
2739
  </xsl:choose>
2972
2740
  </xsl:variable>
@@ -3041,6 +2809,77 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3041
2809
  </xsl:choose>
3042
2810
  </xsl:variable>
3043
2811
 
2812
+ <!-- The kernel a Jupyter notebook opens with; "sagemath" -->
2813
+ <!-- names the latest kernel of the Sage distribution's -->
2814
+ <!-- Jupyter, and of CoCalc -->
2815
+ <xsl:variable name="jupyter-kernel">
2816
+ <xsl:choose>
2817
+ <!-- The stringparam (deprecated 2026-07-10) once accepted many -->
2818
+ <!-- spellings of the Python kernel's name; each normalizes to -->
2819
+ <!-- "python3", with a warning. The canonical values continue -->
2820
+ <!-- through the generic machinery, which has its own warning. -->
2821
+ <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, '|'))">
2822
+ <xsl:text>python3</xsl:text>
2823
+ <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>
2824
+ </xsl:when>
2825
+ <xsl:otherwise>
2826
+ <xsl:apply-templates select="$publisher-attribute-options/jupyter/pi:pub-attribute[@name='kernel']" mode="set-pubfile-variable"/>
2827
+ </xsl:otherwise>
2828
+ </xsl:choose>
2829
+ </xsl:variable>
2830
+
2831
+
2832
+ <!-- ##################### -->
2833
+ <!-- Text-Specific Options -->
2834
+ <!-- ##################### -->
2835
+
2836
+ <!-- The character repertoire of the plain text and markdown -->
2837
+ <!-- conversions: genuine Unicode characters (dashes, quotation -->
2838
+ <!-- marks, ...) or 7-bit ASCII stand-ins. -->
2839
+ <xsl:variable name="text-characters">
2840
+ <xsl:apply-templates select="$publisher-attribute-options/text/pi:pub-attribute[@name='characters']" mode="set-pubfile-variable"/>
2841
+ </xsl:variable>
2842
+ <xsl:variable name="b-text-unicode" select="$text-characters = 'unicode'"/>
2843
+
2844
+
2845
+ <!-- ######################## -->
2846
+ <!-- Braille-Specific Options -->
2847
+ <!-- ######################## -->
2848
+
2849
+ <!-- Page geometry of embossed output: cells in a line, lines on a -->
2850
+ <!-- page. Freeform entries, validated here to positive integers, -->
2851
+ <!-- with the common North American embosser page as the default. -->
2852
+
2853
+ <xsl:variable name="braille-page-width-entered">
2854
+ <xsl:apply-templates select="$publisher-attribute-options/braille/page/pi:pub-attribute[@name='width']" mode="set-pubfile-variable"/>
2855
+ </xsl:variable>
2856
+ <xsl:variable name="braille-page-width">
2857
+ <xsl:choose>
2858
+ <xsl:when test="(number($braille-page-width-entered) = round(number($braille-page-width-entered))) and (number($braille-page-width-entered) &gt; 0)">
2859
+ <xsl:value-of select="round(number($braille-page-width-entered))"/>
2860
+ </xsl:when>
2861
+ <xsl:otherwise>
2862
+ <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>
2863
+ <xsl:text>40</xsl:text>
2864
+ </xsl:otherwise>
2865
+ </xsl:choose>
2866
+ </xsl:variable>
2867
+
2868
+ <xsl:variable name="braille-page-height-entered">
2869
+ <xsl:apply-templates select="$publisher-attribute-options/braille/page/pi:pub-attribute[@name='height']" mode="set-pubfile-variable"/>
2870
+ </xsl:variable>
2871
+ <xsl:variable name="braille-page-height">
2872
+ <xsl:choose>
2873
+ <xsl:when test="(number($braille-page-height-entered) = round(number($braille-page-height-entered))) and (number($braille-page-height-entered) &gt; 0)">
2874
+ <xsl:value-of select="round(number($braille-page-height-entered))"/>
2875
+ </xsl:when>
2876
+ <xsl:otherwise>
2877
+ <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>
2878
+ <xsl:text>25</xsl:text>
2879
+ </xsl:otherwise>
2880
+ </xsl:choose>
2881
+ </xsl:variable>
2882
+
3044
2883
 
3045
2884
  <!-- ###################### -->
3046
2885
  <!-- LaTeX-Specific Options -->
@@ -3120,7 +2959,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3120
2959
  </xsl:when>
3121
2960
  <!-- attempted to set, but wrong -->
3122
2961
  <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>
2962
+ <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
2963
  <xsl:value-of select="$default-align"/>
3125
2964
  </xsl:when>
3126
2965
  <!-- or respect deprecated stringparam in use, text.alignment -->
@@ -3190,7 +3029,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3190
3029
  <xsl:text>pt</xsl:text>
3191
3030
  </xsl:when>
3192
3031
  <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>
3032
+ <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
3033
  <xsl:text>10pt</xsl:text>
3195
3034
  </xsl:otherwise>
3196
3035
  </xsl:choose>
@@ -3209,7 +3048,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3209
3048
  <xsl:when test="$latex.font.size='20pt'"><xsl:value-of select="$latex.font.size" /></xsl:when>
3210
3049
  <xsl:otherwise>
3211
3050
  <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>
3051
+ <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
3052
  </xsl:otherwise>
3214
3053
  </xsl:choose>
3215
3054
  </xsl:when>
@@ -3233,7 +3072,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3233
3072
  </xsl:when>
3234
3073
  <!-- attempted to set, but not a recognized key -->
3235
3074
  <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>
3075
+ <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
3076
  <xsl:value-of select="$default-pdf-font"/>
3238
3077
  </xsl:when>
3239
3078
  <!-- no attempt at all, so default -->
@@ -3313,7 +3152,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3313
3152
  <xsl:choose>
3314
3153
  <!-- fail when no base URL is given -->
3315
3154
  <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>
3155
+ <xsl:message>PTX:WARNING: baseurl must be set in publisher file to enable links from Asymptote images</xsl:message>
3317
3156
  <xsl:text>no</xsl:text>
3318
3157
  </xsl:when>
3319
3158
  <xsl:otherwise>
@@ -3326,7 +3165,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3326
3165
  </xsl:when>
3327
3166
  <!-- set, but not correct, so inform and use default -->
3328
3167
  <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>
3168
+ <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
3169
  <xsl:text>no</xsl:text>
3331
3170
  </xsl:when>
3332
3171
  <!-- unset, use the default, which is "no" since -->
@@ -3348,7 +3187,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3348
3187
  <xsl:choose>
3349
3188
  <!-- fail when no base URL is given -->
3350
3189
  <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>
3190
+ <xsl:message>PTX:WARNING: baseurl must be set in publisher file to enable links from Asymptote images</xsl:message>
3352
3191
  <xsl:text>no</xsl:text>
3353
3192
  </xsl:when>
3354
3193
  <xsl:otherwise>
@@ -3361,7 +3200,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3361
3200
  </xsl:when>
3362
3201
  <!-- set, but not correct, so inform and use default -->
3363
3202
  <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>
3203
+ <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
3204
  <xsl:text>no</xsl:text>
3366
3205
  </xsl:when>
3367
3206
  <!-- unset, use the default, which is "no" since -->
@@ -3486,33 +3325,80 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3486
3325
  <xsl:apply-templates select="$publisher-attribute-options/revealjs/navigation/pi:pub-attribute[@name='mode']" mode="set-pubfile-variable"/>
3487
3326
  </xsl:variable>
3488
3327
 
3328
+ <!-- "online" (default) loads MathJax in the browser; "embedded" -->
3329
+ <!-- replaces each piece of mathematics with an SVG image, with a -->
3330
+ <!-- speech string, both manufactured at build time, so the -->
3331
+ <!-- slideshow performs no typesetting at all. The default flips -->
3332
+ <!-- to "embedded" when the resources are embedded (a custom -->
3333
+ <!-- default template below), since a network-detached slideshow -->
3334
+ <!-- cannot load MathJax. -->
3335
+ <xsl:variable name="reveal-math-source">
3336
+ <xsl:apply-templates select="$publisher-attribute-options/revealjs/resources/pi:pub-attribute[@name='math']" mode="set-pubfile-variable"/>
3337
+ </xsl:variable>
3338
+ <xsl:variable name="b-reveal-embedded-math" select="$reveal-math-source = 'embedded'"/>
3339
+
3340
+ <xsl:template match="revealjs/resources/pi:pub-attribute[@name='math']" mode="get-default-pub-variable">
3341
+ <xsl:choose>
3342
+ <xsl:when test="$publication/revealjs/resources/@host = 'embedded'">
3343
+ <xsl:text>embedded</xsl:text>
3344
+ </xsl:when>
3345
+ <xsl:otherwise>
3346
+ <xsl:text>online</xsl:text>
3347
+ </xsl:otherwise>
3348
+ </xsl:choose>
3349
+ </xsl:template>
3350
+
3489
3351
  <!-- Reveal.js Resources file location -->
3490
3352
 
3353
+ <!-- The *effective* host. Embedded resources require embedded -->
3354
+ <!-- mathematics: an authored "math" left unspecified defaults to -->
3355
+ <!-- "embedded" (above), but an explicit online election contradicts -->
3356
+ <!-- the request for a network-detached file, so the whole slideshow -->
3357
+ <!-- falls back to fully online, with an error. -->
3358
+ <xsl:variable name="reveal-resources-host">
3359
+ <xsl:choose>
3360
+ <xsl:when test="($publication/revealjs/resources/@host = 'embedded') and not($b-reveal-embedded-math)">
3361
+ <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>
3362
+ <xsl:text>cdn</xsl:text>
3363
+ </xsl:when>
3364
+ <xsl:when test="$publication/revealjs/resources/@host">
3365
+ <xsl:value-of select="$publication/revealjs/resources/@host"/>
3366
+ </xsl:when>
3367
+ <!-- default to the CDN if no specification -->
3368
+ <xsl:otherwise>
3369
+ <xsl:text>cdn</xsl:text>
3370
+ </xsl:otherwise>
3371
+ </xsl:choose>
3372
+ </xsl:variable>
3373
+ <xsl:variable name="b-reveal-embedded-resources" select="$reveal-resources-host = 'embedded'"/>
3374
+
3491
3375
  <!-- String to prefix reveal.js resources -->
3492
3376
  <xsl:variable name="reveal-root">
3493
3377
  <!-- CDN is used twice, so just edit here -->
3494
3378
  <!-- NB: deprecation is frozen -->
3379
+ <!-- The "@6" is a semantic-version range: jsdelivr serves the -->
3380
+ <!-- newest 6.x release, so fixes arrive automatically while a -->
3381
+ <!-- breaking 7.0 cannot. Same pattern as the MathJax "@4" URLs. -->
3495
3382
  <xsl:variable name="cdn-url">
3496
- <xsl:text>https://cdnjs.cloudflare.com/ajax/libs/reveal.js/4.1.2</xsl:text>
3383
+ <xsl:text>https://cdn.jsdelivr.net/npm/reveal.js@6/dist</xsl:text>
3497
3384
  </xsl:variable>
3498
3385
 
3499
3386
  <xsl:choose>
3500
3387
  <!-- if publisher.xml file has CDN option specified, use it -->
3501
3388
  <!-- keep this URL updated, but not for the deprecation situation -->
3502
- <xsl:when test="$publication/revealjs/resources/@host = 'cdn'">
3389
+ <!-- Embedded resources emit the same CDN references: the -->
3390
+ <!-- pretext/pretext script replaces them with the file contents, -->
3391
+ <!-- and any other processing degrades gracefully to the CDN. -->
3392
+ <xsl:when test="($reveal-resources-host = 'cdn') or ($reveal-resources-host = 'embedded')">
3503
3393
  <xsl:value-of select="$cdn-url"/>
3504
3394
  </xsl:when>
3505
3395
  <!-- if publisher.xml file has the local option specified, use it -->
3506
- <xsl:when test="$publication/revealjs/resources/@host = 'local'">
3396
+ <xsl:when test="$reveal-resources-host = 'local'">
3507
3397
  <xsl:text>.</xsl:text>
3508
3398
  </xsl:when>
3509
3399
  <!-- 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
3400
  <xsl:otherwise>
3515
- <xsl:value-of select="$cdn-url"/>
3401
+ <xsl:value-of select="$reveal-resources-host"/>
3516
3402
  </xsl:otherwise>
3517
3403
  </xsl:choose>
3518
3404
  </xsl:variable>
@@ -3600,6 +3486,9 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3600
3486
  <calculator>
3601
3487
  <pi:pub-attribute name="model" default="none" options="geogebra-classic geogebra-graphing geogebra-geometry geogebra-3d" legacy-stringparam="html.calculator"/>
3602
3488
  </calculator>
3489
+ <annotation>
3490
+ <pi:pub-attribute name="platform" default="none" options="hypothesis" legacy-stringparam="html.annotation"/>
3491
+ </annotation>
3603
3492
  <css>
3604
3493
  <pi:pub-attribute name="palette" freeform="yes"/>
3605
3494
  </css>
@@ -3690,6 +3579,9 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3690
3579
  <pi:pub-attribute name="front" freeform="yes"/>
3691
3580
  </cover>
3692
3581
  </epub>
3582
+ <jupyter>
3583
+ <pi:pub-attribute name="kernel" default="sagemath" options="python3" legacy-stringparam="jupyter.kernel"/>
3584
+ </jupyter>
3693
3585
  <latex>
3694
3586
  <pi:pub-attribute name="sides" options="one two" legacy-stringparam="latex.sides"/>
3695
3587
  <pi:pub-attribute name="print" default="no" options="yes" legacy-stringparam="latex.print"/>
@@ -3728,6 +3620,15 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3728
3620
  <stack>
3729
3621
  <pi:pub-attribute name="server" default="https://stack-api.maths.ed.ac.uk" freeform="yes"/>
3730
3622
  </stack>
3623
+ <braille>
3624
+ <page>
3625
+ <pi:pub-attribute name="width" default="40" freeform="yes"/>
3626
+ <pi:pub-attribute name="height" default="25" freeform="yes"/>
3627
+ </page>
3628
+ </braille>
3629
+ <text>
3630
+ <pi:pub-attribute name="characters" default="unicode" options="ascii"/>
3631
+ </text>
3731
3632
  <revealjs>
3732
3633
  <appearance>
3733
3634
  <pi:pub-attribute name="theme" default="simple" freeform="yes"/>
@@ -3742,6 +3643,12 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3742
3643
  <navigation>
3743
3644
  <pi:pub-attribute name="mode" default="default" options="linear grid"/>
3744
3645
  </navigation>
3646
+ <!-- "@host" is also authored on "resources", but its values -->
3647
+ <!-- are not an enumeration (an arbitrary path is legal), so -->
3648
+ <!-- it is consulted directly by the "reveal-root" variable -->
3649
+ <resources>
3650
+ <pi:pub-attribute name="math" default="online" options="embedded"/>
3651
+ </resources>
3745
3652
  </revealjs>
3746
3653
  </pi:publisher>
3747
3654
 
@@ -3777,14 +3684,14 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3777
3684
  <!-- it is among the legal options, use it and issue warning -->
3778
3685
  <xsl:when test="not($pubfile-attribute) and @legacy-stringparam and (@freeform = 'yes' or dyn:evaluate(concat('$', @legacy-stringparam)) = $all-options)">
3779
3686
  <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>
3687
+ <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
3688
  </xsl:when>
3782
3689
  <!-- if nothing is declared in the publisher file, not even as null -->
3783
3690
  <!-- and if there is an old stringparam that we still honor, and if -->
3784
3691
  <!-- it is among the legacy options, use default and issue warning -->
3785
3692
  <xsl:when test="not($pubfile-attribute) and @legacy-stringparam and dyn:evaluate(concat('$', @legacy-stringparam)) = $legacy-options">
3786
3693
  <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>
3694
+ <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
3695
  </xsl:when>
3789
3696
  <!-- if nothing is declared in the publisher file, not even as null -->
3790
3697
  <!-- and if there is an old stringparam that we still honor, but its -->
@@ -3792,7 +3699,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3792
3699
  <!-- then use default and issue warning -->
3793
3700
  <xsl:when test="not($pubfile-attribute) and @legacy-stringparam and dyn:evaluate(concat('$', @legacy-stringparam)) != ''">
3794
3701
  <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>
3702
+ <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
3703
  </xsl:when>
3797
3704
  <!-- if nothing is declared in the publisher file or it is declared -->
3798
3705
  <!-- as null, use the default, which might be null -->
@@ -3812,13 +3719,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3812
3719
  <!-- if it's among the legacy options, use default and issue warning -->
3813
3720
  <xsl:when test="$pubfile-attribute = $legacy-options">
3814
3721
  <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>
3722
+ <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
3723
  </xsl:when>
3817
3724
  <!-- pubfile has some string that is not among legal options, and -->
3818
3725
  <!-- freeform is disallowed, so give a warning and use default -->
3819
3726
  <xsl:otherwise>
3820
3727
  <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>
3728
+ <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
3729
  </xsl:otherwise>
3823
3730
  </xsl:choose>
3824
3731
  </xsl:template>
@@ -3979,6 +3886,8 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
3979
3886
  <xsl:param name="chunk.level" select="''" />
3980
3887
  <!-- 2021-01-03 toc.level to publisher file -->
3981
3888
  <xsl:param name="toc.level" select="''" />
3889
+ <!-- 2026-07-10 jupyter.kernel to publisher file -->
3890
+ <xsl:param name="jupyter.kernel" select="''" />
3982
3891
 
3983
3892
  <!-- Deprecated 2021-01-23, but still respected -->
3984
3893
  <xsl:param name="html.knowl.theorem" select="''" />
@@ -4090,9 +3999,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4090
3999
  <!-- parameter is deprecated and ineffective, deprecated 2024-02-16. -->
4091
4000
  <xsl:param name="commentary" select="''" />
4092
4001
 
4093
- <!-- Deprecated 2026-06-07, but still respected -->
4002
+ <!-- Deprecated 2026-06-07, and now ignored -->
4094
4003
  <xsl:param name="debug.project.number" select="''" />
4095
4004
 
4005
+ <!-- DEPRECATED: 2026-07-25 In favor of -->
4006
+ <!-- html/annotation/@platform in publisher file -->
4007
+ <xsl:param name="html.annotation" select="''" />
4008
+
4096
4009
  <!-- ###################################### -->
4097
4010
  <!-- Parameter Deprecation Warning Messages -->
4098
4011
  <!-- ###################################### -->
@@ -4747,10 +4660,17 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
4747
4660
  <!-- -->
4748
4661
  <xsl:call-template name="parameter-deprecation-message">
4749
4662
  <xsl:with-param name="date-string" select="'2026-06-07'" />
4750
- <xsl:with-param name="message" select="'the debug.project.number parameter has been replaced by the numbering/projects/@distinct entry in the publisher file. We will attempt to honor your intent. But please switch to using the Publishers File for configuration, as documented in the PreTeXt Guide.'" />
4663
+ <xsl:with-param name="message" select="'the debug.project.number parameter has been replaced by the numbering/projects/@distinct entry in the publisher file. It will be ignored. Please switch to using the Publishers File for configuration, as documented in the PreTeXt Guide.'" />
4751
4664
  <xsl:with-param name="incorrect-use" select="($debug.project.number != '')" />
4752
4665
  </xsl:call-template>
4753
4666
  <!-- -->
4667
+ <!-- 2026-07-25 HTML annotation platform controlled by publisher file -->
4668
+ <xsl:call-template name="parameter-deprecation-message">
4669
+ <xsl:with-param name="date-string" select="'2026-07-25'" />
4670
+ <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.'" />
4671
+ <xsl:with-param name="incorrect-use" select="($html.annotation != '')" />
4672
+ </xsl:call-template>
4673
+ <!-- -->
4754
4674
  </xsl:template>
4755
4675
 
4756
4676
  </xsl:stylesheet>