executablebooks / sphinx-exercise

A Sphinx extension for producing exercise and solution directives.
https://ebp-sphinx-exercise.readthedocs.io
MIT License
19 stars 7 forks source link

Parameter to complete the title #57

Open paugier opened 2 years ago

paugier commented 2 years ago

Context

It would be nice to be able to have "Exercise 1 (advanced)" or "Exercise 1: do something great". Is it already possible?

Proposal

I guess we would need another parameter (I use subtitle but it might not be very appropriate)

```{exercise}
---
label: ex1
subtitle: " (advanced)"
---
...


### Tasks and updates

_No response_
welcome[bot] commented 2 years ago

Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:

paugier commented 2 years ago

Looking at the code, I understood that it is already possible to have "Exercise 1 (advanced)"! However, it is not mentioned in the documentation. The supported syntax is:

```{exercise} advanced
---
label: ex1
---
...