Skip to content

Conversation

@jonahbedouch
Copy link
Collaborator

@jonahbedouch jonahbedouch commented Jun 3, 2025

The current coverpage implementation compares with string instead of str, so linking to another document does not work correctly.

It also sets coverpage = function() when a function is passed in, so the result of the function is never rendered to the document.

Finally, it only updates solution visibility in the main path, so using a custom coverpage breaks showing or hiding solutions.

This PR resolves these three things.

src/lib.typ Outdated
}
}

states.print-answers.update(it => print-answers)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this line need to remain? I feel like it would make more sense to remove it and mandate that coverpages that rely on print-answers must set it themselves?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes sense, but only if we also do this on the default coverpage (IE: state management doesn't happen at all around coverpage, and the built-in coverpage.typ sets this itself.

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.

2 participants