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

[toc2] changes width of notebook cells #993

Closed
ostrokach opened this issue May 18, 2017 · 7 comments
Closed

[toc2] changes width of notebook cells #993

ostrokach opened this issue May 18, 2017 · 7 comments

Comments

@ostrokach
Copy link

Enabling "Table of Contents (2)", even with all options unchecked, still changes the witdth of my notebook cells.

With "Table of Contents (2)" disabled:

selection_014

With "Table of Contents (2)" enabled (all options unchecked):

selection_015

I'm trying to get a floating table of contents without changing the default witdth of my notebook cells.

Thank you!


jupyter_contrib_nbextensions 0.2.8-py36_0 conda-forge
@ostrokach ostrokach changed the title Enabling Enabling Table of Contents (2) changes default width of notebook cells May 18, 2017
@ostrokach ostrokach changed the title Enabling Table of Contents (2) changes default width of notebook cells Enabling "Table of Contents (2)" changes default width of notebook cells May 18, 2017
@ostrokach
Copy link
Author

Adding the following line to ~/.jupyter/custom/custom.css and restarting seems to produce the desired result:

#notebook-container {
  width:1140px !important;
}

@jcb91
Copy link
Member

jcb91 commented May 19, 2017

Adding the following line to ~/.jupyter/custom/custom.css and restarting seems to produce the desired result:

Unfortunately this will only be true for your screen width and other in the same range. For substantially different widths, this will cause a similar problem to what you're encountering. Toc2 should simply not alter the width at all with the option unchecked, but it appears that that is not happening, so this is a bug.

@jcb91 jcb91 changed the title Enabling "Table of Contents (2)" changes default width of notebook cells [toc2] changes width of notebook cells May 19, 2017
@jfbercher
Copy link
Member

ok. I can reproduce and will have a look this we.

jfbercher added a commit to jfbercher/jupyter_contrib_nbextensions that referenced this issue May 20, 2017
jfbercher added a commit to jfbercher/jupyter_contrib_nbextensions that referenced this issue May 20, 2017
@jfbercher
Copy link
Member

Closed by #994

@ostrokach
Copy link
Author

ostrokach commented May 25, 2017

Thanks a lot for trying to fix this!

However, I tried installing the latest master tarball:

pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
# not sure when one of these to run with an anaconda install, so tried both...
jupyter contrib nbextension install --sys-prefix
jupyter contrib nbextension install --user

restarting the jupyter notebook and refreshing all the windows, but I am still getting the same problem. Am I doing something wrong?

@jfbercher
Copy link
Member

Can you try to open
http://localhost:8888/nbextensions/toc2/toc2.js
(assuming that your server runs on port 8888)
and check if function setNotebookWidth(cfg, st) contains
$("#notebook-container").css({'width':''}) ?
This is just to check that you execute the last version.

@jfbercher jfbercher reopened this May 25, 2017
@ostrokach
Copy link
Author

Sorry, false alarm. I should have uninstalled the conda version before installing the master branch tarball using pip:

conda uninstall jupyter_contrib_nbextensions
pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
jupyter contrib nbextension install --sys-prefix

Now it works perfect.

Thanks a lot!!

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

No branches or pull requests

3 participants