Two formatting issues with worksheets

47 views
Skip to first unread message

Mitch Keller

unread,
Jan 22, 2026, 3:34:51 PMJan 22
to 'Rob Beezer' via PreTeXt support
Mostly for Oscar, but those in tune with the CSS may have insights as well.

  1. Looking at this worksheet with source file, notice how the first #exercise contains a #task that contains yet another #task.. In the non-printable version, this looks correct. However, when I go to the print preview, the sub-#tasks are not indented any more than their parent #task is. I anticipate this is likely in the “easy fix” category.
  2. Looking at this worksheet with source file, things get really wild when you go to the printable version. Somehow, the #conclusion to the first #exercise gets floated up to be after the first #task in the #exercise. Looking at the raw HTML for this printable page, the conclusion is in the correct spot. However, the inspector shows that the conclusion appears to have migrated above the second task. I think this might be a bug in the logic that is blowing things up into pages, since the #exercise in question has more #task than fit on a single page (and thus, structuring with #page here isn’t really a solution unless I elevate the various #task to #exercise).

I had previously run into issues with #task 2b disappearing from the printable version (but space for it and its workspace being left there?). Upgrading my CLI version seems to have resolved that.

Mitch Keller

unread,
Jan 26, 2026, 4:07:00 PMJan 26
to PreTeXt support
I'll add this onto my existing thread, since it is tied up in formatting of printable things. I've got a #handout with an image for which I have written a description. I believe that at one point, Oscar had the print preview set up to suppress the image descriptions and the i icon for them, but now I'm getting both the icon and the image description showing up on the print preview page.

Oscar Levin

unread,
Feb 2, 2026, 9:08:43 AM (13 days ago) Feb 2
to PreTeXt support
Thanks Mitch for noticing these.  A recent PR should fix all three issues.

For the record, these were all caused by other recent "fixes" that solved the task 2b disappearing and better styling of solutions.  

For the indentation and conclusion placement, we switched to "flattening" tasks so they could break between pages, but in doing so, the nested structure was lost (and tasks were placed after the rest of the exercise content, including the conclusion).  Now before we do that, the javascript will add classes .subtask and .subsubtask to keep track of what should be indented, and move conclusions with tasks.

The image descriptions were simply a matter of the javascript rewriting the details as divs, but the css selector still looking for details.

By the way, another side effect of the flattening of tasks is that it is now a bad idea to structure your worksheet with paragraphs or subexercises (not that this was necessarily allowed in the first place).  We should discuss whether this is desired.

Mitch Keller

unread,
Feb 4, 2026, 5:18:30 PM (11 days ago) Feb 4
to pretext...@googlegroups.com
For something like guided notes, I do think it’s nice to be able to use #paragraphs for some structure. Especially if one has 75+ minute class periods, you might need to address parts of two topics on a single day and would rather not end up creating two #handout (or whatever). That said, I don’t think the absence of such structure is a deal breaker if it would make the logic that provides for printable versions of things really complex.

-- 
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/11b1d47b-048f-422d-9d8e-7cf8cb2bb450n%40googlegroups.com.

Rob Beezer

unread,
Feb 5, 2026, 1:40:04 PM (10 days ago) Feb 5
to pretext...@googlegroups.com
#subexercises is only meant for use as a child of #exercises, so it can be
discouraged (by any means) when used in a #worksheet.

#paragraphs is a nice device, and as Mitch notes, it could be useful in a
#worksheet.

Not sure I fully understand how it is a problem, but have two ideas:

1. New templates that match worksheet/paragraphs.

2. Some unwinding of #paragraphs in the pre-processor.

Rob

On 2/4/26 14:15, Mitch Keller wrote:
> For something like guided notes, I do think it’s nice to be able to use
> #paragraphs for some structure. Especially if one has 75+ minute class periods,
> you might need to address parts of two topics on a single day and would rather
> not end up creating two #handout (or whatever). That said, I don’t think the
> absence of such structure is a deal breaker if it would make the logic that
> provides for printable versions of things really complex.
>
>> On Feb 2, 2026, at 8:08 AM, Oscar Levin <oscar...@gmail.com> wrote:
>>
>> Thanks Mitch for noticing these.  A recent PR should fix all three issues.
>>
>> For the record, these were all caused by other recent "fixes" that solved the
>> task 2b disappearing and better styling of solutions.
>>
>> For the indentation and conclusion placement, we switched to "flattening"
>> tasks so they could break between pages, but in doing so, the nested structure
>> was lost (and tasks were placed after the rest of the exercise content,
>> including the conclusion).  Now before we do that, the javascript will add
>> classes .subtask and .subsubtask to keep track of what should be indented, and
>> move conclusions with tasks.
>>
>> The image descriptions were simply a matter of the javascript rewriting the
>> details as divs, but the css selector still looking for details.
>>
>> By the way, another side effect of the flattening of tasks is that it is now a
>> bad idea to structure your worksheet with paragraphs or subexercises (not that
>> this was necessarily allowed in the first place).  We should discuss whether
>> this is desired.
>>
>>
>> On Monday, January 26, 2026 at 2:07:00 PM UTC-7 mi...@rellek.net <http://
>> rellek.net/>wrote:
>>
>> I'll add this onto my existing thread, since it is tied up in formatting
>> of printable things. I've gota #handout <https://math.mitchkeller.phd/
>> applied-combinatorics/notes/notes-strings-2.html> with an image for which
>> I have written a description. I believe that at one point, Oscar had the
>> print preview set up to suppress the image descriptions and the i icon for
>> them, but now I'm getting both the icon and the image description showing
>> up on the print preview page.
>>
>> On Thursday, January 22, 2026 at 2:34:51 PM UTC-6 Mitch Keller wrote:
>>
>> Mostly for Oscar, but those in tune with the CSS may have insights as
>> well.
>>
>> 1. Looking at this worksheet <https://math.mitchkeller.phd/applied-
>> combinatorics/activities/ws-strings-perm-comb.html> with source
>> file <https://github.com/mitchkeller/applied-combinatorics/blob/
>> main/source/worksheets/strings.ptx>, notice how the first
>> #exercise contains a #task that contains yet another #task.. In
>> the non-printable version, this looks correct. However, when I go
>> to the print preview, the sub-#tasks are not indented any more
>> than their parent #task is. I anticipate this is likely in the
>> “easy fix” category.
>> 2. Looking at this worksheet <https://math.mitchkeller.phd/applied-
>> combinatorics/activities/ws-day_one.html> with source file
>> <https://github.com/mitchkeller/applied-combinatorics/blob/main/
>> source/worksheets/intro.ptx>, things get really wild when you go
>> to the printable version. Somehow, the #conclusion to the first
>> #exercise gets floated up to be after the first #task in the
>> #exercise. Looking at the raw HTML for this printable page, the
>> conclusion is in the correct spot. However, the inspector shows
>> that the conclusion appears to have migrated above the second
>> task. I/think/ this might be a bug in the logic that is blowing
>> things up into pages, since the #exercise in question has more
>> #task than fit on a single page (and thus, structuring with #page
>> here isn’t really a solution unless I elevate the various #task to
>> #exercise).
>>
>>
>> I had previously run into issues with #task 2b disappearing from the
>> printable version (but space for it and its workspace being left
>> there?). Upgrading my CLI version seems to have resolved that.
>> --
>> Mitch Keller
>> mi...@rellek.net <http://rellek.net/>
>>
>> http://www.rellek.net/ <http://www.rellek.net/>
>>
>>
>> --
>> 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 topretext-supp...@googlegroups.com <mailto:pretext-
>> support+u...@googlegroups.com>.
>> To view this discussion visithttps://groups.google.com/d/msgid/pretext-
>> support/11b1d47b-048f-422d-9d8e-7cf8cb2bb450n%40googlegroups.com <https://
>> groups.google.com/d/msgid/pretext-
>> support/11b1d47b-048f-422d-9d8e-7cf8cb2bb450n%40googlegroups.com?
>> utm_medium=email&utm_source=footer>.
>
> --
> Mitch Keller
> mi...@rellek.net
>
> http://www.rellek.net/
>
> --
> 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>.
> FBF42BEE-59E5-457E-A862-E2CA81C189B3%40rellek.net <https://groups.google.com/d/
> msgid/pretext-support/FBF42BEE-59E5-457E-A862-E2CA81C189B3%40rellek.net?
> utm_medium=email&utm_source=footer>.

Oscar Levin

