renumbering a list

30 views
Skip to first unread message

Adam Smith

unread,
Jul 15, 2025, 6:42:02 PM7/15/25
to pretext...@googlegroups.com
Is there a way to renumber a list? I have an <ol> that starts 1, 2, 3, etc. But all the steps are similar, and I don't want to output all 101 elements. Is there a way I can just skip to 101?

Thanks,
Adam

--------------------
Adam A. Smith
Associate Professor of Computer Science
University of Puget Sound

Andrew Scholer

unread,
Jul 16, 2025, 4:48:33 PM7/16/25
to pretext...@googlegroups.com
Adam - 

I am 99.99% sure there is no mechanism to override the numbering of lists.

There was discussion a while back of breaking an ordered list in the middle, and that is not possible either:
https://groups.google.com/g/pretext-dev/c/W8kXdGw6OXw/m/_UWLoN-LBwAJ?utm_medium=email&utm_source=footer


Andrew Scholer (he/him/his)
Computer Science Instructor
Chemeketa Community College


--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/CANn%3Dsetj577LA7AasbK69Ocw1Q0KxxtsZEQCXvHqa3K9SsDang%40mail.gmail.com.

Adam Smith

unread,
Jul 16, 2025, 4:57:40 PM7/16/25
to pretext...@googlegroups.com
Thanks for the reply--I appreciate it.

I'm hopeful that this will be revisited in the future.

Adam

--------------------
Adam A. Smith
Associate Professor of Computer Science
University of Puget Sound


Rob Beezer

unread,
Jul 16, 2025, 8:33:02 PM7/16/25
to pretext...@googlegroups.com
On 7/15/25 15:41, Adam Smith wrote:
> all the steps are similar, and I don't want to output all 101 elements. Is there
> a way I can just skip to 101?
I'm not following what you are asking for - I can't even connect the subject
line to the quoted sentence (which I don't quite understand all by itself).

> I'm hopeful that this will be revisited in the future.

How about now? ;-) Can you give us a concrete example of what you are after?

Rob


Adam Smith

unread,
Jul 16, 2025, 9:51:29 PM7/16/25
to pretext...@googlegroups.com
I'm trying to explain 2 algorithms, using the Right Way and the Wrong Way. One way to compare them is to count how many memory allocations they each do. (It would also be advantageous to do this via O-notation, but this is at an earlier place in the book and I haven't covered asymptotic notations yet.)

Under the assumptions I've made, the Wrong Way needs 101 allocations. They're done in strict order, so what I'd really like to do would be to do something like this:

1. explain 1st allocation
2. explain 2nd allocation
3. explain 3rd allocation
 ⋮
101. explain 101st allocation

That is, literally have a vertical ellipsis in the middle, illustrating just how long the list really is (without showing it in all its gory detail).

Whereas the Right Way would have a list like this:

1. explain 1st allocation
2. explain 2nd allocation

...and done.

This would call for a couple of things:
  • Being able to change the # of the <ol>, in the middle.
  • Replacing one of the numbers with a vertical ellipsis.
Mind you, I've pretty much figured out how to do this with scripts and sed/regexes, so it's not a very high priority. But I do think that this use case is illustrative of something others might do. Granted, I'm quite sure that this could be used to wreck some real havoc, and so I can understand the reluctance. But allowing ordered lists that don't go in exact increasing order has several good uses. I also liked the example given in the discussion last year, with a numbered list that can start and stop, with explanatory paragraphs in between. Being able to change the current number of an <ol> would help there, too. And then it might be useful to make a list of indefinite length, that just ends with a ⋮.

Thanks for considering. :)

A

--------------------
Adam A. Smith
Associate Professor of Computer Science
University of Puget Sound


--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.

Sean Fitzpatrick

unread,
Jul 16, 2025, 10:05:39 PM7/16/25
to pretext...@googlegroups.com
I think I'd do this with some other mechanism, especially if you want the vertical ellipsis. 

One option (not ideal, maybe):

