From 53b1b27a8cb8cce72444ae8326d7adc80bb8047c Mon Sep 17 00:00:00 2001 From: Oscar Levin Date: Tue, 18 Nov 2025 17:20:02 -0700 Subject: [PATCH 1/3] fix worksheet publication template typo --- .../logs/.fuse_hidden0006e26600000258 | 13 +++++++++++++ .../logs/.fuse_hidden0006e27000000230 | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 new-pretext-project1/logs/.fuse_hidden0006e26600000258 create mode 100644 new-pretext-project1/logs/.fuse_hidden0006e27000000230 diff --git a/new-pretext-project1/logs/.fuse_hidden0006e26600000258 b/new-pretext-project1/logs/.fuse_hidden0006e26600000258 new file mode 100644 index 00000000..3a7aac38 --- /dev/null +++ b/new-pretext-project1/logs/.fuse_hidden0006e26600000258 @@ -0,0 +1,13 @@ +INFO : Since no target was supplied, we will use "slides". + +INFO : Now preparing local server to preview your project directory `/files/GitHub/dev/pretext-cli/new-pretext-project`. +INFO : (Reminder: use `pretext deploy` to deploy your built project to a public +INFO : GitHub Pages site that can be shared with readers who cannot access your +INFO : personal computer.) +INFO : +INFO : starting server ... +INFO : setting up PreTeXt web server ... +INFO : Added pretext web server entry 32a890857c 528346 8128 localhost + +INFO : Server will soon be available at http://localhost:8128 +INFO : Opening browser for target `slides` at http://localhost:8128/output/slides diff --git a/new-pretext-project1/logs/.fuse_hidden0006e27000000230 b/new-pretext-project1/logs/.fuse_hidden0006e27000000230 new file mode 100644 index 00000000..341cf8a2 --- /dev/null +++ b/new-pretext-project1/logs/.fuse_hidden0006e27000000230 @@ -0,0 +1,13 @@ +INFO : Since no target was supplied, we will use "slides". + +INFO : Now preparing local server to preview your project directory `/files/GitHub/dev/pretext-cli/new-pretext-project`. +INFO : (Reminder: use `pretext deploy` to deploy your built project to a public +INFO : GitHub Pages site that can be shared with readers who cannot access your +INFO : personal computer.) +INFO : +INFO : starting server ... +INFO : setting up PreTeXt web server ... +INFO : Added pretext web server entry 32a890857c 528769 8129 localhost + +INFO : Server will soon be available at http://localhost:8129 +INFO : Opening browser for target `slides` at http://localhost:8129/output/slides From 37de3113df501ca54f6a1b1f4a5a5af67f159b4b Mon Sep 17 00:00:00 2001 From: Oscar Levin Date: Wed, 19 Nov 2025 19:51:18 -0700 Subject: [PATCH 2/3] update output formats for mermaid --- pretext/__init__.py | 2 +- pretext/constants.py | 5 +++++ pretext/project/__init__.py | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/pretext/__init__.py b/pretext/__init__.py index ca7c93f2..cd8b723b 100644 --- a/pretext/__init__.py +++ b/pretext/__init__.py @@ -19,7 +19,7 @@ VERSION = get_version("pretext", Path(__file__).parent.parent) -CORE_COMMIT = "ad3ef3fb102bf393b9fe33ecb242848e5ca6b0df" +CORE_COMMIT = "65231d1891e6a60f9e9d4873520e5d3e849e59b3" def activate() -> None: diff --git a/pretext/constants.py b/pretext/constants.py index 58155c1e..6a58c22b 100644 --- a/pretext/constants.py +++ b/pretext/constants.py @@ -170,12 +170,14 @@ "latex-image": [], "sageplot": ["pdf", "png"], "prefigure": ["pdf"], + "mermaid": ["png"], }, "latex": { "asymptote": ["pdf"], "latex-image": [], "sageplot": ["pdf", "png"], "prefigure": ["pdf"], + "mermaid": ["png"], }, "html": { "asymptote": ["html"], @@ -194,12 +196,14 @@ "latex-image": ["svg"], "sageplot": ["svg"], "prefigure": ["svg"], + "mermaid": ["svg"], }, "kindle": { "asymptote": ["png"], "latex-image": ["png"], "sageplot": ["png"], "prefigure": ["png"], + "mermaid": ["svg"], }, "braille": { "asymptote": ["all"], @@ -222,6 +226,7 @@ "latex-image": ["all"], "sageplot": ["all"], "prefigure": ["all"], + "mermaid": ["png", "svg"], }, } diff --git a/pretext/project/__init__.py b/pretext/project/__init__.py index fe683d4e..f794205b 100644 --- a/pretext/project/__init__.py +++ b/pretext/project/__init__.py @@ -1190,14 +1190,16 @@ def generate_assets( log.debug(e, exc_info=True) if "mermaid" in assets_to_generate: try: - core.mermaid_images( - xml_source=self.source_abspath(), - pub_file=self.publication_abspath().as_posix(), - stringparams=stringparams_copy, - xmlid_root=xmlid, - dest_dir=self.generated_dir_abspath() / "mermaid", - ) - successful_assets.append("mermaid") + for outformat in asset_formats["mermaid"]: + core.mermaid_images( + xml_source=self.source_abspath(), + pub_file=self.publication_abspath().as_posix(), + stringparams=stringparams_copy, + xmlid_root=xmlid, + dest_dir=self.generated_dir_abspath() / "mermaid", + outformat=outformat, + ) + successful_assets.append("mermaid") except Exception as e: log.error(f"Unable to generate some mermaid images: \n{e}") log.debug(e, exc_info=True) From 6e1877c775a853d5415e14690058b7c3731674b2 Mon Sep 17 00:00:00 2001 From: Oscar Levin Date: Wed, 19 Nov 2025 20:01:55 -0700 Subject: [PATCH 3/3] update changelog --- CHANGELOG.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c633f846..895962c5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,11 +9,22 @@ Instructions: Add a subsection under `[Unreleased]` for additions, fixes, change ## [Unreleased] +### Added + +- Support for Kotlin programming language in activecode. (core) +- Improvements for Mermaid image generation. (core) +- Image descriptions now work on Asymptote images. (core) + +### Changed + +- Display math can be placed inside `` (without ``) instead of ``. Numbered equations now specified with an attribute. (core) + ### Fixed - Bug that sometimes prevented `pretext view` from working due to permissions on mac. - Typos in template publication files. - Default output filename for the slideshow template is now `index.html` so `pretext view` will open directly to the slideshow. +- Bug that sometimes prevented a journal article style file from being downloaded. ## [2.30.2] - 2025-11-11