Using letters/roman-numerals instead of numbers

35 views
Skip to first unread message

Charilaos Skiadas

unread,
Aug 31, 2025, 3:04:30 PM (8 days ago) Aug 31
to prete...@googlegroups.com
I was expecting to find an answer in 26.2 or 26.3 or 44.2 of the guide or searching through “numbering” but no good links showed up.
Simply put, I would like to use the alphabet or roman numerals instead of numbers for my chapters/sections etc, so something like A.b.i or whatnot. The reason for this is that admittedly I’m using a pretext book perhaps for something unusual, namely to pull together reading assignments etc for a course that uses an actual book, and so for instance the “title” of one of my sections might be “sections 1.1, 1.2” meaning that this refers to the readings and assignments pertinent to sections 1.1, 1.2 of the actual class book. So because of the numbering that sections and chapters take, this ends up looking like “2.1 Sections 1.1, 1.2” which is confusing to say the least.

So bottom line, can I specify a different format for the numbering, rather than the normal numerical digits? Would this be a publication variable?
If that is not possible then I admit I’m a bit surprised. Is it not requested, not allowed by choice, or just not implemented?

I might just be really bad at looking for things in the guide.

Charilaos Skiadas
Department of Mathematics
Hanover College


Sean Fitzpatrick

unread,
Aug 31, 2025, 3:20:15 PM (8 days ago) Aug 31
to PreTeXt development
Rob does this for his linear algebra book, although I can't seem to find a recent version online other than in Runestone (which appears to require a login).

Here's an older HTML version: 


I would probably peek at his source on GitHub

--
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/6E42A08A-7A65-449E-8AC4-853CD53F6870%40gmail.com.

Rob Beezer

unread,
Aug 31, 2025, 6:26:38 PM (8 days ago) Aug 31
to prete...@googlegroups.com
> Is it not requested, not allowed by choice, or just not implemented?

Never requested, that I recall. Definitely not implemented. Not convinced it
is a good idea.

Most obvious speed-bump - we use letters for appendices. So that would be
confusing.

Suggestion: you are hard-coding numbers from the "other" book anyway. Why not
prefix them to be obviously from that book? For "My Great Book" maybe something
like:

2.1 Sections MGB.1.1, MGB.1.2

Sean says:

> Rob does this for his linear algebra book

Not exactly. The source has an initialism for each item that might normally be
numbered. Since this predates PreTeXt, i've worked around it, but it is not
pretty and I think LaTeX division headings are presently broken (which is why
you won't find the workarounds in my repo!).

The closest thing we have to a public API is the XSL template with mode
"number". But if you replace chapter 2 to say chapter B, it doesnt mean that
section 2.4 becomes B.4. You would need to recreate the whole numbering logic.

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+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/6E42A08A-7A65-449E-8AC4-853CD53F6870%40gmail.com <https://groups.google.com/
> d/msgid/pretext-dev/6E42A08A-7A65-449E-8AC4-853CD53F6870%40gmail.com?
> utm_medium=email&utm_source=footer>.

Andrew Scholer

unread,
Sep 1, 2025, 11:00:51 AM (7 days ago) Sep 1
to prete...@googlegroups.com
Also worth noting - non-numeric numbering of chapters would be incompatible with the current data model for Runestone.

Andrew Scholer


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/MTAwMDAxMC5iZWV6ZXI.1756679195%40pnsh.

Charilaos Skiadas

unread,
Sep 1, 2025, 9:11:38 PM (6 days ago) Sep 1
to prete...@googlegroups.com
Thanks Sean, looking at the source at https://github.com/rbeezer/fcla it looks like some custom xslts and relying on grabbing the section letter from the end of the xml:id with something like xml:id="chapter-D” giving rise to the letter D as the section number, and I am not sure that I want to be extracting the numbering from the xml:ids.

Charilaos Skiadas
Department of Mathematics
Hanover College

Charilaos Skiadas

unread,
Sep 1, 2025, 9:11:38 PM (6 days ago) Sep 1
to prete...@googlegroups.com
Thanks Rob, yes I think an MGB-like approach should suffice for my silly little use-case and since it’s not something requested there's little point putting more thought into it. But yeah I was envisioning some adjustment to the templates that feed into heading-generic to have them consult publisher variables for how different levels should be displayed.

Charilaos Skiadas
Department of Mathematics
Hanover College

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/MTAwMDAxMC5iZWV6ZXI.1756679195%40pnsh.

Reply all
Reply to author
Forward
0 new messages