<me>\begin{matrix}
1\amp \text{First thing}\\
2\amp \text{Second thing}\\
\amp\vdots\\
101\amp\text{Last thing} 
\end{matrix}</me>

Probably bad for accessibility. 

Maybe there is a similar thing with md or cd.

Or you could do 
<ul marker="">
<li><title>1.</title>First thing</li>

Etc. Not sure how to get the vertical ellipsis in that case, though. (I don't think there's a PreTeXt element for that?)

Rob Beezer

unread,
Jul 17, 2025, 1:32:58 PM7/17/25
to pretext...@googlegroups.com
Thanks, Adam, for the more complete explanation, and anticipating some of the
gotchas.

We have an #algorithm block, which might be a good home for this. And if any
algorithm-specific enhancements were made, we could condition them on living
inside such a block, which might reduce the "havoc" potential.

I now know more about vertical ellipsis than I ever thought I would (which is
not to say I know a whole lot more).

https://en.wikipedia.org/wiki/Ellipsis

Good news, Unicode U+2026 is the character. So, Adam you could experiment with
HTML and "& # x 2026 ;" (no spaces).

As suggested, I think I would try a #dl where the "title" of one element is
empty (hmmm) or absent (schema violation?) or maybe just holds a <nbsp/> (tag
abuse) and put the Unicode vertical ellipsis in as the text of the lone #p in
the #item.

If we think a vertical ellipsis is useful as a character (like in sentences) it
would be little trouble (except for braille!) to make a #vellipsis, or similar.

Rob
> * Being able to change the # of the <ol>, in the middle.
> * Replacing one of the numbers with a vertical ellipsis.
> <mailto:pretext-support%2Bunsu...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/MTAwMDAxMi5iZWV6ZXI.1752712379%40pnsh <https://
> groups.google.com/d/msgid/pretext-support/
> MTAwMDAxMi5iZWV6ZXI.1752712379%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/
> CANn%3Dses_fb6YxMgHeNj4Tno89YV0K6P%3DRDmVR5xCLHLZFgZqaQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-support/
> CANn%3Dses_fb6YxMgHeNj4Tno89YV0K6P%3DRDmVR5xCLHLZFgZqaQ%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> CAH%2BNcPY%3DrbkhWRqpCCJAHiE_RhiroOuxZjhGitThUO-iijAA%2Bg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-support/
> CAH%2BNcPY%3DrbkhWRqpCCJAHiE_RhiroOuxZjhGitThUO-iijAA%2Bg%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Andrew Scholer

unread,
Jul 17, 2025, 1:46:31 PM7/17/25
to pretext...@googlegroups.com
Slight correction... vertical ellipses is U+22EE

HTML version might be solvable with something like:

Andrew Scholer (he/him/his)
Computer Science Instructor
Chemeketa Community College

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-support/MTAwMDAxOS5iZWV6ZXI.1752773574%40pnsh.

Rob Beezer

unread,
Jul 17, 2025, 2:09:37 PM7/17/25
to pretext...@googlegroups.com
Right. Moving too fast. Thanks for the correction. And thanks for the
thought-provoking demo.

On 7/17/25 10:45, Andrew Scholer wrote:
> Slight correction... vertical ellipses is U+22EE
>
> HTML version might be solvable with something like:
> https://jsfiddle.net/ascholerChemeketa/uktLd675/4/ <https://jsfiddle.net/
> ascholerChemeketa/uktLd675/4/>
>
> Andrew Scholer (he/him/his)
> Computer Science Instructor
> Chemeketa Community College
> 503.589.7649
> computerscience.chemeketa.edu/people/andrew-scholer/ <http://
> computerscience.chemeketa.edu/people/andrew-scholer/>
>
>
> On Thu, Jul 17, 2025 at 10:32 AM 'Rob Beezer' via PreTeXt support <pretext-
> sup...@googlegroups.com <mailto:pretext...@googlegroups.com>> wrote:
>
> Thanks, Adam, for the more complete explanation, and anticipating some of the
> gotchas.
>
> We have an  #algorithm  block, which might be a good home for this.  And if any
> algorithm-specific enhancements were made, we could condition them on living
> inside such a block, which might reduce the "havoc" potential.
>
> I now know more about vertical ellipsis than I ever thought I would (which is
> not to say I know a whole lot more).
>
> https://en.wikipedia.org/wiki/Ellipsis <https://en.wikipedia.org/wiki/Ellipsis>
> > sup...@googlegroups.com <mailto:sup...@googlegroups.com>
> <mailto:pretext...@googlegroups.com <mailto:pretext-
> sup...@googlegroups.com>>> wrote:
> >
> >         On 7/15/25 15:41, Adam Smith wrote:
> >          > all the steps are similar, and I don't want to output all 101
> >         elements. Is there
> >          > a way I can just skip to 101?
> >         I'm not following what you are asking for - I can't even connect the
> >         subject
> >         line to the quoted sentence (which I don't quite understand all
> by itself).
> >
> >           > I'm hopeful that this will be revisited in the future.
> >
> >         How about now?  ;-)  Can you give us a concrete example of what
> you are
> >         after?
> >
> >         Rob
> >
> >
> >         --
> >         You received this message because you are subscribed to the Google
> >         Groups "PreTeXt support" group.
> >         To unsubscribe from this group and stop receiving emails from it,
> send
> >         an email to pretext-suppo...@googlegroups.com
> <mailto:pretext-support%2Bunsu...@googlegroups.com>
> >         <mailto:pretext-support%2Bunsu...@googlegroups.com
> <mailto:pretext-support%252Buns...@googlegroups.com>>.
> >         To view this discussion visit https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >         support/MTAwMDAxMi5iZWV6ZXI.1752712379%40pnsh <https://
> > groups.google.com/d/msgid/pretext-support/ <http://groups.google.com/d/
> msgid/pretext-support/>
> >         MTAwMDAxMi5iZWV6ZXI.1752712379%40pnsh>.
> >
> >     --
> >     You received this message because you are subscribed to the Google Groups
> >     "PreTeXt support" group.
> >     To unsubscribe from this group and stop receiving emails from it, send an
> >     email to pretext-suppo...@googlegroups.com
> <mailto:pretext-support%2Bunsu...@googlegroups.com> <mailto:pretext-
> <mailto:pretext->
> > support+u...@googlegroups.com
> <mailto:support%2Bunsu...@googlegroups.com>>.
> >     To view this discussion visit https://groups.google.com/d/msgid/
> pretext- <https://groups.google.com/d/msgid/pretext->
> >     support/
> >
>  CANn%3Dses_fb6YxMgHeNj4Tno89YV0K6P%3DRDmVR5xCLHLZFgZqaQ%40mail.gmail.com
> <http://40mail.gmail.com>
> >     <https://groups.google.com/d/msgid/pretext-support/ <https://
> groups.google.com/d/msgid/pretext-support/>
> >
>  CANn%3Dses_fb6YxMgHeNj4Tno89YV0K6P%3DRDmVR5xCLHLZFgZqaQ%40mail.gmail.com
> <http://40mail.gmail.com>?
> >     utm_medium=email&utm_source=footer>.
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PreTeXt support" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> email
> > to pretext-suppo...@googlegroups.com <mailto:pretext-
> support%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> > support+u...@googlegroups.com
> <mailto:support%2Bunsu...@googlegroups.com>>.
> > To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/ <https://groups.google.com/d/msgid/pretext-support/>
> > CAH%2BNcPY%3DrbkhWRqpCCJAHiE_RhiroOuxZjhGitThUO-
> iijAA%2Bg%40mail.gmail.com <http://40mail.gmail.com>
> > <https://groups.google.com/d/msgid/pretext-support/ <https://
> groups.google.com/d/msgid/pretext-support/>
> > CAH%2BNcPY%3DrbkhWRqpCCJAHiE_RhiroOuxZjhGitThUO-
> iijAA%2Bg%40mail.gmail.com <http://40mail.gmail.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to pretext-suppo...@googlegroups.com <mailto:pretext-
> support/MTAwMDAxOS5iZWV6ZXI.1752773574%40pnsh <https://groups.google.com/d/
> msgid/pretext-support/MTAwMDAxOS5iZWV6ZXI.1752773574%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-suppo...@googlegroups.com <mailto:pretext-
> support+u...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-support/
> CACm44N-DG7u-k6vOU5pvqi33e_UraXksn%3D8vi6AGu1za5g0WdQ%40mail.gmail.com <https://
> groups.google.com/d/msgid/pretext-support/CACm44N-DG7u-
> k6vOU5pvqi33e_UraXksn%3D8vi6AGu1za5g0WdQ%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Adam Smith

