@pretextbook/pretext-html 0.16.0 → 0.16.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.
- package/assets/upstream.json +2 -2
- package/assets/xsl/entities.ent +14 -1
- package/assets/xsl/latex/pretext-latex-texstyle.xsl +5 -2
- package/assets/xsl/localizations/README.md +1 -1
- package/assets/xsl/localizations/af-ZA.xml +5 -6
- package/assets/xsl/localizations/bg-BG.xml +5 -6
- package/assets/xsl/localizations/ca-ES.xml +5 -6
- package/assets/xsl/localizations/cs-CZ.xml +5 -6
- package/assets/xsl/localizations/de-DE.xml +108 -108
- package/assets/xsl/localizations/en-US.xml +18 -17
- package/assets/xsl/localizations/es-ES.xml +5 -6
- package/assets/xsl/localizations/fi-FI.xml +5 -6
- package/assets/xsl/localizations/fr-CA.xml +5 -6
- package/assets/xsl/localizations/fr-FR.xml +5 -6
- package/assets/xsl/localizations/hu-HU.xml +5 -6
- package/assets/xsl/localizations/it-IT.xml +7 -7
- package/assets/xsl/localizations/ku-CKB.xml +5 -6
- package/assets/xsl/localizations/nl-NL.xml +5 -6
- package/assets/xsl/localizations/pt-BR.xml +4 -5
- package/assets/xsl/localizations/pt-PT.xml +4 -5
- package/assets/xsl/localizations/zh-HANS.xml +5 -6
- package/assets/xsl/pretext-assembly.xsl +154 -29
- package/assets/xsl/pretext-beamer.xsl +112 -10
- package/assets/xsl/pretext-braille-preprint.xsl +22 -3
- package/assets/xsl/pretext-common.xsl +117 -42
- package/assets/xsl/pretext-epub.xsl +74 -87
- package/assets/xsl/pretext-fo.xsl +115 -41
- package/assets/xsl/pretext-html.xsl +333 -102
- package/assets/xsl/pretext-latex-classic.xsl +48 -35
- package/assets/xsl/pretext-latex-common.xsl +160 -98
- package/assets/xsl/pretext-latex.xsl +12 -10
- package/assets/xsl/pretext-markdown.xsl +5 -3
- package/assets/xsl/pretext-numbers.xsl +28 -2
- package/assets/xsl/pretext-revealjs.xsl +44 -2
- package/assets/xsl/pretext-runestone-static.xsl +27 -4
- package/assets/xsl/pretext-runestone.xsl +112 -0
- package/assets/xsl/pretext-text.xsl +21 -14
- package/assets/xsl/publisher-variables.xsl +187 -47
- package/assets/xsl/support/extract-math.xsl +22 -2
- package/assets/xsl/support/package-math.xsl +9 -8
- package/assets/xsl/utilities/report-publisher-variables.xsl +4 -0
- package/assets/xsl-bundle.json +1 -1
- package/dist/{cli-ox-z2TCZ.js → cli-DzlCZymu.js} +4 -4
- package/dist/cli.js +1 -1
- package/dist/html-static.d.ts +2 -2
- package/dist/index.browser.js +5 -5
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -128,7 +128,6 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
128
128
|
<xsl:template name="latex-preamble">
|
|
129
129
|
<!-- Some journal styles require specific packages be loaded right away -->
|
|
130
130
|
<xsl:call-template name="journal-packages"/>
|
|
131
|
-
<xsl:call-template name="frontmatter-helpers"/>
|
|
132
131
|
<xsl:call-template name="preamble-early"/>
|
|
133
132
|
<xsl:call-template name="cleardoublepage"/>
|
|
134
133
|
<xsl:call-template name="standard-packages"/>
|
|
@@ -251,7 +250,6 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
251
250
|
<!-- Other latex styles can override this to put some information there. -->
|
|
252
251
|
<xsl:template name="bibinfo-pre-begin-document">
|
|
253
252
|
<xsl:apply-templates select="$document-root" mode="article-title"/>
|
|
254
|
-
<!--<xsl:apply-templates select="$bibinfo/support" mode="article-frontmatter"/>-->
|
|
255
253
|
<xsl:call-template name="article-authors"/>
|
|
256
254
|
<xsl:apply-templates select="$bibinfo/date" mode="article-frontmatter"/>
|
|
257
255
|
</xsl:template>
|
|
@@ -367,10 +365,13 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
367
365
|
</xsl:template>
|
|
368
366
|
|
|
369
367
|
|
|
368
|
+
<!-- The article-level support statement is a "\thanks" on the title -->
|
|
369
|
+
<!-- (see the "article-title" template): a marked footnote on the -->
|
|
370
|
+
<!-- title page, apart from the per-author "\thanks" off each name -->
|
|
370
371
|
<xsl:template match="bibinfo/support" mode="article-frontmatter">
|
|
371
|
-
<xsl:text>\
|
|
372
|
-
<xsl:apply-templates
|
|
373
|
-
<xsl:text>}
|
|
372
|
+
<xsl:text>\thanks{</xsl:text>
|
|
373
|
+
<xsl:apply-templates/>
|
|
374
|
+
<xsl:text>}</xsl:text>
|
|
374
375
|
</xsl:template>
|
|
375
376
|
|
|
376
377
|
|
|
@@ -594,20 +595,24 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
594
595
|
</xsl:template>
|
|
595
596
|
|
|
596
597
|
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
598
|
+
<!-- amsthm sets the optional argument in parentheses, so a title, -->
|
|
599
|
+
<!-- the creator, and the origins share that one group, separated -->
|
|
600
|
+
<!-- by commas. Braces protect the argument: a citation such as -->
|
|
601
|
+
<!-- [3] would otherwise end it at the first "]". -->
|
|
602
|
+
<xsl:template match="&THEOREM-LIKE;|&AXIOM-LIKE;|&DEFINITION-LIKE;|&REMARK-LIKE;|&COMPUTATION-LIKE;|&OPENPROBLEM-LIKE;|&EXAMPLE-LIKE;|&PROJECT-LIKE;|exercise[boolean(&INLINE-EXERCISE-FILTER;)]" mode="env-title">
|
|
603
|
+
<xsl:if test="title or creator or origins">
|
|
604
|
+
<xsl:text>[{</xsl:text>
|
|
600
605
|
<xsl:if test="title">
|
|
601
606
|
<!-- Title, but without punctuation. Or is there a smarter way? -->
|
|
602
607
|
<xsl:apply-templates select="." mode="title-xref"/>
|
|
603
608
|
</xsl:if>
|
|
604
|
-
<xsl:if test="
|
|
605
|
-
<xsl:text
|
|
609
|
+
<xsl:if test="title and (creator or origins)">
|
|
610
|
+
<xsl:text>, </xsl:text>
|
|
606
611
|
</xsl:if>
|
|
607
|
-
<xsl:if test="creator">
|
|
608
|
-
<xsl:apply-templates select="." mode="
|
|
612
|
+
<xsl:if test="creator or origins">
|
|
613
|
+
<xsl:apply-templates select="." mode="attribution-full"/>
|
|
609
614
|
</xsl:if>
|
|
610
|
-
<xsl:text>]</xsl:text>
|
|
615
|
+
<xsl:text>}]</xsl:text>
|
|
611
616
|
</xsl:if>
|
|
612
617
|
</xsl:template>
|
|
613
618
|
|
|
@@ -772,6 +777,11 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
772
777
|
</xsl:call-template>
|
|
773
778
|
</xsl:if>
|
|
774
779
|
<xsl:text>]{block}{}
</xsl:text>
|
|
780
|
+
<!-- tcolorbox names each auto counter after its box, so the names -->
|
|
781
|
+
<!-- below reappear in the LaTeX as counters, "tcb@cnt@figuredistinct" -->
|
|
782
|
+
<!-- for one, and as macros, "\thetcb@cnt@figuredistinct", which -->
|
|
783
|
+
<!-- subfigure captions write out directly. A control sequence name -->
|
|
784
|
+
<!-- cannot contain a hyphen, so none of the box names does. -->
|
|
775
785
|
<!-- should condition on $project-reps, but it is not defined yet -->
|
|
776
786
|
<xsl:if test="$b-number-project-distinct">
|
|
777
787
|
<xsl:text>%%
</xsl:text>
|
|
@@ -787,7 +797,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
787
797
|
<xsl:with-param name="level" select="$numbering-projects" />
|
|
788
798
|
</xsl:call-template>
|
|
789
799
|
</xsl:if>
|
|
790
|
-
<xsl:text>]{
|
|
800
|
+
<xsl:text>]{projectdistinct}{}
</xsl:text>
|
|
791
801
|
</xsl:if>
|
|
792
802
|
<xsl:if test="$b-number-exercise-distinct">
|
|
793
803
|
<xsl:text>%%
</xsl:text>
|
|
@@ -802,7 +812,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
802
812
|
<xsl:with-param name="level" select="$numbering-exercises" />
|
|
803
813
|
</xsl:call-template>
|
|
804
814
|
</xsl:if>
|
|
805
|
-
<xsl:text>]{
|
|
815
|
+
<xsl:text>]{exercisedistinct}{}
</xsl:text>
|
|
806
816
|
</xsl:if>
|
|
807
817
|
<xsl:if test="$b-number-figure-distinct">
|
|
808
818
|
<xsl:text>%%
</xsl:text>
|
|
@@ -817,7 +827,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
817
827
|
<xsl:with-param name="level" select="$numbering-figures" />
|
|
818
828
|
</xsl:call-template>
|
|
819
829
|
</xsl:if>
|
|
820
|
-
<xsl:text>]{
|
|
830
|
+
<xsl:text>]{figuredistinct}{}
</xsl:text>
|
|
821
831
|
</xsl:if>
|
|
822
832
|
<xsl:if test="$b-number-openproblem-distinct">
|
|
823
833
|
<xsl:text>%%
</xsl:text>
|
|
@@ -833,7 +843,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
833
843
|
<xsl:with-param name="level" select="$numbering-openproblems" />
|
|
834
844
|
</xsl:call-template>
|
|
835
845
|
</xsl:if>
|
|
836
|
-
<xsl:text>]{
|
|
846
|
+
<xsl:text>]{openproblemdistinct}{}
</xsl:text>
|
|
837
847
|
</xsl:if>
|
|
838
848
|
<!-- TODO: condition of figure/*/figure-like, or $subfigure-reps -->
|
|
839
849
|
<xsl:text>%% A faux tcolorbox whose only purpose is to provide common numbering
</xsl:text>
|
|
@@ -844,16 +854,24 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
844
854
|
<xsl:text>\newtcolorbox[auto counter</xsl:text>
|
|
845
855
|
<!-- control the levels of the numbering -->
|
|
846
856
|
<!-- global (no periods) is the default -->
|
|
857
|
+
<!-- The subnumbers nest within the counter that numbers figures, -->
|
|
858
|
+
<!-- and the full number, a figure number followed by a letter, -->
|
|
859
|
+
<!-- is built from that same counter -->
|
|
860
|
+
<xsl:variable name="figure-counter">
|
|
861
|
+
<xsl:choose>
|
|
862
|
+
<xsl:when test="$b-number-figure-distinct">
|
|
863
|
+
<xsl:text>tcb@cnt@figuredistinct</xsl:text>
|
|
864
|
+
</xsl:when>
|
|
865
|
+
<xsl:otherwise>
|
|
866
|
+
<xsl:text>tcb@cnt@block</xsl:text>
|
|
867
|
+
</xsl:otherwise>
|
|
868
|
+
</xsl:choose>
|
|
869
|
+
</xsl:variable>
|
|
847
870
|
<xsl:text>, number within=</xsl:text>
|
|
848
|
-
<xsl:
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
<xsl:otherwise>
|
|
853
|
-
<xsl:text>tcb@cnt@block</xsl:text>
|
|
854
|
-
</xsl:otherwise>
|
|
855
|
-
</xsl:choose>
|
|
856
|
-
<xsl:text>, number freestyle={\noexpand\thetcb@cnt@block(\noexpand\alph{\tcbcounter})}</xsl:text>
|
|
871
|
+
<xsl:value-of select="$figure-counter"/>
|
|
872
|
+
<xsl:text>, number freestyle={\noexpand\the</xsl:text>
|
|
873
|
+
<xsl:value-of select="$figure-counter"/>
|
|
874
|
+
<xsl:text>(\noexpand\alph{\tcbcounter})}</xsl:text>
|
|
857
875
|
<xsl:text>]{subdisplay}{}
</xsl:text>
|
|
858
876
|
<!-- faux subdisplay requires manipulating low-level counters -->
|
|
859
877
|
<xsl:text>\makeatother
</xsl:text>
|
|
@@ -876,14 +894,15 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
876
894
|
<!-- FIGURE-LIKE come in three flavors: blocks (not in a side-by-side), -->
|
|
877
895
|
<!-- panels (in a side-by-side, but not in an overall "figure"), or -->
|
|
878
896
|
<!-- subnumbered (panel of a side-by-side, which is then in an overall -->
|
|
879
|
-
<!-- "figure
|
|
897
|
+
<!-- "figure", or a "figure" in a "stack" that is the content of an -->
|
|
898
|
+
<!-- overall "figure"). Selections must be careful (not dropping through -->
|
|
880
899
|
<!-- a choose/when). Environments need to consider title/caption -->
|
|
881
900
|
<!-- placement and counters. So we might create twelve different -->
|
|
882
901
|
<!-- environments here. In -common, see the "figure-placement" template -->
|
|
883
902
|
<!-- for another determination, and a more careful explanation. -->
|
|
884
903
|
<!-- (There was once a subtle bug when we were not so careful here.) -->
|
|
885
904
|
<xsl:variable name="figure-reps" select="
|
|
886
|
-
($document-root//figure[not(parent::sidebyside)])[1]|
|
|
905
|
+
($document-root//figure[not(parent::sidebyside or parent::stack/parent::figure)])[1]|
|
|
887
906
|
($document-root//table[not(parent::sidebyside)])[1]|
|
|
888
907
|
($document-root//listing[not(parent::sidebyside)])[1]|
|
|
889
908
|
($document-root//list[not(parent::sidebyside)])[1]"/>
|
|
@@ -913,7 +932,7 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
913
932
|
<!-- (SUB)FIGURE-LIKE -->
|
|
914
933
|
<!-- subnumbered versions, if contained by overall figure -->
|
|
915
934
|
<xsl:variable name="subnumber-reps" select="
|
|
916
|
-
($document-root//figure/sidebyside/figure|$document-root//figure/sbsgroup/sidebyside/figure)[1]|
|
|
935
|
+
($document-root//figure/sidebyside/figure|$document-root//figure/sbsgroup/sidebyside/figure|$document-root//figure/stack/figure)[1]|
|
|
917
936
|
($document-root//figure/sidebyside/table|$document-root//figure/sbsgroup/sidebyside/table)[1]|
|
|
918
937
|
($document-root//figure/sidebyside/listing|$document-root//figure/sbsgroup/sidebyside/listing)[1]|
|
|
919
938
|
($document-root//figure/sidebyside/list|$document-root//figure/sbsgroup/sidebyside/list)[1]"/>
|
|
@@ -942,10 +961,4 @@ along with PreTeXt. If not, see <http://www.gnu.org/licenses/>.
|
|
|
942
961
|
</xsl:for-each>
|
|
943
962
|
</xsl:template>
|
|
944
963
|
|
|
945
|
-
|
|
946
|
-
<!-- Preamble template for elements needed to produce the frontmatter -->
|
|
947
|
-
<xsl:template name="frontmatter-helpers">
|
|
948
|
-
<xsl:call-template name="support-footnote"/>
|
|
949
|
-
</xsl:template>
|
|
950
|
-
|
|
951
964
|
</xsl:stylesheet>
|