@pretextbook/pretext-html 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/README.md +104 -4
  2. package/assets/preview-html.xsl +230 -230
  3. package/assets/upstream.json +7 -7
  4. package/assets/xsl/entities.ent +154 -154
  5. package/assets/xsl/extract-asymptote.xsl +68 -68
  6. package/assets/xsl/extract-biblio-csl.xsl +327 -327
  7. package/assets/xsl/extract-datafile.xsl +71 -71
  8. package/assets/xsl/extract-dynamic.xsl +139 -139
  9. package/assets/xsl/extract-identity.xsl +136 -136
  10. package/assets/xsl/extract-interactive.xsl +81 -81
  11. package/assets/xsl/extract-latex-image.xsl +118 -118
  12. package/assets/xsl/extract-mermaid.xsl +58 -58
  13. package/assets/xsl/extract-mom.xsl +63 -63
  14. package/assets/xsl/extract-pg.xsl +2897 -2897
  15. package/assets/xsl/extract-prefigure.xsl +157 -157
  16. package/assets/xsl/extract-qrcode.xsl +100 -100
  17. package/assets/xsl/extract-runestone-page-template.xsl +139 -139
  18. package/assets/xsl/extract-sageplot.xsl +166 -166
  19. package/assets/xsl/extract-stack.xsl +56 -56
  20. package/assets/xsl/extract-trace.xsl +134 -134
  21. package/assets/xsl/extract-youtube.xsl +63 -63
  22. package/assets/xsl/html-symbols.xsl +3344 -3344
  23. package/assets/xsl/latex/pretext-latex-AIM.xsl +56 -56
  24. package/assets/xsl/latex/pretext-latex-CLP.xsl +148 -148
  25. package/assets/xsl/latex/pretext-latex-chaos.xsl +317 -317
  26. package/assets/xsl/latex/pretext-latex-dyslexic-font.xsl +76 -76
  27. package/assets/xsl/latex/pretext-latex-guide.xsl +104 -104
  28. package/assets/xsl/latex/pretext-latex-texstyle.xsl +862 -862
  29. package/assets/xsl/localizations/af-ZA.xml +276 -276
  30. package/assets/xsl/localizations/bg-BG.xml +276 -276
  31. package/assets/xsl/localizations/ca-ES.xml +285 -285
  32. package/assets/xsl/localizations/cs-CZ.xml +280 -280
  33. package/assets/xsl/localizations/de-DE.xml +281 -281
  34. package/assets/xsl/localizations/en-US.xml +427 -427
  35. package/assets/xsl/localizations/es-ES.xml +287 -287
  36. package/assets/xsl/localizations/fi-FI.xml +275 -275
  37. package/assets/xsl/localizations/fr-CA.xml +276 -276
  38. package/assets/xsl/localizations/fr-FR.xml +280 -280
  39. package/assets/xsl/localizations/hu-HU.xml +280 -280
  40. package/assets/xsl/localizations/it-IT.xml +276 -276
  41. package/assets/xsl/localizations/ku-CKB.xml +275 -275
  42. package/assets/xsl/localizations/localizations.xml +48 -48
  43. package/assets/xsl/localizations/nl-NL.xml +275 -275
  44. package/assets/xsl/localizations/pt-BR.xml +288 -288
  45. package/assets/xsl/localizations/pt-PT.xml +292 -292
  46. package/assets/xsl/localizations/zh-HANS.xml +269 -269
  47. package/assets/xsl/pretext-assembly.xsl +4795 -4795
  48. package/assets/xsl/pretext-basic-html.xsl +86 -86
  49. package/assets/xsl/pretext-beamer.xsl +662 -662
  50. package/assets/xsl/pretext-braille-preprint.xsl +2249 -2249
  51. package/assets/xsl/pretext-common.xsl +12018 -12018
  52. package/assets/xsl/pretext-dynamic.xsl +65 -65
  53. package/assets/xsl/pretext-epub.xsl +1483 -1483
  54. package/assets/xsl/pretext-fo.xsl +4593 -4593
  55. package/assets/xsl/pretext-html.xsl +14791 -14791
  56. package/assets/xsl/pretext-json-manifest.xsl +150 -150
  57. package/assets/xsl/pretext-jupyter.xsl +868 -868
  58. package/assets/xsl/pretext-latex-classic.xsl +952 -952
  59. package/assets/xsl/pretext-latex-common.xsl +11563 -11563
  60. package/assets/xsl/pretext-latex.xsl +47 -47
  61. package/assets/xsl/pretext-litprog.xsl +105 -105
  62. package/assets/xsl/pretext-merge.xsl +41 -41
  63. package/assets/xsl/pretext-numbers.xsl +875 -875
  64. package/assets/xsl/pretext-revealjs.xsl +522 -522
  65. package/assets/xsl/pretext-runestone-fitb.xsl +1233 -1233
  66. package/assets/xsl/pretext-runestone-static.xsl +1438 -1438
  67. package/assets/xsl/pretext-runestone.xsl +3083 -3083
  68. package/assets/xsl/pretext-sage-doctest.xsl +289 -289
  69. package/assets/xsl/pretext-smc.xsl +492 -492
  70. package/assets/xsl/pretext-solution-manual-latex.xsl +323 -323
  71. package/assets/xsl/pretext-text-utilities.xsl +1217 -1217
  72. package/assets/xsl/pretext-text.xsl +392 -392
  73. package/assets/xsl/pretext-units.xsl +195 -195
  74. package/assets/xsl/pretext-view-source.xsl +157 -157
  75. package/assets/xsl/pretext-ww-problem-sets.xsl +391 -391
  76. package/assets/xsl/publisher-variables.xsl +4756 -4756
  77. package/assets/xsl/support/extract-math.xsl +256 -256
  78. package/assets/xsl/support/package-math.xsl +141 -141
  79. package/assets/xsl/support/play-button/play-button.svg +3 -3
  80. package/assets/xsl/support/pretext-pg-macros.xsl +110 -110
  81. package/assets/xsl/support/webpack_static_imports.xml +14 -14
  82. package/assets/xsl/tests/null.xml +3 -3
  83. package/assets/xsl/tests/pretext-text-utilities-test.xsl +333 -333
  84. package/assets/xsl/utilities/author-report.xsl +107 -107
  85. package/assets/xsl/utilities/deprecate-autoname.sed +18 -18
  86. package/assets/xsl/utilities/deprecate-index.sed +33 -33
  87. package/assets/xsl/utilities/fix-deprecations.xsl +663 -663
  88. package/assets/xsl/utilities/pretext-enhanced-source.xsl +112 -112
  89. package/assets/xsl/utilities/report-publisher-variables.xsl +162 -162
  90. package/assets/xsl/xml-to-json.xsl +326 -326
  91. package/assets/xsl/xml-to-string.xsl +328 -328
  92. package/assets/xsl-bundle.json +1 -0
  93. package/dist/{cli-C6tfAVvi.js → cli-B2LiKunq.js} +268 -233
  94. package/dist/cli.js +1 -1
  95. package/dist/host.browser.d.ts +29 -0
  96. package/dist/host.d.ts +41 -0
  97. package/dist/index.browser.d.ts +29 -0
  98. package/dist/index.browser.js +650 -0
  99. package/dist/index.d.ts +5 -0
  100. package/dist/index.js +16 -8
  101. package/dist/internal/posix-path.d.ts +59 -0
  102. package/dist/mounts.d.ts +18 -0
  103. package/dist/renderer.d.ts +14 -1
  104. package/dist/theme.d.ts +68 -0
  105. package/dist/theme.js +93 -0
  106. package/package.json +22 -4
@@ -1,76 +1,76 @@
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
- <!-- This file isolates customizations for the PreText documentation, -->
23
- <!-- The PreTeXt Guide, when produced as a PDF via LaTeX. It is meant -->
24
- <!-- to be used only with the PreTeXt "book" element. At inception, -->
25
- <!-- 2019-11-07, it is not meant to yet be a general-purpose style. -->
26
-
27
- <!-- Conveniences for classes of similar elements -->
28
- <!DOCTYPE xsl:stylesheet [
29
- <!ENTITY % entities SYSTEM "../entities.ent">
30
- %entities;
31
- ]>
32
-
33
- <!-- Identify as a stylesheet -->
34
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
35
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
36
- >
37
-
38
- <!-- We override specific templates of the standard conversion -->
39
- <!-- There is a relative path here, which bounces up a level -->
40
- <!-- from the file you are reading to be in the directory of -->
41
- <!-- principal stylesheets. (Also for entities.ent above) -->
42
- <xsl:import href="../pretext-latex.xsl" />
43
-
44
- <!-- Intend output for rendering by xelatex -->
45
- <xsl:output method="text" />
46
-
47
- <!-- ##### -->
48
- <!-- Fonts -->
49
- <!-- ##### -->
50
-
51
- <!-- Following assumes the OTF fonts have been installed -->
52
- <!-- in the system so they are known by their font names. -->
53
- <!-- This will only be effective if processed with xelatex. -->
54
-
55
- <!-- Tested with Ubuntu "fonts-opendyslexic" package (18.04 LTS, 20160623-1) -->
56
- <!-- See also: https://opendyslexic.org/ -->
57
-
58
- <xsl:template name="font-xelatex-main">
59
- <xsl:text>%% XeLaTeX font configuration from PreTeXt Dyslexic Font style&#xa;</xsl:text>
60
- <xsl:text>%%&#xa;</xsl:text>
61
- <xsl:call-template name="xelatex-font-check">
62
- <xsl:with-param name="font-name" select="'OpenDyslexic'"/>
63
- </xsl:call-template>
64
- <xsl:text>\setmainfont{OpenDyslexic}&#xa;</xsl:text>
65
- </xsl:template>
66
-
67
- <xsl:template name="font-xelatex-mono">
68
- <xsl:text>%% XeLaTeX font configuration from PreTeXt Dyslexic Font style&#xa;</xsl:text>
69
- <xsl:text>%%&#xa;</xsl:text>
70
- <xsl:call-template name="xelatex-font-check">
71
- <xsl:with-param name="font-name" select="'OpenDyslexicMono'"/>
72
- </xsl:call-template>
73
- <xsl:text>\setmonofont{OpenDyslexicMono}&#xa;</xsl:text>
74
- </xsl:template>
75
-
76
- </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
+ <!-- This file isolates customizations for the PreText documentation, -->
23
+ <!-- The PreTeXt Guide, when produced as a PDF via LaTeX. It is meant -->
24
+ <!-- to be used only with the PreTeXt "book" element. At inception, -->
25
+ <!-- 2019-11-07, it is not meant to yet be a general-purpose style. -->
26
+
27
+ <!-- Conveniences for classes of similar elements -->
28
+ <!DOCTYPE xsl:stylesheet [
29
+ <!ENTITY % entities SYSTEM "../entities.ent">
30
+ %entities;
31
+ ]>
32
+
33
+ <!-- Identify as a stylesheet -->
34
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
35
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
36
+ >
37
+
38
+ <!-- We override specific templates of the standard conversion -->
39
+ <!-- There is a relative path here, which bounces up a level -->
40
+ <!-- from the file you are reading to be in the directory of -->
41
+ <!-- principal stylesheets. (Also for entities.ent above) -->
42
+ <xsl:import href="../pretext-latex.xsl" />
43
+
44
+ <!-- Intend output for rendering by xelatex -->
45
+ <xsl:output method="text" />
46
+
47
+ <!-- ##### -->
48
+ <!-- Fonts -->
49
+ <!-- ##### -->
50
+
51
+ <!-- Following assumes the OTF fonts have been installed -->
52
+ <!-- in the system so they are known by their font names. -->
53
+ <!-- This will only be effective if processed with xelatex. -->
54
+
55
+ <!-- Tested with Ubuntu "fonts-opendyslexic" package (18.04 LTS, 20160623-1) -->
56
+ <!-- See also: https://opendyslexic.org/ -->
57
+
58
+ <xsl:template name="font-xelatex-main">
59
+ <xsl:text>%% XeLaTeX font configuration from PreTeXt Dyslexic Font style&#xa;</xsl:text>
60
+ <xsl:text>%%&#xa;</xsl:text>
61
+ <xsl:call-template name="xelatex-font-check">
62
+ <xsl:with-param name="font-name" select="'OpenDyslexic'"/>
63
+ </xsl:call-template>
64
+ <xsl:text>\setmainfont{OpenDyslexic}&#xa;</xsl:text>
65
+ </xsl:template>
66
+
67
+ <xsl:template name="font-xelatex-mono">
68
+ <xsl:text>%% XeLaTeX font configuration from PreTeXt Dyslexic Font style&#xa;</xsl:text>
69
+ <xsl:text>%%&#xa;</xsl:text>
70
+ <xsl:call-template name="xelatex-font-check">
71
+ <xsl:with-param name="font-name" select="'OpenDyslexicMono'"/>
72
+ </xsl:call-template>
73
+ <xsl:text>\setmonofont{OpenDyslexicMono}&#xa;</xsl:text>
74
+ </xsl:template>
75
+
76
+ </xsl:stylesheet>
@@ -1,104 +1,104 @@
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
- <!-- This file isolates customizations for the PreText documentation, -->
23
- <!-- The PreTeXt Guide, when produced as a PDF via LaTeX. It is meant -->
24
- <!-- to be used only with the PreTeXt "book" element. At inception, -->
25
- <!-- 2019-11-07, it is not meant to yet be a general-purpose style. -->
26
-
27
- <!-- Conveniences for classes of similar elements -->
28
- <!DOCTYPE xsl:stylesheet [
29
- <!ENTITY % entities SYSTEM "../entities.ent">
30
- %entities;
31
- ]>
32
-
33
- <!-- Identify as a stylesheet -->
34
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
35
- xmlns:xml="http://www.w3.org/XML/1998/namespace"
36
- >
37
-
38
- <!-- We override specific templates of the standard conversion -->
39
- <!-- There is a relative path here, which bounces up a level -->
40
- <!-- from the file you are reading to be in the directory of -->
41
- <!-- principal stylesheets. (Also for entities.ent above) -->
42
- <xsl:import href="../pretext-latex.xsl" />
43
-
44
- <!-- Intend output for rendering by xelatex -->
45
- <xsl:output method="text" />
46
-
47
- <!-- ##### -->
48
- <!-- Fonts -->
49
- <!-- ##### -->
50
-
51
- <!-- Old Style figures for the body, but reversed to Lining many -->
52
- <!-- other places. "Old Style" is a lowercase style, "Lining" is -->
53
- <!-- a (now traditional) uppercase style. Ornamentation for page -->
54
- <!-- header happens to be specific Unicode characters of the same -->
55
- <!-- font used for the text. Relevant font table here: -->
56
- <!-- http://mirrors.ctan.org/fonts/libertinus-fonts/documentation/LibertinusSerif-Regular-Table.pdf -->
57
- <xsl:template name="font-xelatex-main">
58
- <xsl:text>%% XeLaTeX font configuration from PreTeXt Guide style&#xa;</xsl:text>
59
- <xsl:text>%% We rely on a font installed at the system level,&#xa;</xsl:text>
60
- <xsl:text>%% so that we can exercise specific font features&#xa;</xsl:text>
61
- <xsl:text>%%&#xa;</xsl:text>
62
- <xsl:call-template name="xelatex-font-check">
63
- <xsl:with-param name="font-name" select="'Libertinus Serif'"/>
64
- </xsl:call-template>
65
- <xsl:text>\setmainfont{Libertinus Serif}[Numbers=OldStyle]&#xa;</xsl:text>
66
- </xsl:template>
67
-
68
- <!-- Libertinus Mono is serifed (and ugly?) so by doing nothing the -->
69
- <!-- default Inconsolata font will be employed, which is much more -->
70
- <!-- typewriter-like. Using an empty template would kill Inconsolata -->
71
- <!-- and yield whatever default Latin Modern provides. Both these -->
72
- <!-- options have trouble with \textpilcrow and \textrbrackdbl -->
73
-
74
- <xsl:template name="font-xelatex-style">
75
- <xsl:call-template name="xelatex-font-check">
76
- <xsl:with-param name="font-name" select="'Libertinus Sans'"/>
77
- </xsl:call-template>
78
- <xsl:text>\renewfontfamily{\divisionfont}{Libertinus Sans}[Numbers=Lining]&#xa;</xsl:text>
79
- <xsl:text>\renewfontfamily{\contentsfont}{Libertinus Sans}[Numbers=Lining]&#xa;</xsl:text>
80
- <xsl:text>\renewfontfamily{\pagefont}{Libertinus Sans}[Numbers=Lining]&#xa;</xsl:text>
81
- <xsl:text>\renewfontfamily{\blocktitlefont}{Libertinus Serif}[Numbers=Lining]&#xa;</xsl:text>
82
- <xsl:text>\renewfontfamily{\tabularfont}{Libertinus Serif}[Numbers={Monospaced,Lining}]&#xa;</xsl:text>
83
- <xsl:text>\renewfontfamily{\xreffont}{Libertinus Serif}[Numbers=Lining]&#xa;</xsl:text>
84
- <xsl:text>\renewfontfamily{\titlepagefont}{Libertinus Serif}[Numbers=Lining]&#xa;</xsl:text>
85
- <xsl:text>\newfontfamily{\ornamental}{Libertinus Serif}&#xa;</xsl:text>
86
- </xsl:template>
87
-
88
- <xsl:template match="book" mode="titleps-style">
89
- <xsl:text>%% Page style configuration from PreTeXt Guide style&#xa;</xsl:text>
90
- <xsl:text>%%&#xa;</xsl:text>
91
- <xsl:text>%% Plain pages should have the same font for page numbers&#xa;</xsl:text>
92
- <xsl:text>\renewpagestyle{plain}{%&#xa;</xsl:text>
93
- <xsl:text>\setfoot{}{\pagefont\thepage}{}%&#xa;</xsl:text>
94
- <xsl:text>}%&#xa;</xsl:text>
95
- <xsl:text>\renewpagestyle{headings}{%&#xa;</xsl:text>
96
- <xsl:text>\pagefont\headrule%&#xa;</xsl:text>
97
- <xsl:text>\sethead%&#xa;</xsl:text>
98
- <xsl:text>{\ifthesection{\pagefont\thesection}{\ifthechapter{\pagefont\thechapter}{}}}%&#xa;</xsl:text>
99
- <xsl:text>{{\ornamental &#x2619;}{\pagefont\space\ifthesection{\sectiontitle}{\chaptertitle}\space}{\ornamental &#x2767;}}
100
- {\pagefont\thepage}}%&#xa;</xsl:text>
101
- <xsl:text>\pagestyle{headings}&#xa;</xsl:text>
102
- </xsl:template>
103
-
104
- </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
+ <!-- This file isolates customizations for the PreText documentation, -->
23
+ <!-- The PreTeXt Guide, when produced as a PDF via LaTeX. It is meant -->
24
+ <!-- to be used only with the PreTeXt "book" element. At inception, -->
25
+ <!-- 2019-11-07, it is not meant to yet be a general-purpose style. -->
26
+
27
+ <!-- Conveniences for classes of similar elements -->
28
+ <!DOCTYPE xsl:stylesheet [
29
+ <!ENTITY % entities SYSTEM "../entities.ent">
30
+ %entities;
31
+ ]>
32
+
33
+ <!-- Identify as a stylesheet -->
34
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
35
+ xmlns:xml="http://www.w3.org/XML/1998/namespace"
36
+ >
37
+
38
+ <!-- We override specific templates of the standard conversion -->
39
+ <!-- There is a relative path here, which bounces up a level -->
40
+ <!-- from the file you are reading to be in the directory of -->
41
+ <!-- principal stylesheets. (Also for entities.ent above) -->
42
+ <xsl:import href="../pretext-latex.xsl" />
43
+
44
+ <!-- Intend output for rendering by xelatex -->
45
+ <xsl:output method="text" />
46
+
47
+ <!-- ##### -->
48
+ <!-- Fonts -->
49
+ <!-- ##### -->
50
+
51
+ <!-- Old Style figures for the body, but reversed to Lining many -->
52
+ <!-- other places. "Old Style" is a lowercase style, "Lining" is -->
53
+ <!-- a (now traditional) uppercase style. Ornamentation for page -->
54
+ <!-- header happens to be specific Unicode characters of the same -->
55
+ <!-- font used for the text. Relevant font table here: -->
56
+ <!-- http://mirrors.ctan.org/fonts/libertinus-fonts/documentation/LibertinusSerif-Regular-Table.pdf -->
57
+ <xsl:template name="font-xelatex-main">
58
+ <xsl:text>%% XeLaTeX font configuration from PreTeXt Guide style&#xa;</xsl:text>
59
+ <xsl:text>%% We rely on a font installed at the system level,&#xa;</xsl:text>
60
+ <xsl:text>%% so that we can exercise specific font features&#xa;</xsl:text>
61
+ <xsl:text>%%&#xa;</xsl:text>
62
+ <xsl:call-template name="xelatex-font-check">
63
+ <xsl:with-param name="font-name" select="'Libertinus Serif'"/>
64
+ </xsl:call-template>
65
+ <xsl:text>\setmainfont{Libertinus Serif}[Numbers=OldStyle]&#xa;</xsl:text>
66
+ </xsl:template>
67
+
68
+ <!-- Libertinus Mono is serifed (and ugly?) so by doing nothing the -->
69
+ <!-- default Inconsolata font will be employed, which is much more -->
70
+ <!-- typewriter-like. Using an empty template would kill Inconsolata -->
71
+ <!-- and yield whatever default Latin Modern provides. Both these -->
72
+ <!-- options have trouble with \textpilcrow and \textrbrackdbl -->
73
+
74
+ <xsl:template name="font-xelatex-style">
75
+ <xsl:call-template name="xelatex-font-check">
76
+ <xsl:with-param name="font-name" select="'Libertinus Sans'"/>
77
+ </xsl:call-template>
78
+ <xsl:text>\renewfontfamily{\divisionfont}{Libertinus Sans}[Numbers=Lining]&#xa;</xsl:text>
79
+ <xsl:text>\renewfontfamily{\contentsfont}{Libertinus Sans}[Numbers=Lining]&#xa;</xsl:text>
80
+ <xsl:text>\renewfontfamily{\pagefont}{Libertinus Sans}[Numbers=Lining]&#xa;</xsl:text>
81
+ <xsl:text>\renewfontfamily{\blocktitlefont}{Libertinus Serif}[Numbers=Lining]&#xa;</xsl:text>
82
+ <xsl:text>\renewfontfamily{\tabularfont}{Libertinus Serif}[Numbers={Monospaced,Lining}]&#xa;</xsl:text>
83
+ <xsl:text>\renewfontfamily{\xreffont}{Libertinus Serif}[Numbers=Lining]&#xa;</xsl:text>
84
+ <xsl:text>\renewfontfamily{\titlepagefont}{Libertinus Serif}[Numbers=Lining]&#xa;</xsl:text>
85
+ <xsl:text>\newfontfamily{\ornamental}{Libertinus Serif}&#xa;</xsl:text>
86
+ </xsl:template>
87
+
88
+ <xsl:template match="book" mode="titleps-style">
89
+ <xsl:text>%% Page style configuration from PreTeXt Guide style&#xa;</xsl:text>
90
+ <xsl:text>%%&#xa;</xsl:text>
91
+ <xsl:text>%% Plain pages should have the same font for page numbers&#xa;</xsl:text>
92
+ <xsl:text>\renewpagestyle{plain}{%&#xa;</xsl:text>
93
+ <xsl:text>\setfoot{}{\pagefont\thepage}{}%&#xa;</xsl:text>
94
+ <xsl:text>}%&#xa;</xsl:text>
95
+ <xsl:text>\renewpagestyle{headings}{%&#xa;</xsl:text>
96
+ <xsl:text>\pagefont\headrule%&#xa;</xsl:text>
97
+ <xsl:text>\sethead%&#xa;</xsl:text>
98
+ <xsl:text>{\ifthesection{\pagefont\thesection}{\ifthechapter{\pagefont\thechapter}{}}}%&#xa;</xsl:text>
99
+ <xsl:text>{{\ornamental &#x2619;}{\pagefont\space\ifthesection{\sectiontitle}{\chaptertitle}\space}{\ornamental &#x2767;}}
100
+ {\pagefont\thepage}}%&#xa;</xsl:text>
101
+ <xsl:text>\pagestyle{headings}&#xa;</xsl:text>
102
+ </xsl:template>
103
+
104
+ </xsl:stylesheet>