-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add functionality to hide Python prompts #48
Comments
Sure, I like this feature, but wouldn't it be possible to implement this as a theme-independent separate extension? The CSS probably wouldn't be perfect for every possible theme, but I guess it could be made to work with at least a few selected themes. |
To be honest I'd prefer the road of least resistance for now. Since I'm not firm witch CSS and don't want to generate additional work for me in case someone tries the extension and opens issues when it doesn't work for other themes. Would that be ok for you? |
Me too, that's why I'd prefer a separate Sphinx extension. When I first saw that feature, I was actually surprised that it wasn't a re-usable Sphinx extension. But if there are technical reasons that speak against that, I'm open to discussions about including it here.
You don't have any obligations, you can support as many or as few themes as you like, for how long you like. Either way, this feature would have to be able to be switched off, in order to not conflict with other extensions like https://github.com/executablebooks/sphinx-copybutton (which BTW has the same problem of not working for all themes). |
Ok, I'll try to find time to look into it and update this thread if I make progress :) |
I have used https://github.com/executablebooks/sphinx-copybutton since a longer time and it works great, see https://audeering.github.io/audeer/api-audeer.html for an example. |
It would be great to have the possibility to hide the python prompts
>>>
from code blocks for easier copy-pasting.Here's an example in scipy. The
>>>
button on the top right corner of the code examples removes them:https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.interp1d.html
Copy-pasting code with the
>>>
visible will add an empty line between each line you see in the example. Doing the same without the>>>
visible removes the empty lines.I found a discussion of this in another theme and might find some time to give it a go. Would you include it in your code?
readthedocs/sphinx_rtd_theme#167
The text was updated successfully, but these errors were encountered: