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

Added the hide_input option #86

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gpagliuca
Copy link

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
untitled

@mgeier
Copy link
Member

mgeier commented Dec 23, 2016

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.

@gpagliuca
Copy link
Author

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)

@mgeier
Copy link
Member

mgeier commented Jan 10, 2017

Thanks for the update!
I've changed the CSS in 51ca141, can you please show how it looks like when you use the master branch?

@gpagliuca gpagliuca closed this Jan 11, 2017
@gpagliuca gpagliuca reopened this Jan 11, 2017
@gpagliuca
Copy link
Author

Better, thanks!

untitled

Is it possible to remove also the "Out[10]" and maybe align to the left (or center)?

@mgeier
Copy link
Member

mgeier commented Jan 12, 2017

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!

@gpagliuca
Copy link
Author

gpagliuca commented Jan 13, 2017

could you please try it with a two-digit execution count?

untitled

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 :-)

@mgeier
Copy link
Member

mgeier commented Jan 15, 2017

Thanks.
So the scrollbar is still there ... are you sure you were using the master branch?

@gpagliuca
Copy link
Author

are you sure you were using the master branch?

I think so...

untitled

@mgeier
Copy link
Member

mgeier commented Jan 16, 2017

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;
}

@gpagliuca
Copy link
Author

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:

screenshot_2017-01-18_10-47-11

the horizontal scroll bar is present only on the left.

Here the 2 html files and the original notebook

@mgeier
Copy link
Member

mgeier commented Jan 18, 2017

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.

@rddaz2013
Copy link
Contributor

Q: 'nbsphinx_prompt_width' in the conf.py from sphinx or where to set?

@mgeier
Copy link
Member

mgeier commented Apr 26, 2018

A: yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants