@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
@@ -1,6 +1,5 @@
1
1
  Generic Video Preview Image
2
-
3
- ```
2
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
4
3
 
5
4
  2023-02-07: This image was previously provided for LaTeX output as a macro that resolves to a TikZ version. See removed code and comments below. In HTML we use an SVG we have mildly edited. Search the HTML conversion for a template with name "generic-preview-svg".
6
5
 
@@ -43,4 +42,3 @@ The purpose of the PNG image is to be the static version created via the pre-pro
43
42
  (64.0200,47.9100) -- (38.2800,61.4100) -- cycle;
44
43
  \end{tikzpicture}
45
44
  }
46
- ```
@@ -21,4 +21,4 @@ Refer to the existing tests in `pretext-text-utilities-test.xsl` for examples of
21
21
  ## Files
22
22
 
23
23
  - `pretext-text-utilities-test.xsl`: Contains tests for the text utilities templates.
24
- - `null.xml`: A minimal XML file used as input for the tests.
24
+ - `null.xml`: A minimal XML file used as input for the tests.
@@ -2,30 +2,28 @@
2
2
 
3
3
  ## Source-to-Source conversions
4
4
 
5
- For utility programs here which rewrite your source, be **sure** to use version control (collect and review changes on a branch, stash and drop undesirable outcomes), or have backups handy. The effects are not reversible. Stylesheets will output to standard output, so you can redirect their output, or you can use something like the `-o` flag on the `xsltproc` command-line invocation. Experiment first.
5
+ For utility programs here which rewrite your source, be **sure** to use version control (collect and review changes on a branch, stash and drop undesirable outcomes), or have backups handy. The effects are not reversible. Stylesheets will output to standard output, so you can redirect their output, or you can use something like the `-o` flag on the `xsltproc` command-line invocation. Experiment first.
6
6
 
7
7
  ### `fix-deprecations.xsl`
8
+ This will convert any obsolete element names or constructions to their replacements. As deprecations are added, you may run it anew, and only the new changes will be applied. Despite the name, it does make some minor changes. Empty tags will get a single space prior to the closing backslash.
8
9
 
9
- This will convert any obsolete element names or constructions to their replacements. As deprecations are added, you may run it anew, and only the new changes will be applied. Despite the name, it does make some minor changes. Empty tags will get a single space prior to the closing backslash.
10
-
11
- Be sure to read all the details in the Author's Guide before using this on your source. Here is an absolute minimal example.
12
-
10
+ Be sure to read all the details in the Author's Guide before using this on your source. Here is an absolute minimal example.
13
11
  ```
14
12
  $ xsltproc /path/to/xsl/utilities/fix-deprecations.xsl -stringparam fix all /path/to/examples/sample-errors-and-warnings.xml > new-sample.xml
15
13
 
16
14
  $ diff /path/to/examples/sample-errors-and-warnings.xml new-sample.xml
17
15
  ```
18
-
19
16
  (Updated: 2017-07-04)
20
17
 
18
+
21
19
  ## Author Report
22
20
 
23
- `author-report.xsl` is a very simple stylesheet which will produce a text version of items in your source that could benefit from your attention. This is different than validating your PreTeXt source against the schema, but is part of using automated tools to ensure healthy source material.
21
+ `author-report.xsl` is a very simple stylesheet which will produce a text version of items in your source that could benefit from your attention. This is different than validating your PreTeXt source against the schema, but is part of using automated tools to ensure healthy source material.
24
22
 
25
23
  (Updated: 2018-12-09)
26
24
 
27
25
  ## Intermediate Enhanced Source
28
26
 
29
- `pretext-enhanced-source.xsl` is mainly meant for development use. It outputs an XML file, which is not necessarily valid PreTeXt, at a key stage of the processing. It gives you a look under the hood (or bonnet). So generally not useful (or necessary) for authors.
27
+ `pretext-enhanced-source.xsl` is mainly meant for development use. It outputs an XML file, which is not necessarily valid PreTeXt, at a key stage of the processing. It gives you a look under the hood (or bonnet). So generally not useful (or necessary) for authors.
30
28
 
31
29
  (Updated: 2020-02-25)
@@ -78,6 +78,21 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
78
78
  <xsl:text> </xsl:text>
79
79
  <xsl:value-of select="$mermaid-theme"/>
80
80
  <xsl:text>&#xa;</xsl:text>
81
+ <!-- 2026-07-22 Reveal.js mathematics: "online" or "embedded" -->
82
+ <xsl:text>reveal-math-source</xsl:text>
83
+ <xsl:text> </xsl:text>
84
+ <xsl:value-of select="$reveal-math-source"/>
85
+ <xsl:text>&#xa;</xsl:text>
86
+ <!-- 2026-07-22 Reveal.js effective resources host, and the resource -->
87
+ <!-- location prefix (the CDN root when the host is "embedded") -->
88
+ <xsl:text>reveal-resources-host</xsl:text>
89
+ <xsl:text> </xsl:text>
90
+ <xsl:value-of select="$reveal-resources-host"/>
91
+ <xsl:text>&#xa;</xsl:text>
92
+ <xsl:text>reveal-root</xsl:text>
93
+ <xsl:text> </xsl:text>
94
+ <xsl:value-of select="$reveal-root"/>
95
+ <xsl:text>&#xa;</xsl:text>
81
96
  <!-- 2024-07-07 QR code image -->
82
97
  <xsl:text>qrcode-image</xsl:text>
83
98
  <xsl:text> </xsl:text>