Skip to content

Export the solution environment convert's own example uses - #81

Merged
peterbjohnson merged 7 commits into
devfrom
wb/t52
Sep 21, 2026
Merged

peterbjohnson merged 7 commits into
devfrom
wb/t52

Conversation

@peterbjohnson

Copy link
Copy Markdown
Member

in2lambda convert in2lambda/filters/PartsOneSol/example.tex PartsOneSol returns both questions with no worked solution. The PartsOneSol filter matches a Div only when pf.stringify(elem.content[0].content) == "Solution"; pandoc writes the example's solution environment as a Div with class solution and no such text, so the filter never sees a solution. t49 found this by comparing the draft route with convert on the package's own example.

Make the filter recognise the solution environment as pandoc writes it: a Div whose classes hold solution, and keep the text match for documents that write a Solution heading inside the div. Check the other three filters for the same test and fix them the same way. A test in tests/ runs each filter's example.tex through runner and asserts every question that has a solution environment in the source has a non-empty worked solution in the set. Done when the four examples export their solutions and the existing filter tests pass.


Workbench ticket t52.

@peterbjohnson
peterbjohnson merged commit 437e343 into dev Sep 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant