Width's of images in worksheets

11 views
Skip to first unread message

Oscar Levin

unread,
Jan 25, 2026, 10:26:54 PMJan 25
to PreTeXt development
I think this is a bug (or a collection of bugs), but wanted to check before making an issue.  Suppose you structure a worksheet with a #sidebyside that holds a pair of #exercise elements.  In such an exercise you include an #image and put a @width attribute (not equal to 100%).  The image does not get scaled to it's desired width at all. 

If you wrap the #image with a #sidebyside (the old way for "bare" images) and put a @width for the #sidebyside, you do get scaling.  But only for the first #exercise, if you do the same thing for the second #exercise the image doesn't show up at all.

If you author an #exercisegroup in your #worksheet, then widths are respected for include #image inside #exercise.

I haven't looked at the xsl yet, or the CSS, so I don't know what the issue might be.  The sample article only has an image with width="100%".  When I'm not on deadline for creating tomorrow's activity, I'll try to make a MWE to share. 

Rob Beezer

unread,
Jan 26, 2026, 1:11:39 AMJan 26
to prete...@googlegroups.com
It does sound like a collection of bugs.

Not sure an #image inside an #exercise inside a #sidebyside has been considered.

First question, the @width is relative to what?

(In a "normal" #sidebyside we assume an #image consumes the whole panel.)

A #sidebyside in a #worksheet, holding #exercise is a really different thing. It is meant to be a convenience for authors, to recycle it as a language for layout control. Perhaps we should identify #sidebyside in the pre-processor - normal, worksheet, interactive - and react accordingly.

When you have a MWE, or a free minute, it'll be interesting to see what LaTeX does with this.

Rob

David Austin

unread,
Jan 26, 2026, 9:03:51 AMJan 26
to prete...@googlegroups.com
I don't mean to muddy the waters, but this sounds similar to the behavior Brian W and I have recently noted in the revealjs conversion.

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

Rob Beezer

unread,
Jan 26, 2026, 2:41:46 PMJan 26
to prete...@googlegroups.com
Not muddying the waters at all. Nor poisoning the well.

A "bare" image gets a width on the #img element, iirc. A "constained" image, like a panel of a #sidebyside fills a box/div that already has the desired width. I believe this is all controlled by a "image-inclusion" template.

Maybe *every* image should go into div.image-box? I think Andrew just did something like this in a more limited scenario?

Rob
Reply all
Reply to author
Forward
0 new messages