Custom ordered list markers for HTML, and derivative conversions

8 views
Skip to first unread message

Rob Beezer

unread,
Aug 17, 2026, 6:11:26 PM (6 days ago) Aug 17
to prete...@googlegroups.com
We have "extra" CSS rules for "custom" ordered list markers, today in a separate
file. Oscar has done some work to "inline" them for different special HTML
builds (e.g. a "portable" build), at PR #3152. My assistant thinks inlining
them universally is not such a bad idea and would avoid some problems Oscar was
grappling with.

So I asked my assistant for a rethink of how we do this in the first place. If
it were not for a 7-year-old Safari bug we might have a really nice solution.
That, plus a solution with wider browser support, is at:

https://github.com/PreTeXtBook/pretext/issues/3157

I'd appreciate feedback HERE on this thread, we'll just use the issue to help my
assistant remember what it was thinking.

Thanks,
Rob

Andrew Scholer

unread,
Aug 17, 2026, 7:05:05 PM (6 days ago) Aug 17
to prete...@googlegroups.com
I like the arguments there for @counter-style.

Yes, the current list styles aren't huge. So considered alone, inlining them into each page might be reasonable. But I think there is space to translate other publisher/author choices into CSS that is custom for a particular book. There certainly is room to do a better job bundling which JS a book needs. As a general rule, always handling PreTeXt generated book specialized assets by inlineing them into every HTML page seems like the wrong approach.

@Oscar - are you still looking at deno?

If we were using that (via Python) and thus were no longer dependent on a node install for compiling CSS and JS assets, it would open the door to assuming building those assets is a standard part of building a book. Then we could write CSS/JS content to files that got built into either the main CSS/JS files, or unified single sidecar files (theme-book.css), or when needed, baked into pages for something like the portable builds.


--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyd1dEcHNDcXA.1787004684%40pnsh.

Rob Beezer

unread,
Aug 17, 2026, 7:54:30 PM (6 days ago) Aug 17
to prete...@googlegroups.com
Thanks, Andrew, for the quick feedback on this one.

I'll probably go with the Safari-friendly @counter-types unless someone has a
reason not to. Maybe someday we can upgrade tothe per-element var() approach.

> which JS a book needs

And, as I think many know, we are able to look across an entire
book/document/project and see what it uses and doesn't use, often just based on
certain elements being used, or not. And we can feed that into to the Python if
we want.

Rob
> https://github.com/PreTeXtBook/pretext/issues/3157 <https://github.com/
> PreTeXtBook/pretext/issues/3157>
>
> I'd appreciate feedback HERE on this thread, we'll just use the issue to
> help my
> assistant remember what it was thinking.
>
> Thanks,
> Rob
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-dev...@googlegroups.com <mailto:pretext-
> dev%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> MTAwMDAyd1dEcHNDcXA.1787004684%40pnsh <https://groups.google.com/d/msgid/
> pretext-dev/MTAwMDAyd1dEcHNDcXA.1787004684%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/
> CACm44N_GBZrPU94Z5KRwZ3T8%3DNvtQT4ZUtQ9uS2aSTNuSjWQmw%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-dev/
> CACm44N_GBZrPU94Z5KRwZ3T8%3DNvtQT4ZUtQ9uS2aSTNuSjWQmw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Rob Beezer

unread,
7:15 PM (1 hour ago) 7:15 PM
to prete...@googlegroups.com
On 8/17/26 16:54, 'Rob Beezer' via PreTeXt development wrote:
> I'll probably go with the Safari-friendly @counter-types unless someone has a
> reason not to.  Maybe someday we can upgrade tothe per-element var() approach.

I did this, though it is "@counter-style". My assistant claims this is the
first time Safari is actually seeing these in a way it understands.

https://github.com/PreTeXtBook/pretext/pull/3173

One additional general note. There was nothing wrong with putting custom CSS
for custom list markers into a separate CSS file, per se. But for things like
portable builds and Jupyter it was a problem or got ignored. We have built Lunr
search and the Runestone manifest as auxiliary files. I think those are OK.
But we should think twice in the future about creating "extra" files as part of
HTML builds.

Rob


Reply all
Reply to author
Forward
0 new messages