@pretextbook/pretext-html 0.5.0 → 0.7.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 +6 -0
- package/assets/preview-html.xsl +14 -0
- package/assets/upstream.json +1 -1
- package/assets/xsl/LICENSE-pretext +1 -1
- package/assets/xsl/README.md +43 -25
- package/assets/xsl/entities.ent +4 -4
- package/assets/xsl/extract-asymptote.xsl +5 -5
- package/assets/xsl/extract-biblio-csl.xsl +1 -1
- package/assets/xsl/extract-datafile.xsl +1 -1
- package/assets/xsl/extract-dynamic.xsl +1 -1
- package/assets/xsl/extract-identity.xsl +5 -5
- package/assets/xsl/extract-interactive.xsl +1 -1
- package/assets/xsl/extract-latex-image.xsl +5 -5
- package/assets/xsl/extract-mermaid.xsl +1 -1
- package/assets/xsl/extract-mom.xsl +5 -5
- package/assets/xsl/extract-pg.xsl +1 -1
- package/assets/xsl/extract-prefigure.xsl +5 -5
- package/assets/xsl/extract-qrcode.xsl +1 -1
- package/assets/xsl/extract-runestone-page-template.xsl +1 -1
- package/assets/xsl/extract-sageplot.xsl +5 -5
- package/assets/xsl/extract-stack.xsl +1 -1
- package/assets/xsl/extract-trace.xsl +1 -1
- package/assets/xsl/extract-youtube.xsl +5 -5
- package/assets/xsl/latex/pretext-latex-AIM.xsl +1 -1
- package/assets/xsl/latex/pretext-latex-chaos.xsl +1 -1
- package/assets/xsl/latex/pretext-latex-dyslexic-font.xsl +1 -1
- package/assets/xsl/latex/pretext-latex-guide.xsl +1 -1
- package/assets/xsl/localizations/README.md +25 -25
- package/assets/xsl/localizations/af-ZA.xml +1 -1
- package/assets/xsl/localizations/bg-BG.xml +1 -1
- package/assets/xsl/localizations/ca-ES.xml +1 -1
- package/assets/xsl/localizations/cs-CZ.xml +1 -1
- package/assets/xsl/localizations/de-DE.xml +1 -1
- package/assets/xsl/localizations/en-US.xml +1 -1
- package/assets/xsl/localizations/es-ES.xml +1 -1
- package/assets/xsl/localizations/fi-FI.xml +1 -1
- package/assets/xsl/localizations/fr-CA.xml +1 -1
- package/assets/xsl/localizations/fr-FR.xml +1 -1
- package/assets/xsl/localizations/hu-HU.xml +1 -1
- package/assets/xsl/localizations/it-IT.xml +1 -1
- package/assets/xsl/localizations/ku-CKB.xml +1 -1
- package/assets/xsl/localizations/localizations.xml +1 -1
- package/assets/xsl/localizations/nl-NL.xml +1 -1
- package/assets/xsl/localizations/pt-BR.xml +1 -1
- package/assets/xsl/localizations/pt-PT.xml +1 -1
- package/assets/xsl/localizations/zh-HANS.xml +1 -1
- package/assets/xsl/pretext-assembly.xsl +64 -1
- package/assets/xsl/pretext-basic-html.xsl +5 -5
- package/assets/xsl/pretext-braille-preprint.xsl +5 -5
- package/assets/xsl/pretext-common.xsl +104 -30
- package/assets/xsl/pretext-dynamic.xsl +1 -1
- package/assets/xsl/pretext-epub.xsl +90 -84
- package/assets/xsl/pretext-fo.xsl +1 -1
- package/assets/xsl/pretext-html.xsl +57 -34
- package/assets/xsl/pretext-json-manifest.xsl +1 -1
- package/assets/xsl/pretext-jupyter.xsl +5 -5
- package/assets/xsl/pretext-latex-classic.xsl +1 -1
- package/assets/xsl/pretext-latex-common.xsl +7 -5
- package/assets/xsl/pretext-latex.xsl +3 -3
- package/assets/xsl/pretext-litprog.xsl +9 -2
- package/assets/xsl/pretext-markdown.xsl +1 -1
- package/assets/xsl/pretext-numbers.xsl +1 -1
- package/assets/xsl/pretext-runestone-fitb.xsl +18 -0
- package/assets/xsl/pretext-runestone-static.xsl +13 -1
- package/assets/xsl/pretext-runestone.xsl +34 -6
- package/assets/xsl/pretext-sage-doctest.xsl +18 -0
- package/assets/xsl/pretext-solution-manual-latex.xsl +4 -4
- package/assets/xsl/pretext-text-utilities.xsl +1 -1
- package/assets/xsl/pretext-text.xsl +5 -5
- package/assets/xsl/pretext-units.xsl +5 -5
- package/assets/xsl/pretext-view-source.xsl +1 -1
- package/assets/xsl/pretext-ww-problem-sets.xsl +15 -12
- package/assets/xsl/publisher-variables.xsl +104 -36
- package/assets/xsl/support/README.md +19 -0
- package/assets/xsl/support/extract-math.xsl +1 -1
- package/assets/xsl/support/package-math.xsl +1 -1
- package/assets/xsl/support/play-button/README.md +3 -1
- package/assets/xsl/support/webpack_static_imports.xml +19 -0
- package/assets/xsl/tests/README.md +20 -1
- package/assets/xsl/tests/null.xml +19 -0
- package/assets/xsl/tests/pretext-text-utilities-test.xsl +1 -1
- package/assets/xsl/utilities/README.md +27 -6
- package/assets/xsl/utilities/author-report.xsl +1 -1
- package/assets/xsl/utilities/fix-deprecations.xsl +5 -5
- package/assets/xsl/utilities/pretext-enhanced-source.xsl +1 -1
- package/assets/xsl/utilities/report-publisher-variables.xsl +5 -5
- package/assets/xsl/xml-to-json.xsl +4 -4
- package/assets/xsl-bundle.json +1 -1
- package/dist/banner.d.ts +51 -0
- package/dist/{cli-DZsyZERX.js → cli-D0m0Ha1j.js} +358 -196
- package/dist/cli.js +2 -2
- package/dist/index.browser.d.ts +3 -0
- package/dist/index.browser.js +477 -322
- package/dist/index.d.ts +3 -0
- package/dist/index.js +25 -21
- package/dist/knowls.d.ts +43 -0
- package/dist/renderer.d.ts +26 -0
- package/package.json +1 -1
- package/assets/xsl/pretext-smc.xsl +0 -492
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version='1.0'?> <!-- As XML file -->
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2022
|
|
4
|
+
Copyright (C) 2022-2026 Robert A. Beezer
|
|
5
5
|
|
|
6
6
|
This file is part of PreTeXt.
|
|
7
7
|
|
|
@@ -55,11 +55,17 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
55
55
|
|
|
56
56
|
<!-- These get-programming-language templates duplicate logic from pretext-common -->
|
|
57
57
|
<!-- as the contents of that file are not available yet. -->
|
|
58
|
+
<!-- NB: these run during assembly, before the repair pass has produced the tree -->
|
|
59
|
+
<!-- behind $docinfo, so they read the version tree and must recognize both the -->
|
|
60
|
+
<!-- "docinfo/defaults" home (preferred) and the deprecated top-level placement. -->
|
|
58
61
|
<xsl:template match="program" mode="get-programming-language">
|
|
59
62
|
<xsl:choose>
|
|
60
63
|
<xsl:when test="@language">
|
|
61
64
|
<xsl:value-of select="@language" />
|
|
62
65
|
</xsl:when>
|
|
66
|
+
<xsl:when test="$version-docinfo/defaults/programs/@language">
|
|
67
|
+
<xsl:value-of select="$version-docinfo/defaults/programs/@language" />
|
|
68
|
+
</xsl:when>
|
|
63
69
|
<xsl:when test="$version-docinfo/programs/@language">
|
|
64
70
|
<xsl:value-of select="$version-docinfo/programs/@language" />
|
|
65
71
|
</xsl:when>
|
|
@@ -71,9 +77,15 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
71
77
|
<xsl:when test="@language">
|
|
72
78
|
<xsl:value-of select="@language" />
|
|
73
79
|
</xsl:when>
|
|
80
|
+
<xsl:when test="$version-docinfo/defaults/parsons/@language">
|
|
81
|
+
<xsl:value-of select="$version-docinfo/defaults/parsons/@language" />
|
|
82
|
+
</xsl:when>
|
|
74
83
|
<xsl:when test="$version-docinfo/parsons/@language">
|
|
75
84
|
<xsl:value-of select="$version-docinfo/parsons/@language" />
|
|
76
85
|
</xsl:when>
|
|
86
|
+
<xsl:when test="$version-docinfo/defaults/programs/@language">
|
|
87
|
+
<xsl:value-of select="$version-docinfo/defaults/programs/@language" />
|
|
88
|
+
</xsl:when>
|
|
77
89
|
<xsl:when test="$version-docinfo/programs/@language">
|
|
78
90
|
<xsl:value-of select="$version-docinfo/programs/@language" />
|
|
79
91
|
</xsl:when>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version='1.0'?> <!-- As XML file -->
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2022
|
|
4
|
+
Copyright (C) 2022-2026 Robert A. Beezer
|
|
5
5
|
|
|
6
6
|
This file is part of PreTeXt.
|
|
7
7
|
|
|
@@ -2292,12 +2292,40 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
2292
2292
|
<xsl:with-param name="hosting" select="$hosting"/>
|
|
2293
2293
|
</xsl:call-template>
|
|
2294
2294
|
<!-- CodeTailor: when an author requests it, emit the data -->
|
|
2295
|
-
<!--
|
|
2296
|
-
<!-- automatically-personalized Parsons puzzle as scaffolding
|
|
2295
|
+
<!-- The presence of @codetailor has Runestone offer the reader -->
|
|
2296
|
+
<!-- an automatically-personalized Parsons puzzle as scaffolding -->
|
|
2297
2297
|
<!-- (a "Get Help" button) when they are stuck on the exercise. -->
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2298
|
+
<!-- The value "all" scrambles a complete solution, while -->
|
|
2299
|
+
<!-- "incorrect" locks blocks the reader already has right, so -->
|
|
2300
|
+
<!-- only wrong ones move. A @codetailor-fallback names, by -->
|
|
2301
|
+
<!-- @xml:id, a Parsons problem of this document to present when -->
|
|
2302
|
+
<!-- a personalized puzzle cannot be generated; in its absence, -->
|
|
2303
|
+
<!-- generation is always requested. -->
|
|
2304
|
+
<xsl:if test="@codetailor">
|
|
2305
|
+
<xsl:attribute name="data-parsonspersonalize">
|
|
2306
|
+
<xsl:choose>
|
|
2307
|
+
<xsl:when test="@codetailor = 'incorrect'">
|
|
2308
|
+
<xsl:text>partial</xsl:text>
|
|
2309
|
+
</xsl:when>
|
|
2310
|
+
<!-- "all", the only other value the schema admits -->
|
|
2311
|
+
<xsl:otherwise>
|
|
2312
|
+
<xsl:text>movable</xsl:text>
|
|
2313
|
+
</xsl:otherwise>
|
|
2314
|
+
</xsl:choose>
|
|
2315
|
+
</xsl:attribute>
|
|
2316
|
+
<xsl:attribute name="data-parsonsexample">
|
|
2317
|
+
<xsl:choose>
|
|
2318
|
+
<xsl:when test="@codetailor-fallback">
|
|
2319
|
+
<xsl:call-template name="runestone-targets">
|
|
2320
|
+
<xsl:with-param name="id-list" select="@codetailor-fallback"/>
|
|
2321
|
+
<xsl:with-param name="separator" select="''"/>
|
|
2322
|
+
</xsl:call-template>
|
|
2323
|
+
</xsl:when>
|
|
2324
|
+
<xsl:otherwise>
|
|
2325
|
+
<xsl:text>LLM-example</xsl:text>
|
|
2326
|
+
</xsl:otherwise>
|
|
2327
|
+
</xsl:choose>
|
|
2328
|
+
</xsl:attribute>
|
|
2301
2329
|
</xsl:if>
|
|
2302
2330
|
<!-- This is a bit awful, but we need to figure out how much margin -->
|
|
2303
2331
|
<!-- to add to runestone dividers. It must match indentation used for -->
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
<?xml version='1.0'?> <!-- As XML file -->
|
|
2
2
|
|
|
3
|
+
<!--********************************************************************
|
|
4
|
+
Copyright (C) 2013-2026 Robert A. Beezer
|
|
5
|
+
|
|
6
|
+
This file is part of PreTeXt.
|
|
7
|
+
|
|
8
|
+
PreTeXt is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 2 or version 3 of the
|
|
11
|
+
License (at your option).
|
|
12
|
+
|
|
13
|
+
PreTeXt is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*****************************************************************-->
|
|
3
21
|
<!-- http://pimpmyxslt.com/articles/entity-tricks-part2/ -->
|
|
4
22
|
<!DOCTYPE xsl:stylesheet [
|
|
5
23
|
<!ENTITY % entities SYSTEM "entities.ent">
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?> <!-- As XML file -->
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2018
|
|
4
|
+
Copyright (C) 2018-2026 Robert A. Beezer
|
|
5
5
|
|
|
6
6
|
This file is part of PreTeXt.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
PreTeXt is free software: you can redistribute it and/or modify
|
|
9
9
|
it under the terms of the GNU General Public License as published by
|
|
10
10
|
the Free Software Foundation, either version 2 or version 3 of the
|
|
11
11
|
License (at your option).
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
PreTeXt is distributed in the hope that it will be useful,
|
|
14
14
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
15
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
16
|
GNU General Public License for more details.
|
|
17
17
|
|
|
18
18
|
You should have received a copy of the GNU General Public License
|
|
19
|
-
along with
|
|
19
|
+
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*********************************************************************-->
|
|
21
21
|
|
|
22
22
|
<!-- http://pimpmyxslt.com/articles/entity-tricks-part2/ -->
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2018
|
|
4
|
+
Copyright (C) 2018-2026 Robert A. Beezer
|
|
5
5
|
|
|
6
|
-
This file is part of
|
|
6
|
+
This file is part of PreTeXt.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
PreTeXt is free software: you can redistribute it and/or modify
|
|
9
9
|
it under the terms of the GNU General Public License as published by
|
|
10
10
|
the Free Software Foundation, either version 2 or version 3 of the
|
|
11
11
|
License (at your option).
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
PreTeXt is distributed in the hope that it will be useful,
|
|
14
14
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
15
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
16
|
GNU General Public License for more details.
|
|
17
17
|
|
|
18
18
|
You should have received a copy of the GNU General Public License
|
|
19
|
-
along with
|
|
19
|
+
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
20
20
|
*********************************************************************-->
|
|
21
21
|
|
|
22
22
|
<!-- http://pimpmyxslt.com/articles/entity-tricks-part2/ -->
|
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
|
5
5
|
|
|
6
6
|
<!--********************************************************************
|
|
7
|
-
Copyright 2013
|
|
7
|
+
Copyright (C) 2013-2026 Robert A. Beezer
|
|
8
8
|
|
|
9
|
-
This file is part of
|
|
9
|
+
This file is part of PreTeXt.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
PreTeXt is free software: you can redistribute it and/or modify
|
|
12
12
|
it under the terms of the GNU General Public License as published by
|
|
13
13
|
the Free Software Foundation, either version 2 or version 3 of the
|
|
14
14
|
License (at your option).
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
PreTeXt is distributed in the hope that it will be useful,
|
|
17
17
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18
18
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19
19
|
GNU General Public License for more details.
|
|
20
20
|
|
|
21
21
|
You should have received a copy of the GNU General Public License
|
|
22
|
-
along with
|
|
22
|
+
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
23
23
|
*********************************************************************-->
|
|
24
24
|
|
|
25
25
|
<!-- This file contains unit-related abbreviations, such as 'kilo' => 'k' -->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
2
2
|
|
|
3
3
|
<!-- ********************************************************************* -->
|
|
4
|
-
<!-- Copyright 2015-
|
|
4
|
+
<!-- Copyright (C) 2015-2026 -->
|
|
5
5
|
<!-- Robert A. Beezer, Michael Gage, Geoff Goehle, Alex Jordan -->
|
|
6
6
|
<!-- -->
|
|
7
7
|
<!-- This file is part of PreTeXt. -->
|
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
|
|
30
30
|
xmlns:xml="http://www.w3.org/XML/1998/namespace"
|
|
31
31
|
xmlns:exsl="http://exslt.org/common"
|
|
32
|
+
xmlns:pi="http://pretextbook.org/2020/pretext/internal"
|
|
32
33
|
extension-element-prefixes="exsl"
|
|
33
34
|
>
|
|
34
35
|
|
|
@@ -154,18 +155,20 @@
|
|
|
154
155
|
<xsl:value-of select="concat('/',$external-directory,@local)"/>
|
|
155
156
|
</xsl:template>
|
|
156
157
|
|
|
157
|
-
<!-- For copied problems move to the problem that was copied
|
|
158
|
-
<!--
|
|
159
|
-
<!--
|
|
160
|
-
<!--
|
|
161
|
-
<!--
|
|
162
|
-
<!--
|
|
163
|
-
|
|
164
|
-
|
|
158
|
+
<!-- For copied problems move to the problem that was copied. -->
|
|
159
|
+
<!-- This stylesheet imports pretext-assembly.xsl and assembles -->
|
|
160
|
+
<!-- from source, so the attribute it sees is the tree stamp -->
|
|
161
|
+
<!-- "@pi:copied-from", holding the @xml:id the author aimed -->
|
|
162
|
+
<!-- @copy at. The plain "@copied-from" of the representations -->
|
|
163
|
+
<!-- file is a different thing with a different value, the -->
|
|
164
|
+
<!-- assembly identifier of the copied problem's exercise, and -->
|
|
165
|
+
<!-- it never reaches this stylesheet. -->
|
|
166
|
+
<xsl:template match="webwork[@pi:copied-from]" mode="relative-filename">
|
|
167
|
+
<xsl:variable name="copied-from" select="@pi:copied-from"/>
|
|
165
168
|
<xsl:apply-templates select="$document-root//webwork[@xml:id=$copied-from]" mode="relative-filename"/>
|
|
166
169
|
</xsl:template>
|
|
167
|
-
<xsl:template match="webwork[@copied-from]" mode="filename">
|
|
168
|
-
<xsl:variable name="copied-from" select="@copied-from"/>
|
|
170
|
+
<xsl:template match="webwork[@pi:copied-from]" mode="filename">
|
|
171
|
+
<xsl:variable name="copied-from" select="@pi:copied-from"/>
|
|
169
172
|
<xsl:apply-templates select="$document-root//webwork[@xml:id=$copied-from]" mode="filename"/>
|
|
170
173
|
</xsl:template>
|
|
171
174
|
|
|
@@ -203,7 +206,7 @@
|
|
|
203
206
|
</xsl:template>
|
|
204
207
|
|
|
205
208
|
<!-- We don't write a new file for a copied webwork exercise -->
|
|
206
|
-
<xsl:template match="webwork[@copied-from]" mode="write-file"/>
|
|
209
|
+
<xsl:template match="webwork[@pi:copied-from]" mode="write-file"/>
|
|
207
210
|
|
|
208
211
|
<!-- ################## -->
|
|
209
212
|
<!-- Chunking Def Files-->
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2020
|
|
4
|
+
Copyright (C) 2020-2026 Robert A. Beezer
|
|
5
5
|
|
|
6
6
|
This file is part of PreTeXt.
|
|
7
7
|
|
|
@@ -1156,12 +1156,34 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
1156
1156
|
<!-- while a trailing slash will be reliably added if -->
|
|
1157
1157
|
<!-- (a) not present in publisher file specification -->
|
|
1158
1158
|
<!-- (b) the path is not empty -->
|
|
1159
|
+
<!-- The external directory is a fact of the source (a different -->
|
|
1160
|
+
<!-- directory of files is a different document), so its declaration -->
|
|
1161
|
+
<!-- is "directories/@external" within "docinfo" (2026-07-30). The -->
|
|
1162
|
+
<!-- publication file "source/directories/@external" is deprecated but -->
|
|
1163
|
+
<!-- honored while the "docinfo" is silent. NB: the version tree is -->
|
|
1164
|
+
<!-- consulted, since machinery within the assembly chain consumes -->
|
|
1165
|
+
<!-- directory variables and the tree behind $docinfo does not exist -->
|
|
1166
|
+
<!-- yet at that point (referencing it is a circular definition). -->
|
|
1159
1167
|
<xsl:variable name="external-directory-source">
|
|
1160
|
-
<xsl:variable name="raw-input"
|
|
1168
|
+
<xsl:variable name="raw-input">
|
|
1169
|
+
<xsl:choose>
|
|
1170
|
+
<xsl:when test="$version-docinfo/directories/@external">
|
|
1171
|
+
<xsl:if test="$publication/source/directories/@external">
|
|
1172
|
+
<xsl:message>PTX:WARNING: the external directory is specified both within "docinfo" ("directories/@external") and in the publication file ("source/directories/@external"). The "docinfo" value is used; please remove the publication file entry.</xsl:message>
|
|
1173
|
+
</xsl:if>
|
|
1174
|
+
<xsl:value-of select="$version-docinfo/directories/@external"/>
|
|
1175
|
+
</xsl:when>
|
|
1176
|
+
<xsl:when test="$publication/source/directories/@external">
|
|
1177
|
+
<xsl:message>PTX:DEPRECATE: (2026-07-30) the external directory is a fact of the source, and is now declared with a "directories/@external" attribute within "docinfo". The publication file entry "source/directories/@external" is honored meanwhile, but please relocate it.</xsl:message>
|
|
1178
|
+
<xsl:value-of select="$publication/source/directories/@external"/>
|
|
1179
|
+
</xsl:when>
|
|
1180
|
+
<xsl:otherwise/>
|
|
1181
|
+
</xsl:choose>
|
|
1182
|
+
</xsl:variable>
|
|
1161
1183
|
<xsl:choose>
|
|
1162
1184
|
<!-- leading path separator is an error -->
|
|
1163
1185
|
<xsl:when test="substring($raw-input, 1, 1) = '/'">
|
|
1164
|
-
<xsl:message>PTX:FALLBACK: an external-image directory (
|
|
1186
|
+
<xsl:message>PTX:FALLBACK: an external-image directory ("directories/@external", within "docinfo" or the publication 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>
|
|
1165
1187
|
<xsl:text/>
|
|
1166
1188
|
</xsl:when>
|
|
1167
1189
|
<!-- trailing path separator is good and -->
|
|
@@ -1216,21 +1238,30 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
1216
1238
|
<!-- or not (older, historical). So we create a boolean based on the -->
|
|
1217
1239
|
<!-- presence of the publisher file specification. -->
|
|
1218
1240
|
<xsl:variable name="managed-directories">
|
|
1241
|
+
<xsl:if test="$version-docinfo/directories/@external = ''">
|
|
1242
|
+
<xsl:message terminate="yes">PTX:FATAL: the value of "directories/@external" within "docinfo" must be nonempty</xsl:message>
|
|
1243
|
+
</xsl:if>
|
|
1219
1244
|
<xsl:if test="$publication/source/directories/@external = ''">
|
|
1220
1245
|
<xsl:message terminate="yes">PTX:FATAL: the value of source/directories/@external in the publisher file must be nonempty</xsl:message>
|
|
1221
1246
|
</xsl:if>
|
|
1222
1247
|
<xsl:if test="$publication/source/directories/@generated = ''">
|
|
1223
1248
|
<xsl:message terminate="yes">PTX:FATAL: the value of source/directories/@generated in the publisher file must be nonempty</xsl:message>
|
|
1224
1249
|
</xsl:if>
|
|
1250
|
+
<!-- The external directory may be declared in "docinfo" (preferred) -->
|
|
1251
|
+
<!-- or the publication file (deprecated, honored); the generated -->
|
|
1252
|
+
<!-- directory is a publication file entry. Management requires an -->
|
|
1253
|
+
<!-- external declaration, from either home, together with the -->
|
|
1254
|
+
<!-- generated declaration. -->
|
|
1255
|
+
<xsl:variable name="b-has-external" select="boolean($version-docinfo/directories/@external) or boolean($publication/source/directories/@external)"/>
|
|
1225
1256
|
<xsl:choose>
|
|
1226
|
-
<xsl:when test="$
|
|
1257
|
+
<xsl:when test="$b-has-external and $publication/source/directories/@generated">
|
|
1227
1258
|
<xsl:text>yes</xsl:text>
|
|
1228
1259
|
</xsl:when>
|
|
1229
|
-
<xsl:when test="not($
|
|
1260
|
+
<xsl:when test="not($b-has-external) and not($publication/source/directories/@generated)">
|
|
1230
1261
|
<xsl:text>no</xsl:text>
|
|
1231
1262
|
</xsl:when>
|
|
1232
1263
|
<xsl:otherwise>
|
|
1233
|
-
<xsl:message>PTX:FALLBACK: the
|
|
1264
|
+
<xsl:message>PTX:FALLBACK: an external directory ("directories/@external" within "docinfo", or the deprecated publication file form) and a generated directory (source/directories/@generated in the publication file) must be specified together; only one was found. Proceeding as if neither was specified.</xsl:message>
|
|
1234
1265
|
<xsl:text>no</xsl:text>
|
|
1235
1266
|
</xsl:otherwise>
|
|
1236
1267
|
</xsl:choose>
|
|
@@ -1272,19 +1303,19 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
1272
1303
|
<!-- This is a directory that may need to be copied to a -->
|
|
1273
1304
|
<!-- scratch location in anticipation of data files necessary -->
|
|
1274
1305
|
<!-- for compilation of images, such as pie charts or plots -->
|
|
1275
|
-
<!--
|
|
1306
|
+
<!-- The data directory runs with the source, declared as -->
|
|
1307
|
+
<!-- "directories/@data" within "docinfo" (the version tree, -->
|
|
1308
|
+
<!-- for the same reason as the external directory above). -->
|
|
1309
|
+
<!-- An earlier form of this variable consulted a publication -->
|
|
1310
|
+
<!-- file "source/directories/@data" which was never in the -->
|
|
1311
|
+
<!-- publication schema, and hard-coded the value "data". -->
|
|
1276
1312
|
<xsl:variable name="data-directory">
|
|
1277
1313
|
<xsl:variable name="raw-input">
|
|
1278
|
-
<xsl:
|
|
1279
|
-
<xsl:when test="$publication/source/directories/@data">
|
|
1280
|
-
<xsl:value-of select="'data'"/>
|
|
1281
|
-
</xsl:when>
|
|
1282
|
-
<xsl:otherwise/>
|
|
1283
|
-
</xsl:choose>
|
|
1314
|
+
<xsl:value-of select="$version-docinfo/directories/@data"/>
|
|
1284
1315
|
</xsl:variable>
|
|
1285
1316
|
<xsl:choose>
|
|
1286
1317
|
<xsl:when test="substring($raw-input, 1, 1) = '/'">
|
|
1287
|
-
<xsl:message>PTX:FALLBACK: a data directory (
|
|
1318
|
+
<xsl:message>PTX:FALLBACK: a data directory ("directories/@data" within "docinfo") 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>
|
|
1288
1319
|
<xsl:text/>
|
|
1289
1320
|
</xsl:when>
|
|
1290
1321
|
<!-- trailing path separator is good -->
|
|
@@ -2709,23 +2740,19 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
2709
2740
|
<!-- Always use cdn when "b-portable-html" is true or "resources-host" is "cdn" -->
|
|
2710
2741
|
<xsl:variable name="b-cdn-resources" select="$b-portable-html or $resources-host = 'cdn'"/>
|
|
2711
2742
|
|
|
2712
|
-
<!--
|
|
2713
|
-
<!--
|
|
2714
|
-
<!--
|
|
2715
|
-
<!--
|
|
2716
|
-
<!-- because this is computed
|
|
2717
|
-
<!-- contract (documented at the
|
|
2718
|
-
<!-- pretext-assembly.xsl) is that no
|
|
2719
|
-
<!-- gross document structure (book/article
|
|
2720
|
-
<!-- section hierarchy), so $version-root is
|
|
2721
|
-
<!-- top-level queries. Same contract relied upon
|
|
2722
|
-
|
|
2743
|
+
<!-- The chunk level a document's structure implies, with no publisher -->
|
|
2744
|
+
<!-- or command-line choice consulted. A conversion that accepts such -->
|
|
2745
|
+
<!-- a choice layers it over this; one that does not, such as EPUB, -->
|
|
2746
|
+
<!-- uses this as-is, so the two can never drift apart. -->
|
|
2747
|
+
<!-- Uses $version-root rather than $root because this is computed -->
|
|
2748
|
+
<!-- before later assembly passes. The contract (documented at the -->
|
|
2749
|
+
<!-- definition of $version-root in pretext-assembly.xsl) is that no -->
|
|
2750
|
+
<!-- assembly pass alters the gross document structure (book/article -->
|
|
2751
|
+
<!-- type, part/chapter/section hierarchy), so $version-root is -->
|
|
2752
|
+
<!-- reliable for these top-level queries. Same contract relied upon -->
|
|
2753
|
+
<!-- by $toc-level. -->
|
|
2754
|
+
<xsl:variable name="chunk-level-default">
|
|
2723
2755
|
<xsl:choose>
|
|
2724
|
-
<!-- portable html always gets chunk level 0 -->
|
|
2725
|
-
<xsl:when test="$b-portable-html">0</xsl:when>
|
|
2726
|
-
<xsl:when test="$chunk-level-entered != ''">
|
|
2727
|
-
<xsl:value-of select="$chunk-level-entered" />
|
|
2728
|
-
</xsl:when>
|
|
2729
2756
|
<xsl:when test="$version-has-parts">3</xsl:when>
|
|
2730
2757
|
<xsl:when test="$version-doc-type = 'book'">2</xsl:when>
|
|
2731
2758
|
<xsl:when test="$version-article-sections or $version-article-printouts">1</xsl:when>
|
|
@@ -2734,7 +2761,23 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
2734
2761
|
<xsl:when test="$version-doc-type = 'letter'">0</xsl:when>
|
|
2735
2762
|
<xsl:when test="$version-doc-type = 'memo'">0</xsl:when>
|
|
2736
2763
|
<xsl:otherwise>
|
|
2737
|
-
<xsl:message>PTX:BUG:
|
|
2764
|
+
<xsl:message>PTX:BUG: chunk level not determined</xsl:message>
|
|
2765
|
+
</xsl:otherwise>
|
|
2766
|
+
</xsl:choose>
|
|
2767
|
+
</xsl:variable>
|
|
2768
|
+
|
|
2769
|
+
<!-- The chunk level for HTML, available to any stylesheet that needs -->
|
|
2770
|
+
<!-- to compute HTML filenames via the "containing-filename" template -->
|
|
2771
|
+
<!-- (pretext-common.xsl) without importing the full pretext-html.xsl. -->
|
|
2772
|
+
<xsl:variable name="html-chunk-level">
|
|
2773
|
+
<xsl:choose>
|
|
2774
|
+
<!-- portable html always gets chunk level 0 -->
|
|
2775
|
+
<xsl:when test="$b-portable-html">0</xsl:when>
|
|
2776
|
+
<xsl:when test="$chunk-level-entered != ''">
|
|
2777
|
+
<xsl:value-of select="$chunk-level-entered" />
|
|
2778
|
+
</xsl:when>
|
|
2779
|
+
<xsl:otherwise>
|
|
2780
|
+
<xsl:value-of select="$chunk-level-default"/>
|
|
2738
2781
|
</xsl:otherwise>
|
|
2739
2782
|
</xsl:choose>
|
|
2740
2783
|
</xsl:variable>
|
|
@@ -2747,6 +2790,31 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
2747
2790
|
<xsl:apply-templates select="$publisher-attribute-options/html/pi:pub-attribute[@name='favicon']" mode="set-pubfile-variable"/>
|
|
2748
2791
|
</xsl:variable>
|
|
2749
2792
|
|
|
2793
|
+
<!-- -->
|
|
2794
|
+
<!-- HTML Image Archive Links -->
|
|
2795
|
+
<!-- -->
|
|
2796
|
+
|
|
2797
|
+
<!-- Requests for archive (download) versions of images: repeatable -->
|
|
2798
|
+
<!-- "archive" elements within an "images" element. The publication -->
|
|
2799
|
+
<!-- file form is preferred, and wins wholesale when present; the -->
|
|
2800
|
+
<!-- "images" element within "docinfo" is deprecated (2026-07-30) -->
|
|
2801
|
+
<!-- but honored while the publication file is silent. -->
|
|
2802
|
+
<xsl:variable name="image-archives" select="$publication/html/images/archive | $docinfo/images/archive[not($publication/html/images/archive)]"/>
|
|
2803
|
+
|
|
2804
|
+
<!-- -->
|
|
2805
|
+
<!-- HTML Brand Logo -->
|
|
2806
|
+
<!-- -->
|
|
2807
|
+
|
|
2808
|
+
<!-- An image for the masthead, optionally linking to a landing -->
|
|
2809
|
+
<!-- page. The publication file form is preferred, and elects -->
|
|
2810
|
+
<!-- the logo wholesale (both attributes); the "brandlogo" within -->
|
|
2811
|
+
<!-- "docinfo" is deprecated (2026-07-30) but honored while the -->
|
|
2812
|
+
<!-- publication file is silent. -->
|
|
2813
|
+
<xsl:variable name="brandlogo-elected" select="$publication/html/brandlogo | $docinfo/brandlogo[not($publication/html/brandlogo)]"/>
|
|
2814
|
+
<xsl:variable name="brandlogo-source" select="string($brandlogo-elected/@source)"/>
|
|
2815
|
+
<xsl:variable name="brandlogo-url" select="string($brandlogo-elected/@url)"/>
|
|
2816
|
+
<xsl:variable name="b-brandlogo" select="not($brandlogo-source = '')"/>
|
|
2817
|
+
|
|
2750
2818
|
<!-- -->
|
|
2751
2819
|
<!-- HTML Embed Page button -->
|
|
2752
2820
|
<!-- -->
|
|
@@ -3851,7 +3919,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
3851
3919
|
<xsl:param name="author-tools" select="''" />
|
|
3852
3920
|
|
|
3853
3921
|
<!-- The autoname parameter is deprecated (2017-07-25) -->
|
|
3854
|
-
<!-- Replace with docinfo/
|
|
3922
|
+
<!-- Replace with docinfo/defaults/xrefs/@text -->
|
|
3855
3923
|
<xsl:param name="autoname" select="''" />
|
|
3856
3924
|
|
|
3857
3925
|
<!-- 2020-11-22: latex.print to publisher file -->
|
|
@@ -4065,15 +4133,15 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
4065
4133
|
<!-- 2017-07-25 deprecate intentional autoname without new setting -->
|
|
4066
4134
|
<xsl:call-template name="parameter-deprecation-message">
|
|
4067
4135
|
<xsl:with-param name="date-string" select="'2017-07-25'" />
|
|
4068
|
-
<xsl:with-param name="message" select="'the autoname parameter is deprecated, but is still effective since "docinfo/
|
|
4069
|
-
<xsl:with-param name="incorrect-use" select="not($autoname = '') and not(//docinfo/cross-references)" />
|
|
4136
|
+
<xsl:with-param name="message" select="'the autoname parameter is deprecated, but is still effective since "docinfo/defaults/xrefs/@text" has not been set. The following parameter values equate to the attribute values: "no" is "global", "yes" is "type-global", "title" is "title"'" />
|
|
4137
|
+
<xsl:with-param name="incorrect-use" select="not($autoname = '') and not(//docinfo/cross-references | //docinfo/defaults/xrefs)" />
|
|
4070
4138
|
</xsl:call-template>
|
|
4071
4139
|
<!-- -->
|
|
4072
4140
|
<!-- 2017-07-25 deprecate intentional autoname also with new setting -->
|
|
4073
4141
|
<xsl:call-template name="parameter-deprecation-message">
|
|
4074
4142
|
<xsl:with-param name="date-string" select="'2017-07-25'" />
|
|
4075
|
-
<xsl:with-param name="message" select="'the autoname parameter is deprecated, and is being overidden by a "docinfo/
|
|
4076
|
-
<xsl:with-param name="incorrect-use" select="not($autoname = '') and //docinfo/cross-references" />
|
|
4143
|
+
<xsl:with-param name="message" select="'the autoname parameter is deprecated, and is being overidden by a "docinfo/defaults/xrefs/@text" and so is totally ineffective and can be removed'" />
|
|
4144
|
+
<xsl:with-param name="incorrect-use" select="not($autoname = '') and (//docinfo/cross-references | //docinfo/defaults/xrefs)" />
|
|
4077
4145
|
</xsl:call-template>
|
|
4078
4146
|
<!-- -->
|
|
4079
4147
|
<!-- 2017-12-18 deprecate three console macro characters -->
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
<!--********************************************************************
|
|
2
|
+
Copyright (C) 2022-2026 Robert A. Beezer
|
|
3
|
+
|
|
4
|
+
This file is part of PreTeXt.
|
|
5
|
+
|
|
6
|
+
PreTeXt is free software: you can redistribute it and/or modify
|
|
7
|
+
it under the terms of the GNU General Public License as published by
|
|
8
|
+
the Free Software Foundation, either version 2 or version 3 of the
|
|
9
|
+
License (at your option).
|
|
10
|
+
|
|
11
|
+
PreTeXt is distributed in the hope that it will be useful,
|
|
12
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
GNU General Public License for more details.
|
|
15
|
+
|
|
16
|
+
You should have received a copy of the GNU General Public License
|
|
17
|
+
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
18
|
+
*****************************************************************-->
|
|
19
|
+
|
|
1
20
|
# PreTeXt (Miscellaneous) Support Files
|
|
2
21
|
|
|
3
22
|
### Runestone Services
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
Generic Video Preview Image
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
```
|
|
3
4
|
|
|
4
5
|
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".
|
|
5
6
|
|
|
@@ -42,3 +43,4 @@ The purpose of the PNG image is to be the static version created via the pre-pro
|
|
|
42
43
|
(64.0200,47.9100) -- (38.2800,61.4100) -- cycle;
|
|
43
44
|
\end{tikzpicture}
|
|
44
45
|
}
|
|
46
|
+
```
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
<?xml version="1.0" ?>
|
|
2
|
+
|
|
3
|
+
<!--********************************************************************
|
|
4
|
+
Copyright (C) 2021-2026 Robert A. Beezer
|
|
5
|
+
|
|
6
|
+
This file is part of PreTeXt.
|
|
7
|
+
|
|
8
|
+
PreTeXt is free software: you can redistribute it and/or modify
|
|
9
|
+
it under the terms of the GNU General Public License as published by
|
|
10
|
+
the Free Software Foundation, either version 2 or version 3 of the
|
|
11
|
+
License (at your option).
|
|
12
|
+
|
|
13
|
+
PreTeXt is distributed in the hope that it will be useful,
|
|
14
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
+
GNU General Public License for more details.
|
|
17
|
+
|
|
18
|
+
You should have received a copy of the GNU General Public License
|
|
19
|
+
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
+
*****************************************************************-->
|
|
2
21
|
<all>
|
|
3
22
|
<js type="list">
|
|
4
23
|
<item type="str">prefix-runtime.00db6230172ad960.bundle.js</item>
|