labeled images in cardsort problems

10 views
Skip to first unread message

David Austin

unread,
Jul 27, 2026, 7:50:04 AM (4 days ago) Jul 27
to prete...@googlegroups.com
As part of the Proteus project, the ULA team authored two #cardsort problems with #prefigure diagrams included in a #response.  Generated images, like #prefigure, #latex-image, and so forth, require a @label attribute, which becomes the filename of the image.  Including a generated image in a cardsort response or premise, however, generates a duplicate-label error in spite of the author including a unique label.  This seems likely to be an issue in other problem types, such as Parsons problems.  Following some discussion in https://github.com/PreTeXtBook/pretext/issues/2927, I'm writing here to start a broader discussion.

Two points from that discussion:

-- The duplicated elements are formed in the assembly process, which includes the labeled images twice.  This triggers the error though the resulting behavior is what we want:  the image is created once with two references to it.  So a reasonable solution is to simply move the check on duplicate labels earlier in the assembly process.

-- One copy of the #image is included inside a #tabular, which violates the schema.  If we want to support this feature, we need another element to support the layout in static builds, perhaps an sbsgroup.

David


Rob Beezer

unread,
Jul 27, 2026, 10:42:33 AM (4 days ago) Jul 27
to prete...@googlegroups.com
Thanks, David, for moving the discussion here. Bigger than just the original
symptom.

On 7/27/26 04:49, David Austin wrote:
> -- The duplicated elements are formed in the assembly process, which includes
> the labeled images twice.  This triggers the error though the resulting behavior
> is what we want:  the image is created once with two references to it.  So a
> reasonable solution is to simply move the check on duplicate labels earlier in
> the assembly process.

I have this on a branch from yesterday that still needs more work - I was going
to go after some stuff in -assembly anyway, so this is just part of that bigger
package.

Rob

Rob Beezer

unread,
Jul 27, 2026, 3:47:05 PM (4 days ago) Jul 27
to prete...@googlegroups.com
On 7/27/26 04:49, David Austin wrote:
> -- The duplicated elements are formed in the assembly process, which includes
> the labeled images twice.  This triggers the error though the resulting behavior
> is what we want:  the image is created once with two references to it.  So a
> reasonable solution is to simply move the check on duplicate labels earlier in
> the assembly process.

The duplicate check has been resolved by moving the check earlier in the
assembly process, so it only reflects *authored* source material.

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

David Austin

unread,
Jul 28, 2026, 7:48:05 AM (3 days ago) Jul 28
to prete...@googlegroups.com
Thanks for your work on this, 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.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAyd3BjWWlHYmQ.1785181624%40pnsh.
Reply all
Reply to author
Forward
0 new messages