[DEPRECATE] Old HTML styles will be replaced by new themes

9 views
Skip to first unread message

Andrew Scholer

unread,
Aug 12, 2025, 7:55:44 PMAug 12
to pretext-...@googlegroups.com
As of PreTeXt CLI release 2.27 (PreTeXt core commit 132ca234495d16ffbb8ad75fc06375f991000db4), PreTeXt will ignore publication settings specifying the "old" HTML themes and instead use a best guess "new" replacement theme.


Why:
The new themes for web builds have been in place for ~9 months and are in use by many major projects. All new styling and development is focused on these themes. The older themes are not being updated with new features or to accommodate changes to existing features. Thus, the quality of visual output they provide has decreased over recent months and will only continue to do so. 

So PreTeXt is moving from just warning about use of the old themes to actively deprecating them. In addition to the deprecation warning that has been in place for 9 months, a warning will be emitted to let you know what theme is being used. A future release will remove the code related to producing the old themes. 


How can I specify a particular theme?
You can learn more about the new themes in the PreTeXt guide:
https://pretextbook.org/doc/guide/html/online-style.html

The syntax for specifying a particular theme is covered in the Online (HTML) Options section:
https://pretextbook.org/doc/guide/html/publication-file-online.html#online-style-options


How do I know if I am using the old or new themes?
If you used the CLI to create your project in the last 7 months, you are almost certainly using a new theme.

To confirm, check your publisher file for an html/css element. Something like this one:
https://github.com/PreTeXtBook/pretext/blob/132ca234495d16ffbb8ad75fc06375f991000db4/examples/sample-article/publication.xml#L105

If you do not have one, or if you have one with an attribute theme="X", you are using the new themes already.

If you have one and it has an attribute style="X", you are using one of the old themes.


What if I need to use an old theme while I update custom CSS?

If you need to use an older theme for a while longer, you will need to stick to PreTeXt CLI 2.26.0 or earlier. The Guide has instructions for how to install a particular version:
https://pretextbook.org/doc/guide/html/processing-CLI.html#processing-CLI-5-13-7


Andrew Scholer
Reply all
Reply to author
Forward
0 new messages