You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hide Content Only Works For Non-Proof Directives, here #86
context
When I add the class dropdown to any directive except
````{prf:proof}
:class: dropdown
````
the directives become collapsible in the HTML output opened in a browser.
expectation
I expected the feature to work for actual proofs, too.
bug
But instead I only succeed creating collapsible remarks, corollaries, notes, lemmas, theorems, ....
Additional tests suggest the feature may not work in these two situations, either:
anywhere in the markdown file after a prf:proof directive had been used
directives that have a caption as in ````{prf:lemma} caption to be shown as Lemma 1 (caption)
I did not find any error message possibly related to this.
problem
This is a problem for people creating lectures or slides for talks because hiding proofs is often of greater interest than hiding theorems when we want to convey the concepts.
Reproduce the bug
Create a Jupyter Book making use of sphinx-proof
Add the directives
````{prf:theorem}
:class: dropdown
All natural numbers are small.
````
and
````{prf:proof}
:class: dropdown
* $1$ Is small.
* If $n$ is small then $S(n)$, the successor of $n$ is small.
* By induction, all natural numbers are small.
````
Same issue here. I think it might be because "proof" doesn't have a title line that can be made clickable? Maybe it would be useful to add an option to provide a title to the "Proof" block.
Now, I'm focused on completely different topics and cannot test that now. However another dropdown issue was solved by putting the contents inside a {div}-directive. Would anynone test and tell if that helps here, too?
I have created a version of sphinx-proof for my own project and changed a few things. One of the things is that now one can turn proof into something collapsible with an easy setting. Here is the fork.
(Maybe it will be useful to someone stumbling over the same hurdle).
The changes are rather big and I don't understand the codebase too well, so I am not making a PR at this point....
Activity
lellmann commentedon Aug 24, 2022
Same issue here. I think it might be because "proof" doesn't have a title line that can be made clickable? Maybe it would be useful to add an option to provide a title to the "Proof" block.
MPenaR commentedon Nov 10, 2024
Same problem here, anyone found a way around?
schwabts commentedon Nov 10, 2024
Now, I'm focused on completely different topics and cannot test that now. However another dropdown issue was solved by putting the contents inside a
{div}-directive. Would anynone test and tell if that helps here, too?tdsimao commentedon Sep 26, 2025
I am having the same problems. I tried the
divdirective without success. Curious to hear if someone found a workaround.Ljon4ik4 commentedon Dec 18, 2025
I have created a version of sphinx-proof for my own project and changed a few things. One of the things is that now one can turn proof into something collapsible with an easy setting. Here is the fork.
(Maybe it will be useful to someone stumbling over the same hurdle).
The changes are rather big and I don't understand the codebase too well, so I am not making a PR at this point....