sphinx-gallery icon indicating copy to clipboard operation
sphinx-gallery copied to clipboard

Add ability to hide code and display outputs

Open tkaraouzene opened this issue 4 years ago • 3 comments

Hi everyone and first of all thanks for this wonderful library 👏 !

I just would have a feature request which consist to be able to hide the code and only show the output.

For example I would like to be able to compute and display plots at runtime without having to show the code.

Thanks!

tkaraouzene avatar Sep 22 '21 19:09 tkaraouzene

If we add a :class: sphinx-gallery-code or .. rst-class:: to the literal block just like we have for sphx-glr-script-out, it would be easy for you to add a CSS rule with visibility: hidden for it. @tkaraouzene are you up for making a PR to add this class to the code block literals?

larsoner avatar Sep 22 '21 19:09 larsoner

Hi @lamby and thank you for your answer.

I'm not sure to fully understand what I have to do but I'll try to do it as soon as possible.

tkaraouzene avatar Sep 29 '21 12:09 tkaraouzene

I think you meant to ping @larsoner here :)

lamby avatar Sep 29 '21 12:09 lamby