Opened 3 years ago

Last modified 3 years ago

#22508 new enhancement

exercise/quesion sections with folded/hidden solution/answer/hint sections in tutorials

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-7.6
Component: documentation Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by tmonteil)

In thematic tutorials, we would like to propose non-trivial exercises, so that we should propose a solution or some hints. However, the solution should not be readable at the first look of the page, but still accessible by the user.

Besides EXAMPLES, TESTS,... sections, we could provide an EXERCISE type of section, as well as a SOLUTION/ANSWER/HINTS.

This approach might be not flexible enough, so we might prefer the way used in some thematics tutorials (e.g. http://doc.sagemath.org/html/en/thematic_tutorials/tutorial-comprehensions.html):

.. TOPIC:: Exercises

so that we can use the appropriate name (question,exercise,answer,hint...) without creating tons of section types. Hence, another way to complete this ticket would be to have a kind of "FOLDED_TOPIC" or "HIDDEN_TOPIC" that is folded by default.

This folding should work both in sphinx-produced html, and when translating it into ipynb (via sage -rst2ipynb), see e.g. https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tree/master/src/jupyter_contrib_nbextensions/nbextensions/collapsible_headings

Another possibilty could be to write solutions in a separate file with links to it.

This description is pretty vague since i do not have any idea on the way to achieve such question/hidden_answer feature.

See this sage-devel thread.

Change History (1)

comment:1 Changed 3 years ago by tmonteil

  • Description modified (diff)
Note: See TracTickets for help on using tickets.