nbsphinx
nbsphinx copied to clipboard
Added the hide_input option
This partially covers #81 and #6.
With "hide_input": true
as cell metadata the cell input is hidden but not the output.
This solution is not very elegant since the "Out[10]" is still there
Thanks for the PR.
Did you try to set nbsphinx_prompt_width
to zero?
There is also a CSS class named prompt
, which you can probably use.
Note that those won't affect LaTeX output.
BTW, what HTML theme are you using? The prompts are not supposed to have a scrollbar. But probably this should somehow be disabled with CSS?
About your PR: I think it's better to wait a bit to see how the "hiding" discussion in Jupyter turns out.
You should join the discussion!
There is some discussion in #65, which has links to more discussions in the Jupyter repos.
Sorry for the late reply, I was offline.
The theme is alabaster and what you see in the image is a pandas dataframe (not sure if this matters)
Thanks for the update!
I've changed the CSS in 51ca141e089227d5647a3a3f8a84918fccf2d118, can you please show how it looks like when you use the master
branch?
Better, thanks!
Is it possible to remove also the "Out[10]" and maybe align to the left (or center)?
Thanks for trying it again, but could you please try it with a two-digit execution count?
Is it possible to remove also the "Out[10]" and maybe align to the left (or center)?
Sure, everything is possible. But I don't know yet what's the best way to do that. I'd have to look into that, but I don't know when I'll have time for that.
If someone else wants to give it a shot, go ahead!
could you please try it with a two-digit execution count?
I'd have to look into that, but I don't know when I'll have time for that.
Thant's OK, thank you for your help :-)
Thanks.
So the scrollbar is still there ... are you sure you were using the master
branch?
are you sure you were using the master branch?
I think so...
Can you please check if you have this CSS in the output HTML file?
div.nbinput div.prompt pre,
div.nboutput div.prompt pre {
overflow: hidden;
}
Can you please check if you have this CSS in the output HTML file?
div.nbinput div.prompt pre,
div.nboutput div.prompt pre {
overflow: hidden;
}
This is not present.
An interesting thing: in my test case I have essentially only 1 notebook called "preprocessor". Because of that my index points only at the preprocessor.html file. Now, in the picture below on the right side there is the preprocessor.html open directly with the browser, on the left side the same file open from the index:
the horizontal scroll bar is present only on the left.
If the mentioned CSS is not present, you are not using the master
branch.
In the screenshot you show two files with the same name (preprocessor.html
) but different paths.
Are they supposed to be the same file?
The right one seems to be missing the external CSS (it only has the one from nbsphinx
, which is embedded in the HTML).
You should check for error messages in the Chromium Developer Tools.
Q: 'nbsphinx_prompt_width' in the conf.py from sphinx or where to set?
A: yes