PreTeXtBook / pretext

PreTeXt: an authoring and publishing system for scholarly documents
https://pretextbook.org
Other
268 stars 210 forks source link

Static representation of RS Component "matching" not working in task #2263

Open dbrianwalton opened 1 month ago

dbrianwalton commented 1 month ago

The tables that should appear in a static representation for "matching" problems are not generated when in anything other than exercise. The relevant templates appear in pretext/xsl/pretext-runestone-static.xsl:

<xsl:template match="exercise/matches/match" mode="matching-statement"> <xsl:template match="exercise/matches/match" mode="matching-solution">

The XPATH match on exercise needs to expand to the broader possibilities, probably something like exercise|&PROJECT-LIKE;|task, but I'm not sure if that is valid at this level of an XPATH or why it wasn't done initially.

rbeezer commented 1 month ago

Being overly restrictive/cautious, I think. I would remove the exercise/ and it should (a) behave for task (and &PROJECT-LIKE) , and (b) not wreck anything else. I've tested (a), have not done a before/after diff for (b).

dbrianwalton commented 1 month ago

If you get a resolution done this afternoon, feel free to just do it. I wouldn't have a chance to actually put together a PR and test until possibly tomorrow based on my current workload.

rbeezer commented 1 month ago

Made the fix, and put your name on it. ;-) At 4c151d6d2f225fee472c66d387c767d3d267d79c Thanks for being part of the bug-rapid-response team.

Added to the sample article under my name. Comprehensive testing indicates no collateral harm.