How to leave blank space for homework solutions? #5823
-
DescriptionI'm trying to use quarto to generate homework assignments and corresponding solution keys in pdf format. I figured out how to hide the solutions using profiles, like this:
Here's the output with the default profile: Here's the output with I'm wondering if there's a way to leave blank space for students to write in their solutions, when rendering the default profile (without solutions). Two solutions that I've tried are:
Thanks for any suggestions! |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
-
You could create a filter that replaces the strings of the solution text with random text of the same length, and then set the font color to your background color. It's not going to be perfectly equal, but it's probably good enough. |
Beta Was this translation helpful? Give feedback.
-
Kind of a weird LaTeX hack, but tcolorbox has an "invisible" setting to not display the content, so you could have
|
Beta Was this translation helpful? Give feedback.
-
Is there a way to customize the "solution" environment (https://quarto.org/docs/authoring/cross-references.html#theorems-and-proofs) to do something similar? That might simplify the process of tagging the solution sections for hiding. |
Beta Was this translation helpful? Give feedback.
-
Maybe the unilur extension can help with this: https://github.com/ginolhac/unilur |
Beta Was this translation helpful? Give feedback.
-
FWIW, I was looking for a solution that worked with HTML format, and the above did not cut it, so I used this:
|
Beta Was this translation helpful? Give feedback.
Kind of a weird LaTeX hack, but tcolorbox has an "invisible" setting to not display the content, so you could have