@pretextbook/pretext-html 0.1.0 → 0.1.1

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 (111) hide show
  1. package/README.md +42 -3
  2. package/assets/preview-html.xsl +230 -230
  3. package/assets/upstream.json +7 -7
  4. package/assets/xsl/README.md +0 -0
  5. package/assets/xsl/entities.ent +154 -154
  6. package/assets/xsl/extract-asymptote.xsl +68 -68
  7. package/assets/xsl/extract-biblio-csl.xsl +327 -327
  8. package/assets/xsl/extract-datafile.xsl +71 -71
  9. package/assets/xsl/extract-dynamic.xsl +139 -139
  10. package/assets/xsl/extract-identity.xsl +136 -136
  11. package/assets/xsl/extract-interactive.xsl +81 -81
  12. package/assets/xsl/extract-latex-image.xsl +118 -118
  13. package/assets/xsl/extract-mermaid.xsl +58 -58
  14. package/assets/xsl/extract-mom.xsl +63 -63
  15. package/assets/xsl/extract-pg.xsl +2897 -2897
  16. package/assets/xsl/extract-prefigure.xsl +157 -157
  17. package/assets/xsl/extract-qrcode.xsl +100 -100
  18. package/assets/xsl/extract-runestone-page-template.xsl +139 -139
  19. package/assets/xsl/extract-sageplot.xsl +166 -166
  20. package/assets/xsl/extract-stack.xsl +56 -56
  21. package/assets/xsl/extract-trace.xsl +134 -134
  22. package/assets/xsl/extract-youtube.xsl +63 -63
  23. package/assets/xsl/html-symbols.xsl +3344 -3344
  24. package/assets/xsl/latex/pretext-latex-AIM.xsl +56 -56
  25. package/assets/xsl/latex/pretext-latex-CLP.xsl +148 -148
  26. package/assets/xsl/latex/pretext-latex-chaos.xsl +317 -317
  27. package/assets/xsl/latex/pretext-latex-dyslexic-font.xsl +76 -76
  28. package/assets/xsl/latex/pretext-latex-guide.xsl +104 -104
  29. package/assets/xsl/latex/pretext-latex-texstyle.xsl +862 -862
  30. package/assets/xsl/localizations/README.md +0 -0
  31. package/assets/xsl/localizations/af-ZA.xml +276 -276
  32. package/assets/xsl/localizations/bg-BG.xml +276 -276
  33. package/assets/xsl/localizations/ca-ES.xml +285 -285
  34. package/assets/xsl/localizations/cs-CZ.xml +280 -280
  35. package/assets/xsl/localizations/de-DE.xml +281 -281
  36. package/assets/xsl/localizations/en-US.xml +427 -427
  37. package/assets/xsl/localizations/es-ES.xml +287 -287
  38. package/assets/xsl/localizations/fi-FI.xml +275 -275
  39. package/assets/xsl/localizations/fr-CA.xml +276 -276
  40. package/assets/xsl/localizations/fr-FR.xml +280 -280
  41. package/assets/xsl/localizations/hu-HU.xml +280 -280
  42. package/assets/xsl/localizations/it-IT.xml +276 -276
  43. package/assets/xsl/localizations/ku-CKB.xml +275 -275
  44. package/assets/xsl/localizations/localizations.xml +48 -48
  45. package/assets/xsl/localizations/nl-NL.xml +275 -275
  46. package/assets/xsl/localizations/pt-BR.xml +288 -288
  47. package/assets/xsl/localizations/pt-PT.xml +292 -292
  48. package/assets/xsl/localizations/zh-HANS.xml +269 -269
  49. package/assets/xsl/pretext-assembly.xsl +4795 -4795
  50. package/assets/xsl/pretext-basic-html.xsl +86 -86
  51. package/assets/xsl/pretext-beamer.xsl +662 -662
  52. package/assets/xsl/pretext-braille-preprint.xsl +2249 -2249
  53. package/assets/xsl/pretext-common.xsl +12018 -12018
  54. package/assets/xsl/pretext-dynamic.xsl +65 -65
  55. package/assets/xsl/pretext-epub.xsl +1483 -1483
  56. package/assets/xsl/pretext-fo.xsl +4593 -4593
  57. package/assets/xsl/pretext-html.xsl +14791 -14791
  58. package/assets/xsl/pretext-json-manifest.xsl +150 -150
  59. package/assets/xsl/pretext-jupyter.xsl +868 -868
  60. package/assets/xsl/pretext-latex-classic.xsl +952 -952
  61. package/assets/xsl/pretext-latex-common.xsl +11563 -11563
  62. package/assets/xsl/pretext-latex.xsl +47 -47
  63. package/assets/xsl/pretext-litprog.xsl +105 -105
  64. package/assets/xsl/pretext-merge.xsl +41 -41
  65. package/assets/xsl/pretext-numbers.xsl +875 -875
  66. package/assets/xsl/pretext-revealjs.xsl +522 -522
  67. package/assets/xsl/pretext-runestone-fitb.xsl +1233 -1233
  68. package/assets/xsl/pretext-runestone-static.xsl +1438 -1438
  69. package/assets/xsl/pretext-runestone.xsl +3083 -3083
  70. package/assets/xsl/pretext-sage-doctest.xsl +289 -289
  71. package/assets/xsl/pretext-smc.xsl +492 -492
  72. package/assets/xsl/pretext-solution-manual-latex.xsl +323 -323
  73. package/assets/xsl/pretext-text-utilities.xsl +1217 -1217
  74. package/assets/xsl/pretext-text.xsl +392 -392
  75. package/assets/xsl/pretext-units.xsl +195 -195
  76. package/assets/xsl/pretext-view-source.xsl +157 -157
  77. package/assets/xsl/pretext-ww-problem-sets.xsl +391 -391
  78. package/assets/xsl/publisher-variables.xsl +4756 -4756
  79. package/assets/xsl/support/README.md +0 -0
  80. package/assets/xsl/support/extract-math.xsl +256 -256
  81. package/assets/xsl/support/package-math.xsl +141 -141
  82. package/assets/xsl/support/play-button/README.md +0 -0
  83. package/assets/xsl/support/play-button/play-button.png +0 -0
  84. package/assets/xsl/support/play-button/play-button.svg +3 -3
  85. package/assets/xsl/support/pretext-pg-macros.xsl +110 -110
  86. package/assets/xsl/support/webpack_static_imports.xml +14 -14
  87. package/assets/xsl/tests/README.md +0 -0
  88. package/assets/xsl/tests/null.xml +3 -3
  89. package/assets/xsl/tests/pretext-text-utilities-test.xsl +333 -333
  90. package/assets/xsl/utilities/README.md +0 -0
  91. package/assets/xsl/utilities/author-report.xsl +107 -107
  92. package/assets/xsl/utilities/deprecate-autoname.sed +18 -18
  93. package/assets/xsl/utilities/deprecate-index.sed +33 -33
  94. package/assets/xsl/utilities/fix-deprecations.xsl +663 -663
  95. package/assets/xsl/utilities/pretext-enhanced-source.xsl +112 -112
  96. package/assets/xsl/utilities/report-publisher-variables.xsl +162 -162
  97. package/assets/xsl/xml-to-json.xsl +326 -326
  98. package/assets/xsl/xml-to-string.xsl +328 -328
  99. package/dist/{cli-C6tfAVvi.js → cli-BQizBK0N.js} +74 -72
  100. package/dist/cli.d.ts +0 -0
  101. package/dist/cli.js +1 -1
  102. package/dist/index.d.ts +2 -0
  103. package/dist/index.js +12 -6
  104. package/dist/mounts.d.ts +0 -0
  105. package/dist/publication.d.ts +0 -0
  106. package/dist/renderer.d.ts +10 -0
  107. package/dist/sourcemap.d.ts +0 -0
  108. package/dist/theme.d.ts +68 -0
  109. package/dist/theme.js +93 -0
  110. package/dist/xinclude.d.ts +0 -0
  111. package/package.json +14 -2
@@ -1,112 +1,112 @@
1
- <?xml version='1.0'?>
2
-
3
- <!--********************************************************************
4
- Copyright 2020 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
- *********************************************************************-->
21
-
22
- <xsl:stylesheet
23
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
24
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
25
- >
26
-
27
- <!-- This stylesheet should behave, without any errors, without -->
28
- <!-- importing the "pretext-common.xsl" stylesheet. Typically, -->
29
- <!-- in other uses of the two stylesheets above, we import -->
30
- <!-- "pretext-common.xsl" as well, which will include many -->
31
- <!-- "strip-space" directives, which will impact the assembled -->
32
- <!-- source (without any real harm, though, just different). -->
33
- <!-- In other words, the two (symbiotic) stylesheets used here -->
34
- <!-- should remain independent of the -common stylesheet. -->
35
- <!-- -->
36
- <!-- The "publisher-variables.xsl" and "pretext-assembly.xsl" -->
37
- <!-- stylesheets are symbiotic, and should be imported -->
38
- <!-- simultaneously. Assembly will change the source in various -->
39
- <!-- ways, while some defaults for publisher variables will depend -->
40
- <!-- on source. The default variables should depend on gross -->
41
- <!-- structure and adjustments should be to smaller portions of -->
42
- <!-- the source, but we don't take any chances. So, note in -->
43
- <!-- "assembly" that an intermediate tree is defined as a -->
44
- <!-- variable, which is then used in defining some variables, -->
45
- <!-- based on assembled source. Conversely, certain variables, -->
46
- <!-- such as locations of customizations or private solutions, -->
47
- <!-- are needed early in assembly, while other variables, such -->
48
- <!-- as options for numbering, are needed for later enhancements -->
49
- <!-- to the source. If new code results in undefine, or -->
50
- <!-- recursively defined, variables, this discussion may be -->
51
- <!-- relevant. (This is repeated verbatim in the other -->
52
- <!-- stylesheet). -->
53
-
54
- <xsl:import href="../publisher-variables.xsl"/>
55
- <xsl:import href="../pretext-assembly.xsl"/>
56
-
57
- <!-- Every conversion that imports "pretext-assembly.xsl" -->
58
- <!-- also imports "pretext-common.xsl". So we do likewise here, -->
59
- <!-- which brings in whitespace control via "strip-space" and -->
60
- <!-- templates (like "type-name") that assembly-time processing -->
61
- <!-- may depend on. -->
62
-
63
- <xsl:import href="../pretext-common.xsl"/>
64
-
65
- <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
66
-
67
- <!-- The "pretext-assembly.xsl" stylesheet is parameterized by a -->
68
- <!-- *variable* for what types of exercises to create - mostly -->
69
- <!-- static, but for HTML, interactive (dynamic). In this way -->
70
- <!-- importing stylesheets can set and override the variable as -->
71
- <!-- necessary, but it is a bit harder to set via string parameters-->
72
- <!-- in the usual ways. But for this utility, we want to run both -->
73
- <!-- modes. So we *do* have a parameter here, and it just becomes -->
74
- <!-- the value of the variable, as just described. Default if not -->
75
- <!-- set is "static", the alternative is "dynamic". -->
76
-
77
- <xsl:param name="debug.assembly.exercise" select="'static'"/>
78
- <xsl:variable name="exercise-style">
79
- <xsl:value-of select="$debug.assembly.exercise"/>
80
- </xsl:variable>
81
-
82
- <!-- ############## -->
83
- <!-- Entry Template -->
84
- <!-- ############## -->
85
-
86
- <!-- $root points to intermediate enhanced source created -->
87
- <!-- in the "pretext-assembly.xsl" stylesheet, so study that -->
88
- <!-- stylesheet to understand what it is being displayed. -->
89
- <!-- This stylesheet will be affected by whatever parameters -->
90
- <!-- and auxiliary files that the assembly stylesheet reacts to. -->
91
-
92
- <xsl:template match="/">
93
- <xsl:choose>
94
- <xsl:when test="$b-version-only">
95
- <xsl:apply-templates select="$version" mode="showme"/>
96
- </xsl:when>
97
- <xsl:when test="$b-assembly-id-only">
98
- <xsl:apply-templates select="$assembly-label" mode="showme"/>
99
- </xsl:when>
100
- <xsl:otherwise>
101
- <xsl:apply-templates select="$root" mode="showme"/>
102
- </xsl:otherwise>
103
- </xsl:choose>
104
- </xsl:template>
105
-
106
- <xsl:template match="node()|@*" mode="showme">
107
- <xsl:copy>
108
- <xsl:apply-templates select="node()|@*" mode="showme"/>
109
- </xsl:copy>
110
- </xsl:template>
111
-
112
- </xsl:stylesheet>
1
+ <?xml version='1.0'?>
2
+
3
+ <!--********************************************************************
4
+ Copyright 2020 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
+ *********************************************************************-->
21
+
22
+ <xsl:stylesheet
23
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
24
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
25
+ >
26
+
27
+ <!-- This stylesheet should behave, without any errors, without -->
28
+ <!-- importing the "pretext-common.xsl" stylesheet. Typically, -->
29
+ <!-- in other uses of the two stylesheets above, we import -->
30
+ <!-- "pretext-common.xsl" as well, which will include many -->
31
+ <!-- "strip-space" directives, which will impact the assembled -->
32
+ <!-- source (without any real harm, though, just different). -->
33
+ <!-- In other words, the two (symbiotic) stylesheets used here -->
34
+ <!-- should remain independent of the -common stylesheet. -->
35
+ <!-- -->
36
+ <!-- The "publisher-variables.xsl" and "pretext-assembly.xsl" -->
37
+ <!-- stylesheets are symbiotic, and should be imported -->
38
+ <!-- simultaneously. Assembly will change the source in various -->
39
+ <!-- ways, while some defaults for publisher variables will depend -->
40
+ <!-- on source. The default variables should depend on gross -->
41
+ <!-- structure and adjustments should be to smaller portions of -->
42
+ <!-- the source, but we don't take any chances. So, note in -->
43
+ <!-- "assembly" that an intermediate tree is defined as a -->
44
+ <!-- variable, which is then used in defining some variables, -->
45
+ <!-- based on assembled source. Conversely, certain variables, -->
46
+ <!-- such as locations of customizations or private solutions, -->
47
+ <!-- are needed early in assembly, while other variables, such -->
48
+ <!-- as options for numbering, are needed for later enhancements -->
49
+ <!-- to the source. If new code results in undefine, or -->
50
+ <!-- recursively defined, variables, this discussion may be -->
51
+ <!-- relevant. (This is repeated verbatim in the other -->
52
+ <!-- stylesheet). -->
53
+
54
+ <xsl:import href="../publisher-variables.xsl"/>
55
+ <xsl:import href="../pretext-assembly.xsl"/>
56
+
57
+ <!-- Every conversion that imports "pretext-assembly.xsl" -->
58
+ <!-- also imports "pretext-common.xsl". So we do likewise here, -->
59
+ <!-- which brings in whitespace control via "strip-space" and -->
60
+ <!-- templates (like "type-name") that assembly-time processing -->
61
+ <!-- may depend on. -->
62
+
63
+ <xsl:import href="../pretext-common.xsl"/>
64
+
65
+ <xsl:output method="xml" indent="yes" encoding="UTF-8"/>
66
+
67
+ <!-- The "pretext-assembly.xsl" stylesheet is parameterized by a -->
68
+ <!-- *variable* for what types of exercises to create - mostly -->
69
+ <!-- static, but for HTML, interactive (dynamic). In this way -->
70
+ <!-- importing stylesheets can set and override the variable as -->
71
+ <!-- necessary, but it is a bit harder to set via string parameters-->
72
+ <!-- in the usual ways. But for this utility, we want to run both -->
73
+ <!-- modes. So we *do* have a parameter here, and it just becomes -->
74
+ <!-- the value of the variable, as just described. Default if not -->
75
+ <!-- set is "static", the alternative is "dynamic". -->
76
+
77
+ <xsl:param name="debug.assembly.exercise" select="'static'"/>
78
+ <xsl:variable name="exercise-style">
79
+ <xsl:value-of select="$debug.assembly.exercise"/>
80
+ </xsl:variable>
81
+
82
+ <!-- ############## -->
83
+ <!-- Entry Template -->
84
+ <!-- ############## -->
85
+
86
+ <!-- $root points to intermediate enhanced source created -->
87
+ <!-- in the "pretext-assembly.xsl" stylesheet, so study that -->
88
+ <!-- stylesheet to understand what it is being displayed. -->
89
+ <!-- This stylesheet will be affected by whatever parameters -->
90
+ <!-- and auxiliary files that the assembly stylesheet reacts to. -->
91
+
92
+ <xsl:template match="/">
93
+ <xsl:choose>
94
+ <xsl:when test="$b-version-only">
95
+ <xsl:apply-templates select="$version" mode="showme"/>
96
+ </xsl:when>
97
+ <xsl:when test="$b-assembly-id-only">
98
+ <xsl:apply-templates select="$assembly-label" mode="showme"/>
99
+ </xsl:when>
100
+ <xsl:otherwise>
101
+ <xsl:apply-templates select="$root" mode="showme"/>
102
+ </xsl:otherwise>
103
+ </xsl:choose>
104
+ </xsl:template>
105
+
106
+ <xsl:template match="node()|@*" mode="showme">
107
+ <xsl:copy>
108
+ <xsl:apply-templates select="node()|@*" mode="showme"/>
109
+ </xsl:copy>
110
+ </xsl:template>
111
+
112
+ </xsl:stylesheet>
@@ -1,162 +1,162 @@
1
- <?xml version='1.0'?> <!-- As XML file -->
2
-
3
- <!--********************************************************************
4
- Copyright 2013 Robert A. Beezer
5
-
6
- This file is part of MathBook XML.
7
-
8
- MathBook XML 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
- MathBook XML 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 MathBook XML. If not, see <http://www.gnu.org/licenses/>.
20
- *********************************************************************-->
21
-
22
- <!-- http://pimpmyxslt.com/articles/entity-tricks-part2/ -->
23
- <!DOCTYPE xsl:stylesheet [
24
- <!ENTITY % entities SYSTEM "../entities.ent">
25
- %entities;
26
- ]>
27
-
28
- <!-- Identify as a stylesheet -->
29
- <!-- We choose to not include a default namespace -->
30
- <!-- (in particular http://www.w3.org/1999/xhtml), -->
31
- <!-- even if this complicates adding namespaces onto -->
32
- <!-- derivatives, such as HTML destined for EPUB output -->
33
- <!-- xmlns="http://www.w3.org/1999/xhtml" -->
34
- <!-- -->
35
- <!-- NB: -->
36
- <!-- "xsl" is necessary to identify XSL functionality -->
37
- <!-- "xml" is automatic, hence redundant -->
38
- <!-- "svg" is necessary to for Asymptote 3D images -->
39
- <!-- "pi" is meant to mark private PreTeXt markup -->
40
- <!-- "exsl" namespaces enable extension functions -->
41
- <!-- -->
42
- <!-- Excluding result prefixes keeps them from bleeding -->
43
- <!-- into output unnecessarily -->
44
- <xsl:stylesheet
45
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
46
- >
47
-
48
- <!-- DEBUGGING -->
49
- <!-- xsltproc -o crap.txt -stringparam publisher ~/mathbook/mathbook/examples/sample-article/publication.xml /home/rob/mathbook/mathbook/xsl/utilities/report-publisher-variables.xsl ~/mathbook/mathbook/examples/sample-article/sample-article.xml -->
50
-
51
- <!-- Standard conversion groundwork -->
52
- <xsl:import href="../publisher-variables.xsl"/>
53
- <xsl:import href="../pretext-assembly.xsl"/>
54
-
55
- <!-- Intend output for a text file -->
56
- <xsl:output method="text" encoding="UTF-8"/>
57
-
58
- <!-- IMPORTANT: to report the value of a (computed) publisher variable, -->
59
- <!-- two related routines are involved. For a variable not previously -->
60
- <!-- supported, a developer must take action to implement a report. The -->
61
- <!-- XSL in the "utilities/report-publisher-variable.xsl" stylesheet must -->
62
- <!-- include the report of a value, which will be captured in a temporary -->
63
- <!-- file to be read by the Python routine "get_publisher_variable()". -->
64
-
65
- <xsl:template match="/">
66
- <!-- 2024-06-20 Testing-->
67
- <xsl:text>generated-directory-source</xsl:text>
68
- <xsl:text> </xsl:text>
69
- <xsl:value-of select="$generated-directory-source"/>
70
- <xsl:text>&#xa;</xsl:text>
71
- <!-- 2024-06-20 Testing-->
72
- <xsl:text>external-directory-source</xsl:text>
73
- <xsl:text> </xsl:text>
74
- <xsl:value-of select="$external-directory-source"/>
75
- <xsl:text>&#xa;</xsl:text>
76
- <!-- 2024-06-26 Mermaid theme -->
77
- <xsl:text>mermaid-theme</xsl:text>
78
- <xsl:text> </xsl:text>
79
- <xsl:value-of select="$mermaid-theme"/>
80
- <xsl:text>&#xa;</xsl:text>
81
- <!-- 2024-07-07 QR code image -->
82
- <xsl:text>qrcode-image</xsl:text>
83
- <xsl:text> </xsl:text>
84
- <xsl:value-of select="$qrcode-image"/>
85
- <xsl:text>&#xa;</xsl:text>
86
- <!-- 2024-07-21 theme for html build -->
87
- <xsl:text>html-theme-name</xsl:text>
88
- <xsl:text> </xsl:text>
89
- <xsl:value-of select="$html-theme-name"/>
90
- <xsl:text>&#xa;</xsl:text>
91
- <xsl:text>html-theme-options</xsl:text>
92
- <xsl:text> </xsl:text>
93
- <xsl:value-of select="$html-theme-options"/>
94
- <xsl:text>&#xa;</xsl:text>
95
- <!-- 2024-10-04 LaTeX style xsl -->
96
- <xsl:text>latex-style</xsl:text>
97
- <xsl:text> </xsl:text>
98
- <xsl:value-of select="$latex-style"/>
99
- <xsl:text>&#xa;</xsl:text>
100
- <!-- 2025-02-25 journal name -->
101
- <xsl:text>journal-name</xsl:text>
102
- <xsl:text> </xsl:text>
103
- <xsl:value-of select="$journal-name"/>
104
- <xsl:text>&#xa;</xsl:text>
105
- <!-- 2025-03-10 portable html switch -->
106
- <xsl:text>portable-html</xsl:text>
107
- <xsl:text> </xsl:text>
108
- <xsl:value-of select="$portable-html"/>
109
- <xsl:text>&#xa;</xsl:text>
110
- <!-- 2026-06-30 local/cdn resources -->
111
- <xsl:text>b-cdn-resources</xsl:text>
112
- <xsl:text> </xsl:text>
113
- <xsl:value-of select="$b-cdn-resources"/>
114
- <xsl:text>&#xa;</xsl:text>
115
- <!-- 2025-05-10 CSL style indicator -->
116
- <xsl:text>b-using-csl-styles</xsl:text>
117
- <xsl:text> </xsl:text>
118
- <xsl:value-of select="$b-using-csl-styles"/>
119
- <xsl:text>&#xa;</xsl:text>
120
- <!-- 2025-05-10 CSL style filename -->
121
- <xsl:text>csl-style-file</xsl:text>
122
- <xsl:text> </xsl:text>
123
- <xsl:value-of select="$csl-style-file"/>
124
- <xsl:text>&#xa;</xsl:text>
125
- <!-- 2025-06-26 Mermaid layout engine -->
126
- <xsl:text>mermaid-layout-engine</xsl:text>
127
- <xsl:text> </xsl:text>
128
- <xsl:value-of select="$mermaid-layout-engine"/>
129
- <xsl:text>&#xa;</xsl:text>
130
- <!-- 2025-09-18 Server to call for STACK question rendering -->
131
- <xsl:text>stack-server</xsl:text>
132
- <xsl:text> </xsl:text>
133
- <xsl:value-of select="$stack-server"/>
134
- <xsl:text>&#xa;</xsl:text>
135
- <!-- 2026-02-16 Base URL that interactives -->
136
- <xsl:text>baseurl</xsl:text>
137
- <xsl:text> </xsl:text>
138
- <xsl:value-of select="$baseurl"/>
139
- <xsl:text>&#xa;</xsl:text>
140
- <!-- 2026-06-25 platform host for html -->
141
- <xsl:text>host-platform</xsl:text>
142
- <xsl:text> </xsl:text>
143
- <xsl:value-of select="$host-platform"/>
144
- <xsl:text>&#xa;</xsl:text>
145
- <!-- -->
146
-
147
- <!--
148
- Boilerplate to support a new variable
149
- Please use this style, as above
150
- (remove "X" to format comments properly)
151
-
152
- <!-X- YYY-MM-DD Purpose-X->
153
- <xsl:text>[[var-name-here]]</xsl:text>
154
- <xsl:text> </xsl:text>
155
- <xsl:value-of select="$[[var-name-here-keep-prefix-$]]"/>
156
- <xsl:text>&#xa;</xsl:text>
157
- <!-X- -X->
158
- -->
159
-
160
- </xsl:template>
161
-
162
- </xsl:stylesheet>
1
+ <?xml version='1.0'?> <!-- As XML file -->
2
+
3
+ <!--********************************************************************
4
+ Copyright 2013 Robert A. Beezer
5
+
6
+ This file is part of MathBook XML.
7
+
8
+ MathBook XML 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
+ MathBook XML 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 MathBook XML. If not, see <http://www.gnu.org/licenses/>.
20
+ *********************************************************************-->
21
+
22
+ <!-- http://pimpmyxslt.com/articles/entity-tricks-part2/ -->
23
+ <!DOCTYPE xsl:stylesheet [
24
+ <!ENTITY % entities SYSTEM "../entities.ent">
25
+ %entities;
26
+ ]>
27
+
28
+ <!-- Identify as a stylesheet -->
29
+ <!-- We choose to not include a default namespace -->
30
+ <!-- (in particular http://www.w3.org/1999/xhtml), -->
31
+ <!-- even if this complicates adding namespaces onto -->
32
+ <!-- derivatives, such as HTML destined for EPUB output -->
33
+ <!-- xmlns="http://www.w3.org/1999/xhtml" -->
34
+ <!-- -->
35
+ <!-- NB: -->
36
+ <!-- "xsl" is necessary to identify XSL functionality -->
37
+ <!-- "xml" is automatic, hence redundant -->
38
+ <!-- "svg" is necessary to for Asymptote 3D images -->
39
+ <!-- "pi" is meant to mark private PreTeXt markup -->
40
+ <!-- "exsl" namespaces enable extension functions -->
41
+ <!-- -->
42
+ <!-- Excluding result prefixes keeps them from bleeding -->
43
+ <!-- into output unnecessarily -->
44
+ <xsl:stylesheet
45
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
46
+ >
47
+
48
+ <!-- DEBUGGING -->
49
+ <!-- xsltproc -o crap.txt -stringparam publisher ~/mathbook/mathbook/examples/sample-article/publication.xml /home/rob/mathbook/mathbook/xsl/utilities/report-publisher-variables.xsl ~/mathbook/mathbook/examples/sample-article/sample-article.xml -->
50
+
51
+ <!-- Standard conversion groundwork -->
52
+ <xsl:import href="../publisher-variables.xsl"/>
53
+ <xsl:import href="../pretext-assembly.xsl"/>
54
+
55
+ <!-- Intend output for a text file -->
56
+ <xsl:output method="text" encoding="UTF-8"/>
57
+
58
+ <!-- IMPORTANT: to report the value of a (computed) publisher variable, -->
59
+ <!-- two related routines are involved. For a variable not previously -->
60
+ <!-- supported, a developer must take action to implement a report. The -->
61
+ <!-- XSL in the "utilities/report-publisher-variable.xsl" stylesheet must -->
62
+ <!-- include the report of a value, which will be captured in a temporary -->
63
+ <!-- file to be read by the Python routine "get_publisher_variable()". -->
64
+
65
+ <xsl:template match="/">
66
+ <!-- 2024-06-20 Testing-->
67
+ <xsl:text>generated-directory-source</xsl:text>
68
+ <xsl:text> </xsl:text>
69
+ <xsl:value-of select="$generated-directory-source"/>
70
+ <xsl:text>&#xa;</xsl:text>
71
+ <!-- 2024-06-20 Testing-->
72
+ <xsl:text>external-directory-source</xsl:text>
73
+ <xsl:text> </xsl:text>
74
+ <xsl:value-of select="$external-directory-source"/>
75
+ <xsl:text>&#xa;</xsl:text>
76
+ <!-- 2024-06-26 Mermaid theme -->
77
+ <xsl:text>mermaid-theme</xsl:text>
78
+ <xsl:text> </xsl:text>
79
+ <xsl:value-of select="$mermaid-theme"/>
80
+ <xsl:text>&#xa;</xsl:text>
81
+ <!-- 2024-07-07 QR code image -->
82
+ <xsl:text>qrcode-image</xsl:text>
83
+ <xsl:text> </xsl:text>
84
+ <xsl:value-of select="$qrcode-image"/>
85
+ <xsl:text>&#xa;</xsl:text>
86
+ <!-- 2024-07-21 theme for html build -->
87
+ <xsl:text>html-theme-name</xsl:text>
88
+ <xsl:text> </xsl:text>
89
+ <xsl:value-of select="$html-theme-name"/>
90
+ <xsl:text>&#xa;</xsl:text>
91
+ <xsl:text>html-theme-options</xsl:text>
92
+ <xsl:text> </xsl:text>
93
+ <xsl:value-of select="$html-theme-options"/>
94
+ <xsl:text>&#xa;</xsl:text>
95
+ <!-- 2024-10-04 LaTeX style xsl -->
96
+ <xsl:text>latex-style</xsl:text>
97
+ <xsl:text> </xsl:text>
98
+ <xsl:value-of select="$latex-style"/>
99
+ <xsl:text>&#xa;</xsl:text>
100
+ <!-- 2025-02-25 journal name -->
101
+ <xsl:text>journal-name</xsl:text>
102
+ <xsl:text> </xsl:text>
103
+ <xsl:value-of select="$journal-name"/>
104
+ <xsl:text>&#xa;</xsl:text>
105
+ <!-- 2025-03-10 portable html switch -->
106
+ <xsl:text>portable-html</xsl:text>
107
+ <xsl:text> </xsl:text>
108
+ <xsl:value-of select="$portable-html"/>
109
+ <xsl:text>&#xa;</xsl:text>
110
+ <!-- 2026-06-30 local/cdn resources -->
111
+ <xsl:text>b-cdn-resources</xsl:text>
112
+ <xsl:text> </xsl:text>
113
+ <xsl:value-of select="$b-cdn-resources"/>
114
+ <xsl:text>&#xa;</xsl:text>
115
+ <!-- 2025-05-10 CSL style indicator -->
116
+ <xsl:text>b-using-csl-styles</xsl:text>
117
+ <xsl:text> </xsl:text>
118
+ <xsl:value-of select="$b-using-csl-styles"/>
119
+ <xsl:text>&#xa;</xsl:text>
120
+ <!-- 2025-05-10 CSL style filename -->
121
+ <xsl:text>csl-style-file</xsl:text>
122
+ <xsl:text> </xsl:text>
123
+ <xsl:value-of select="$csl-style-file"/>
124
+ <xsl:text>&#xa;</xsl:text>
125
+ <!-- 2025-06-26 Mermaid layout engine -->
126
+ <xsl:text>mermaid-layout-engine</xsl:text>
127
+ <xsl:text> </xsl:text>
128
+ <xsl:value-of select="$mermaid-layout-engine"/>
129
+ <xsl:text>&#xa;</xsl:text>
130
+ <!-- 2025-09-18 Server to call for STACK question rendering -->
131
+ <xsl:text>stack-server</xsl:text>
132
+ <xsl:text> </xsl:text>
133
+ <xsl:value-of select="$stack-server"/>
134
+ <xsl:text>&#xa;</xsl:text>
135
+ <!-- 2026-02-16 Base URL that interactives -->
136
+ <xsl:text>baseurl</xsl:text>
137
+ <xsl:text> </xsl:text>
138
+ <xsl:value-of select="$baseurl"/>
139
+ <xsl:text>&#xa;</xsl:text>
140
+ <!-- 2026-06-25 platform host for html -->
141
+ <xsl:text>host-platform</xsl:text>
142
+ <xsl:text> </xsl:text>
143
+ <xsl:value-of select="$host-platform"/>
144
+ <xsl:text>&#xa;</xsl:text>
145
+ <!-- -->
146
+
147
+ <!--
148
+ Boilerplate to support a new variable
149
+ Please use this style, as above
150
+ (remove "X" to format comments properly)
151
+
152
+ <!-X- YYY-MM-DD Purpose-X->
153
+ <xsl:text>[[var-name-here]]</xsl:text>
154
+ <xsl:text> </xsl:text>
155
+ <xsl:value-of select="$[[var-name-here-keep-prefix-$]]"/>
156
+ <xsl:text>&#xa;</xsl:text>
157
+ <!-X- -X->
158
+ -->
159
+
160
+ </xsl:template>
161
+
162
+ </xsl:stylesheet>