Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide Content Only Works For Non-Proof Directives, here #86

Open
schwabts opened this issue Aug 24, 2022 · 1 comment
Open

Hide Content Only Works For Non-Proof Directives, here #86

schwabts opened this issue Aug 24, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@schwabts
Copy link

schwabts commented Aug 24, 2022

Describe the bug

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:
    1. anywhere in the markdown file after a prf:proof directive had been used
    2. 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

  1. Create a Jupyter Book making use of sphinx-proof
  2. 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.
````
  1. jb build book/

List your environment

Jupyter Book : 0.13.0
External ToC : 0.2.4
MyST-Parser : 0.15.2
MyST-NB : 0.13.2
Sphinx Book Theme : 0.3.3
Jupyter-Cache : 0.4.3
NbClient : 0.5.3

@schwabts schwabts added the bug Something isn't working label Aug 24, 2022
@lellmann
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants