diff --git a/pretext/__init__.py b/pretext/__init__.py index 1dbb48d8..9342856b 100644 --- a/pretext/__init__.py +++ b/pretext/__init__.py @@ -19,7 +19,7 @@ VERSION = get_version("pretext", Path(__file__).parent.parent) -CORE_COMMIT = "ce20f15d525f2d1e7a3c3fb8da3bb5fa9d16d3ee" +CORE_COMMIT = "e98e2f879c6da2daaf3435bdcff832c3fc05c91b" def activate() -> None: diff --git a/pretext/constants.py b/pretext/constants.py index 6a58c22b..461b12e7 100644 --- a/pretext/constants.py +++ b/pretext/constants.py @@ -8,6 +8,7 @@ "pdf", "latex", "epub", + "epub_nozip", "kindle", "braille", "revealjs", @@ -70,6 +71,20 @@ "myopenmath", "dynamic-subs", ], + "epub_nozip": [ + "webwork", + "latex-image", + "sageplot", + "asymptote", + "youtube", + "codelens", + "datafile", + "interactive", + "qrcode", + "mermaid", + "myopenmath", + "dynamic-subs", + ], "kindle": [ "webwork", "latex-image", @@ -198,6 +213,13 @@ "prefigure": ["svg"], "mermaid": ["svg"], }, + "epub_nozip": { + "asymptote": ["svg"], + "latex-image": ["svg"], + "sageplot": ["svg"], + "prefigure": ["svg"], + "mermaid": ["svg"], + }, "kindle": { "asymptote": ["png"], "latex-image": ["png"], diff --git a/pretext/project/__init__.py b/pretext/project/__init__.py index 9c298622..d9bad097 100644 --- a/pretext/project/__init__.py +++ b/pretext/project/__init__.py @@ -53,6 +53,7 @@ class Format(str, Enum): LATEX = "latex" PDF = "pdf" EPUB = "epub" + EPUB_NOZIP = "epub_nozip" KINDLE = "kindle" BRAILLE = "braille" REVEALJS = "revealjs" @@ -810,6 +811,18 @@ def build( pub_file=self.publication_abspath().as_posix(), out_file=out_file, dest_dir=self.output_dir_abspath().as_posix(), + file_format="epub", + math_format="svg", + stringparams=stringparams_copy, + ) + elif self.format == Format.EPUB_NOZIP: + utils.mjsre_npm_install() + core.epub( + xml_source=self.source_abspath(), + pub_file=self.publication_abspath().as_posix(), + out_file=out_file, + dest_dir=self.output_dir_abspath().as_posix(), + file_format="nozip", math_format="svg", stringparams=stringparams_copy, ) @@ -820,6 +833,7 @@ def build( pub_file=self.publication_abspath().as_posix(), out_file=out_file, dest_dir=self.output_dir_abspath().as_posix(), + file_format="epub", math_format="kindle", stringparams=stringparams_copy, )