@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
package/README.md
CHANGED
|
@@ -84,6 +84,12 @@ const { html } = await renderHtml({
|
|
|
84
84
|
~100ms–1s per render depending on document size).
|
|
85
85
|
- `theme: "dark" | "light" | "system"` makes the preview follow the embedding
|
|
86
86
|
app's light/dark theme (see [Theme control](#theme-control)).
|
|
87
|
+
- Born-hidden knowls — solutions, hints, answers, and any block the publication
|
|
88
|
+
file elects to hide — are rendered **expanded**, because these pages are
|
|
89
|
+
previews: an author editing a solution would otherwise watch it collapse on
|
|
90
|
+
every re-render. Other `<details>` (footnotes, image descriptions) are left
|
|
91
|
+
alone. Pass `openKnowls: false` (`--no-open-knowls` on the CLI) for the
|
|
92
|
+
collapsed reading experience of a real `pretext build`.
|
|
87
93
|
|
|
88
94
|
### API (browser)
|
|
89
95
|
|
package/assets/preview-html.xsl
CHANGED
|
@@ -210,6 +210,20 @@
|
|
|
210
210
|
|
|
211
211
|
</xsl:template>
|
|
212
212
|
|
|
213
|
+
<!-- Show the print-preview button on printouts, but inert: the page it would -->
|
|
214
|
+
<!-- reload with "?printpreview=<id>" does not exist for an in-memory render, -->
|
|
215
|
+
<!-- and a host that resolves that query against its own URL sends the reader -->
|
|
216
|
+
<!-- somewhere unrelated. See PRINTOUT_LINK_OVERRIDE in refresh-xsl.mjs. -->
|
|
217
|
+
<xsl:template match="*" mode="standalone-printout-links">
|
|
218
|
+
<div class="print-links">
|
|
219
|
+
<a class="print-link" style="opacity:0.45;cursor:default" aria-disabled="true" title="Print preview is not available in the live preview">
|
|
220
|
+
<xsl:call-template name="insert-symbol">
|
|
221
|
+
<xsl:with-param name="name" select="'print'"/>
|
|
222
|
+
</xsl:call-template>
|
|
223
|
+
</a>
|
|
224
|
+
</div>
|
|
225
|
+
</xsl:template>
|
|
226
|
+
|
|
213
227
|
<!-- Stub out the remaining file writers (every other template reachable -->
|
|
214
228
|
<!-- from pretext-html.xsl that contains exsl:document). Under portable- -->
|
|
215
229
|
<!-- html several of these are already suppressed; the stubs cover the -->
|
package/assets/upstream.json
CHANGED
package/assets/xsl/README.md
CHANGED
|
@@ -1,32 +1,50 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
<!--********************************************************************
|
|
2
|
+
Copyright (C) 2019-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
|
+
|
|
20
|
+
# eXtensible Stylesheet Language (XSL) Stylesheets
|
|
3
21
|
|
|
4
22
|
XSL stylesheets are the primary vehicle for converting PreTeXt XML
|
|
5
|
-
source into various output formats.
|
|
6
|
-
simply called "conversions."
|
|
7
|
-
conversions, the list is not exhaustive.
|
|
23
|
+
source into various output formats. As such, they are sometimes
|
|
24
|
+
simply called "conversions." Here we list **some** of the available
|
|
25
|
+
conversions, the list is not exhaustive. See _The PreTeXt Guide_
|
|
8
26
|
for detailed documentation of use, in chapters of the part
|
|
9
27
|
titled _Publisher's Guide_.
|
|
10
28
|
|
|
11
|
-
|
|
12
|
-
be converted to PDF, in print or electronic flavors.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
requires significant additional processing.
|
|
16
|
-
is not meant to be applied in isolation.
|
|
17
|
-
Python script for an option to initiate the processing pipeline.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
requires significant further processing.
|
|
23
|
-
is not meant to be applied in isolation.
|
|
24
|
-
Python script for an option to initiate the processing pipeline.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
enhanced version of source.
|
|
28
|
-
See the `utilities\pretext-enhanced-source.xsl` stylesheet for a demonstration.
|
|
29
|
-
|
|
30
|
-
document, typically for subsequent processing by a script.
|
|
29
|
+
- `pretext-latex.xsl` - conversion to LaTeX, which can then
|
|
30
|
+
be converted to PDF, in print or electronic flavors.
|
|
31
|
+
- `pretext-html.xsl` - conversion to HTML for online use.
|
|
32
|
+
- `pretext-epub.xsl` - conversion to EPUB, which
|
|
33
|
+
requires significant additional processing. So this stylesheet
|
|
34
|
+
is not meant to be applied in isolation. See the `pretext/pretext`
|
|
35
|
+
Python script for an option to initiate the processing pipeline.
|
|
36
|
+
- `pretext-jupyter.xsl` - conversion to Jupyter notebooks.
|
|
37
|
+
- `pretext-revealjs.xsl` - conversion of slideshows to HTML.
|
|
38
|
+
- `pretext-beamer.xsl` - conversion of slideshows to PDF.
|
|
39
|
+
- `pretext-braille.xsl` - conversion to a precursor for braille output, which
|
|
40
|
+
requires significant further processing. So this stylesheet
|
|
41
|
+
is not meant to be applied in isolation. See the `pretext/pretext`
|
|
42
|
+
Python script for an option to initiate the processing pipeline.
|
|
43
|
+
- `pretext-common.xsl` - base templates, and not useful in isolation.
|
|
44
|
+
- `pretext-assembly.xsl` - pre-processing stylesheet, which creates an
|
|
45
|
+
enhanced version of source. Applied in a controlled way by other stylesheets.
|
|
46
|
+
See the `utilities\pretext-enhanced-source.xsl` stylesheet for a demonstration.
|
|
47
|
+
- `extract-*.xsl` - used to isolate particular parts of a PreTeXt
|
|
48
|
+
document, typically for subsequent processing by a script.
|
|
31
49
|
|
|
32
50
|
(Updated: 2020-06-12)
|
package/assets/xsl/entities.ent
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
<!-- Copyright 2016 -->
|
|
3
3
|
<!-- Robert A. Beezer -->
|
|
4
4
|
<!-- -->
|
|
5
|
-
<!-- This file is part of
|
|
5
|
+
<!-- This file is part of PreTeXt. -->
|
|
6
6
|
<!-- -->
|
|
7
|
-
<!--
|
|
7
|
+
<!-- PreTeXt is free software: you can redistribute it and/or modify -->
|
|
8
8
|
<!-- it under the terms of the GNU General Public License as published by -->
|
|
9
9
|
<!-- the Free Software Foundation, either version 2 or version 3 of the -->
|
|
10
10
|
<!-- License (at your option). -->
|
|
11
11
|
<!-- -->
|
|
12
|
-
<!--
|
|
12
|
+
<!-- PreTeXt is distributed in the hope that it will be useful, -->
|
|
13
13
|
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
|
|
14
14
|
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
|
|
15
15
|
<!-- GNU General Public License for more details. -->
|
|
16
16
|
<!-- -->
|
|
17
17
|
<!-- You should have received a copy of the GNU General Public License -->
|
|
18
|
-
<!-- along with
|
|
18
|
+
<!-- along with PreTeXt. If not, see <http://www.gnu.org/licenses/>. -->
|
|
19
19
|
<!-- ********************************************************************* -->
|
|
20
20
|
|
|
21
21
|
<!-- XSLT Cookbook, 2nd Edition -->
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2014-
|
|
4
|
+
Copyright (C) 2014-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
|
<!-- This stylesheet locates <asymptote> elements -->
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2014-
|
|
4
|
+
Copyright (C) 2014-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
|
<!-- This stylesheet does nothing but traverse the tree -->
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2014-
|
|
4
|
+
Copyright (C) 2014-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
|
<!-- This stylesheet locates <latex-image> elements -->
|
|
@@ -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
|
<!-- This stylesheet locates video/@youtube elements and -->
|
|
@@ -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. -->
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2014-
|
|
4
|
+
Copyright (C) 2014-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
|
<!-- This stylesheet locates <prefigure> elements and copies them for processing -->
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2014-
|
|
4
|
+
Copyright (C) 2014-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
|
<!-- This stylesheet locates <sageplot> elements -->
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<?xml version='1.0'?>
|
|
2
2
|
|
|
3
3
|
<!--********************************************************************
|
|
4
|
-
Copyright 2014-
|
|
4
|
+
Copyright (C) 2014-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
|
<!-- This stylesheet locates video/@youtube elements and -->
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!--********************************************************************
|
|
2
|
-
Copyright 2013-
|
|
2
|
+
Copyright (C) 2013-2026 Robert A. Beezer
|
|
3
3
|
|
|
4
4
|
This file is part of PreTeXt.
|
|
5
5
|
|
|
@@ -17,10 +17,9 @@ You should have received a copy of the GNU General Public License
|
|
|
17
17
|
along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
18
18
|
*********************************************************************-->
|
|
19
19
|
|
|
20
|
-
PreTeXt Localizations
|
|
21
|
-
=====================
|
|
20
|
+
# PreTeXt Localizations
|
|
22
21
|
|
|
23
|
-
Each file in this directory provides translations of various strings used in titles and headings (and other places) to a specific language.
|
|
22
|
+
Each file in this directory provides translations of various strings used in titles and headings (and other places) to a specific language. Filenames reflect the code for language (lowercase) and then the code for the region (uppercase). This is a requirement.
|
|
24
23
|
|
|
25
24
|
For each file of translations, the "language" attribute of the "locale" element used to reference the language code and the "string-id" of each "localization" element is the lookup key. Element content is the language-specific string. The English version ("en-US") is carefully documented, so additions of new languages do not necessarily require new documentation, though it could help other implementers. See `xsl/pretext-common.xsl` for the two routines which make use of this information, one is a named template and the other (largely) uses the name of an element as the string-id.
|
|
26
25
|
|
|
@@ -28,29 +27,30 @@ Some items peculiar to LaTeX are explained [here](http://www.tex.ac.uk/cgi-bin/t
|
|
|
28
27
|
|
|
29
28
|
There is a [general overview of language tags](http://www.w3.org/International/articles/language-tags/) and the [Subtag Registry](http://www.iana.org/assignments/language-subtag-registry/language-subtag-registry).
|
|
30
29
|
|
|
31
|
-
Contibutions of new languages are always welcome and especially encouraged! Search on "Translation needed" to see where you can help. Use the
|
|
30
|
+
Contibutions of new languages are always welcome and especially encouraged! Search on "Translation needed" to see where you can help. Use the en-US file as a template for a new language file, since it is always most complete. It is understood that certain English words and phrases have subtleties that can be very hard to capture in another language. Do your best to concoct a close approximation -- something should be better than nothing. And it might improve with additions from others later. We try to address some of this in the en-US file, so do be certain to look there for explanations of how these strings are employed. Comments about your own decisions, within the relevant language file, can be very helpful later.
|
|
32
31
|
|
|
33
|
-
NEW LANGUAGES: for a new file to be effective, a single line needs to be added to the `xsl/localizations/localizations.xml` file.
|
|
32
|
+
NEW LANGUAGES: for a new file to be effective, a single line needs to be added to the `xsl/localizations/localizations.xml` file. It should be obvious what to do by looking at the other lines of that file. If you create a new file, please include a "commented-out" line for any words you do not translate, and please use the **exact** style of commenting as elsewhere (one line per comment, indented). Including these, and using teh same style, greatly aids in maintenance and reliability.
|
|
34
33
|
|
|
35
|
-
Additions to incomplete files, or new files for additional languages, are very welcome and are a huge help in making PreTeXt useable for more authors.
|
|
34
|
+
Additions to incomplete files, or new files for additional languages, are very welcome and are a huge help in making PreTeXt useable for more authors. A GitHub pull request is preferable. If you do not know GitHub well, then emailing the entire language file (as an attachment) is very welcome and just as easy to deal with on our end. Please respect the order in the en-US file, it saves us time when we add new terms to each and every file. Thanks.
|
|
36
35
|
|
|
37
|
-
To test, or use: place
|
|
36
|
+
To test, or use: place `xml:lang="es-ES"`, or similar, as an attribute on your `<pretext>` element. `en-US` is the default if no `@xml:lang` attribute is given on the `pretext` element.
|
|
38
37
|
|
|
39
38
|
Current (partially) implemented language codes and contributors
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
39
|
+
|
|
40
|
+
- af-ZA, Afrikaans (South Africa), Dirk Basson
|
|
41
|
+
- bg-BG, Bulgarian (Bulgaria), Boyko Bantchev
|
|
42
|
+
- ca-ES, Catalan (Spain), Jordi Saludes
|
|
43
|
+
- cs-CZ, Czech (Czechia), Jiří Lebl
|
|
44
|
+
- de-DE, German (Germany), Karl-Dieter Crisman
|
|
45
|
+
- es-ES, Spanish (Spain), Juan José Torrens
|
|
46
|
+
- en-US, English (United States), Robert A. Beezer
|
|
47
|
+
- fi-FI, Finnish (Finland), Lasse M. Manninen
|
|
48
|
+
- fr-CA, French (Canada), Jean-Sébastien Turcotte
|
|
49
|
+
- fr-FR, French (France), Thomas W. Judson, Julien Giol, Jean-Sébastien Turcotte
|
|
50
|
+
- hu-HU, Hungarian (Hungary), Sándor Czirbusz
|
|
51
|
+
- it-IT, Italian (Italy), Valerio Monti
|
|
52
|
+
- ku-CKB, Rebin Muhammad, Kurdish (Central Kurdish)
|
|
53
|
+
- nl-NL, Dutch (Netherlands), Gosia Wrzesinska
|
|
54
|
+
- pt-BR, Portugese (Brazil), Igor Morgado, Vinicius Monego, Leon Silva
|
|
55
|
+
- pt-PT, Portugese (Portugal), António Pereira
|
|
56
|
+
- zh-HANS, Chinese Simplified (China), Hongqi Wang
|