unread,
Feb 5, 2026, 5:11:47 PM (10 days ago) Feb 5
to pretext...@googlegroups.com
I like the idea of matching on worksheet/paragraph to give a "floating" title, instead of creating an article|section|div for the whole thing.  We don't do anything at the end of a #paragraphs.  But of course, if we did, then this would not work. 

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/MTAwMDAwNy5iZWV6ZXI.1770316800%40pnsh.

Rob Beezer

unread,
Feb 5, 2026, 11:02:41 PM (10 days ago) Feb 5
to pretext...@googlegroups.com
I'd been thinking along the same lines - we do not work real hard to indicate
the *end* of a #paragraphs, so you could spit out some sort of title/heading to
use as a separator. I think authors of a #worksheet might use #paragraphs to
structure most all of it (if at all), even if we do not enforce that.

On 2/5/26 14:11, Oscar Levin wrote:
> I like the idea of matching on worksheet/paragraph to give a "floating" title,
> instead of creating an article|section|div for the whole thing.  We don't do
> anything at the end of a #paragraphs.  But of course, if we did, then this would
> not work.
>
> On Thu, Feb 5, 2026 at 11:40 AM 'Rob Beezer' via PreTeXt support <pretext-
> sup...@googlegroups.com <mailto:pretext...@googlegroups.com>> wrote:
>
> #subexercises is only meant for use as a child of #exercises, so it can be
> discouraged (by any means) when used in a #worksheet.
>
> #paragraphs is a nice device, and as Mitch notes, it could be useful in a
> #worksheet.
>
> Not sure I fully understand how it is a problem, but have two ideas:
>
> 1.  New templates that match worksheet/paragraphs.
>
> 2.  Some unwinding of #paragraphs in the pre-processor.
>
> Rob
>
> On 2/4/26 14:15, Mitch Keller wrote:
> > For something like guided notes, I do think it’s nice to be able to use
> > #paragraphs for some structure. Especially if one has 75+ minute class
> periods,
> > you might need to address parts of two topics on a single day and would
> rather
> > not end up creating two #handout (or whatever). That said, I don’t think the
> > absence of such structure is a deal breaker if it would make the logic that
> > provides for printable versions of things really complex.
> >
> >> On Feb 2, 2026, at 8:08 AM, Oscar Levin <oscar...@gmail.com
> <mailto:oscar...@gmail.com>> wrote:
> >>
> >> Thanks Mitch for noticing these.  A recent PR should fix all three issues.
> >>
> >> For the record, these were all caused by other recent "fixes" that
> solved the
> >> task 2b disappearing and better styling of solutions.
> >>
> >> For the indentation and conclusion placement, we switched to "flattening"
> >> tasks so they could break between pages, but in doing so, the nested
> structure
> >> was lost (and tasks were placed after the rest of the exercise content,
> >> including the conclusion).  Now before we do that, the javascript will add
> >> classes .subtask and .subsubtask to keep track of what should be
> indented, and
> >> move conclusions with tasks.
> >>
> >> The image descriptions were simply a matter of the javascript rewriting the
> >> details as divs, but the css selector still looking for details.
> >>
> >> By the way, another side effect of the flattening of tasks is that it is
> now a
> >> bad idea to structure your worksheet with paragraphs or subexercises
> (not that
> >> this was necessarily allowed in the first place).  We should discuss
> whether
> >> this is desired.
> >>
> >>
> >> On Monday, January 26, 2026 at 2:07:00 PM UTC-7 mi...@rellek.net
> <mailto:mi...@rellek.net> <http://
> >> rellek.net/ <http://rellek.net/>>wrote:
> >>
> >>     I'll add this onto my existing thread, since it is tied up in formatting
> >>     of printable things. I've gota #handout <https://
> math.mitchkeller.phd/ <https://math.mitchkeller.phd/>
> >>     applied-combinatorics/notes/notes-strings-2.html> with an image for
> which
> >>     I have written a description. I believe that at one point, Oscar had the
> >>     print preview set up to suppress the image descriptions and the i
> icon for
> >>     them, but now I'm getting both the icon and the image description
> showing
> >>     up on the print preview page.
> >>
> >>     On Thursday, January 22, 2026 at 2:34:51 PM UTC-6 Mitch Keller wrote:
> >>
> >>         Mostly for Oscar, but those in tune with the CSS may have
> insights as
> >>         well.
> >>
> >>          1. Looking at this worksheet <https://math.mitchkeller.phd/
> applied- <https://math.mitchkeller.phd/applied->
> >>             combinatorics/activities/ws-strings-perm-comb.html> with source
> >>             file <https://github.com/mitchkeller/applied-combinatorics/
> blob/ <https://github.com/mitchkeller/applied-combinatorics/blob/>
> >>             main/source/worksheets/strings.ptx>, notice how the first
> >>             #exercise contains a #task that contains yet another #task.. In
> >>             the non-printable version, this looks correct. However, when
> I go
> >>             to the print preview, the sub-#tasks are not indented any more
> >>             than their parent #task is. I anticipate this is likely in the
> >>             “easy fix” category.
> >>          2. Looking at this worksheet <https://math.mitchkeller.phd/
> applied- <https://math.mitchkeller.phd/applied->
> >>             combinatorics/activities/ws-day_one.html> with source file
> >>             <https://github.com/mitchkeller/applied-combinatorics/blob/
> main/ <https://github.com/mitchkeller/applied-combinatorics/blob/main/>
> >>             source/worksheets/intro.ptx>, things get really wild when you go
> >>             to the printable version. Somehow, the #conclusion to the first
> >>             #exercise gets floated up to be after the first #task in the
> >>             #exercise. Looking at the raw HTML for this printable page, the
> >>             conclusion is in the correct spot. However, the inspector shows
> >>             that the conclusion appears to have migrated above the second
> >>             task. I/think/ this might be a bug in the logic that is blowing
> >>             things up into pages, since the #exercise in question has more
> >>             #task than fit on a single page (and thus, structuring with
> #page
> >>             here isn’t really a solution unless I elevate the various
> #task to
> >>             #exercise).
> >>
> >>
> >>         I had previously run into issues with #task 2b disappearing from the
> >>         printable version (but space for it and its workspace being left
> >>         there?). Upgrading my CLI version seems to have resolved that.
> >>         --
> >>         Mitch Keller
> >> mi...@rellek.net <mailto:mi...@rellek.net> <http://rellek.net/ <http://
> rellek.net/>>
> >>
> >> http://www.rellek.net/ <http://www.rellek.net/> <http://www.rellek.net/
> <http://www.rellek.net/>>
> >>
> >>
> >> --
> >> 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 topretext-supp...@googlegroups.com <mailto:topretext-
> support%2Bunsu...@googlegroups.com> <mailto:pretext- <mailto:pretext->
> >> support+u...@googlegroups.com
> <mailto:support%2Bunsu...@googlegroups.com>>.
> >> To view this discussion visithttps://groups.google.com/d/msgid/pretext-
> <http://groups.google.com/d/msgid/pretext->
> >> support/11b1d47b-048f-422d-9d8e-7cf8cb2bb450n%40googlegroups.com
> <http://40googlegroups.com> <https://
> >> groups.google.com/d/msgid/pretext- <http://groups.google.com/d/msgid/
> pretext->
> >> support/11b1d47b-048f-422d-9d8e-7cf8cb2bb450n%40googlegroups.com
> <http://40googlegroups.com>?
> >> utm_medium=email&utm_source=footer>.
> >
> > --
> > Mitch Keller
> > mi...@rellek.net <mailto:mi...@rellek.net>
> >
> > http://www.rellek.net/ <http://www.rellek.net/>
> >
> > --
> > 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/>
> > FBF42BEE-59E5-457E-A862-E2CA81C189B3%40rellek.net <http://40rellek.net>
> <https://groups.google.com/d/ <https://groups.google.com/d/>
> > msgid/pretext-support/FBF42BEE-59E5-457E-A862-E2CA81C189B3%40rellek.net
> <http://40rellek.net>?
> > 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>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> support/MTAwMDAwNy5iZWV6ZXI.1770316800%40pnsh <https://groups.google.com/d/
> msgid/pretext-support/MTAwMDAwNy5iZWV6ZXI.1770316800%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
> CAOU9BaVSa%2B4MrNEVmkOy7wez7DeSnXp%3D9oX_P6%3D9ekbiYL8%3Dfg%40mail.gmail.com
> <https://groups.google.com/d/msgid/pretext-support/
> CAOU9BaVSa%2B4MrNEVmkOy7wez7DeSnXp%3D9oX_P6%3D9ekbiYL8%3Dfg%40mail.gmail.com?
> utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages