@pretextbook/pretext-html 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -6
- package/assets/preview-html.xsl +8 -4
- package/assets/upstream.json +1 -1
- package/assets/xsl/README.md +25 -24
- package/assets/xsl/entities.ent +20 -0
- package/assets/xsl/extract-biblio-csl.xsl +1 -1
- package/assets/xsl/extract-pg.xsl +111 -297
- package/assets/xsl/extract-qrcode.xsl +11 -1
- package/assets/xsl/extract-sageplot.xsl +1 -1
- package/assets/xsl/latex/pretext-latex-texstyle.xsl +1 -2
- package/assets/xsl/localizations/README.md +24 -24
- package/assets/xsl/pretext-assembly.xsl +101 -11
- package/assets/xsl/pretext-beamer.xsl +43 -146
- package/assets/xsl/pretext-braille-preprint.xsl +457 -201
- package/assets/xsl/pretext-common.xsl +388 -423
- package/assets/xsl/pretext-epub.xsl +301 -72
- package/assets/xsl/pretext-fo.xsl +70 -86
- package/assets/xsl/pretext-html.xsl +331 -259
- package/assets/xsl/pretext-jupyter.xsl +534 -322
- package/assets/xsl/pretext-latex-classic.xsl +14 -15
- package/assets/xsl/pretext-latex-common.xsl +385 -2389
- package/assets/xsl/pretext-latex.xsl +1995 -5
- package/assets/xsl/pretext-markdown.xsl +919 -0
- package/assets/xsl/pretext-numbers.xsl +22 -4
- package/assets/xsl/pretext-revealjs.xsl +241 -33
- package/assets/xsl/pretext-runestone-fitb.xsl +20 -22
- package/assets/xsl/pretext-runestone.xsl +3 -3
- package/assets/xsl/pretext-sage-doctest.xsl +2 -2
- package/assets/xsl/pretext-text-utilities.xsl +69 -1
- package/assets/xsl/pretext-text.xsl +1077 -107
- package/assets/xsl/publisher-variables.xsl +396 -452
- package/assets/xsl/support/play-button/README.md +1 -3
- package/assets/xsl/tests/README.md +1 -1
- package/assets/xsl/utilities/README.md +6 -8
- package/assets/xsl/utilities/report-publisher-variables.xsl +15 -0
- package/assets/xsl-bundle.json +1 -1
- package/dist/assets.d.ts +43 -0
- package/dist/assets.js +76 -0
- package/dist/cli-Cp6C0sif.js +654 -0
- package/dist/cli.js +1 -1
- package/dist/index.browser.js +367 -307
- package/dist/index.d.ts +5 -0
- package/dist/index.js +16 -11
- package/dist/missing-asset.d.ts +31 -0
- package/dist/publication.d.ts +36 -1
- package/dist/renderer.d.ts +49 -0
- package/package.json +9 -1
- package/dist/cli-B2LiKunq.js +0 -588
|
@@ -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.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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>
</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>
</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>
</xsl:text>
|
|
92
|
+
<xsl:text>reveal-root</xsl:text>
|
|
93
|
+
<xsl:text> </xsl:text>
|
|
94
|
+
<xsl:value-of select="$reveal-root"/>
|
|
95
|
+
<xsl:text>
</xsl:text>
|
|
81
96
|
<!-- 2024-07-07 QR code image -->
|
|
82
97
|
<xsl:text>qrcode-image</xsl:text>
|
|
83
98
|
<xsl:text> </xsl:text>
|