unread,
Jul 17, 2025, 2:10:32 PM7/17/25
to pretext...@googlegroups.com
The vertical ellipses is actually quite easy. I have my keyboard set up to do all kinds of wacky characters, and PreTeXt has been amazingly robust whenever I enter something strange. So if I just put a ⋮ in my code, it seems to work fine.

I did play with the <dl> a bit, but it just looked different from the other lists I had (different fonts and different spacing), so I decided that that probably wasn't the option.

A

--------------------
Adam A. Smith
Associate Professor of Computer Science
University of Puget Sound


Rob Beezer

unread,
Jul 17, 2025, 2:45:29 PM7/17/25
to pretext...@googlegroups.com
On 7/17/25 11:10, Adam Smith wrote:
> The vertical ellipses is actually quite easy. I have my keyboard set up to do
> all kinds of wacky characters, and PreTeXt has been amazingly robust whenever I
> enter something strange. So if I just put a ⋮ in my code, it seems to work fine.

LaTeX will need xelatex (not pdflatex) to handle Unicode.

Braille will fail miserably and totally bewilder the reader.

Rob

Adam Smith

unread,
Jul 17, 2025, 5:02:18 PM7/17/25
to pretext...@googlegroups.com
In that case, I'd like to request that a vertical ellipsis gets some support--it's just too useful.

I just wrote a script to count the irregular, non-ASCII characters that I use. There are a few, that I'll have to revisit, when it’s time to worry about accessibility. Is there a list somewhere of the supported characters?

A

--------------------
Adam A. Smith
Associate Professor of Computer Science
University of Puget Sound


--
You received this message because you are subscribed to the Google Groups "PreTeXt support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-suppo...@googlegroups.com.

Rob Beezer

unread,
Jul 17, 2025, 5:18:27 PM7/17/25
to pretext...@googlegroups.com
You want

Subsection 4.1.4: Characters in Paragraphs
https://pretextbook.org/doc/guide/html/topic-paragraphs.html#topic-character-elements

*Horizonatl* ellipsis is about 60% of the way down. But don't skip the
philosophy, attitude, and ranting that is interspersed. ;-)

Rob
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/MTAwMDAwNi5iZWV6ZXI.1752777924%40pnsh <https://groups.google.com/d/
> msgid/pretext-support/MTAwMDAwNi5iZWV6ZXI.1752777924%40pnsh>.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt support" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> CANn%3DsesUxvHmAUku5%3DLiXFeF61YyEDNwadi41UbmdVskc1iozw%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-support/
> CANn%3DsesUxvHmAUku5%3DLiXFeF61YyEDNwadi41UbmdVskc1iozw%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Peter Seibel

unread,
Jul 18, 2025, 2:58:19 PM7/18/25
to PreTeXt support
Here's a gross/elegant (your pick) CSS hack to do it without changing the HTML.

Adam Smith

unread,
Jul 22, 2025, 12:06:36 AM7/22/25
to pretext...@googlegroups.com
That's interesting--thank you.

A

--------------------
Adam A. Smith
Associate Professor of Computer Science
University of Puget Sound


Reply all
Reply to author
Forward
0 new messages