-
Notifications
You must be signed in to change notification settings - Fork 132
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
Syntax highlighting of python 2 notebooks not working on readthedocs #27
Comments
I'm not sure what's the problem, because it works fine on the You could try to add |
I figured it out. For some reason this bug affects notebooks run in python 2. The notebook needs to have I am changing the issue title to reflect this. |
This is done instead of converting them to rst first with nbconvert. The notebooks also needed to be run in IPython 3 to work around spatialaudio/nbsphinx#27
This is done instead of converting them to rst first with nbconvert. The notebooks also needed to be run in IPython 3 to work around spatialaudio/nbsphinx#27
This is done instead of converting them to rst first with nbconvert. The notebooks also needed to be run in IPython 3 to work around spatialaudio/nbsphinx#27
Thanks for the update, I'm glad that it works now for you. But I still don't know what the actual problem was ... Did you happen to change the setting for the Python interpreter (2.x vs. 3.x) in the "Advanced Settings" on RTD (see point 4 here)? Did you use or are you using |
I had the same issue as OP, syntax highlighting inside notebook cells OK on a local build, but not on RTFD. I fixed it by following the instructions in @mgeier's link, mainly adding I guess its unclear to me from the link if I'm supposed to have had to do this, but at least I can say that it worked. Repo in question, if its useful to anyone: http://cosmoslik.readthedocs.io/ |
I think it should not be necessary to explicitly specify @marius311 Probably just adding |
Just checked and you're right, just |
Thanks for confirming that! I've added some documentation about it: http://nbsphinx.readthedocs.io/en/latest/usage.html#Syntax-Highlighting |
…ighlighting to conf.py in order to try and get syntax highlighting in ipynb. see spatialaudio/nbsphinx#27
created docs with ipynb example, setups and requirements and github actions added github action to deploy, probably will require need to debug updated bug in github repo and username updated workflow to deploy docs debug for workflow debug for workflow debug for workflow debug for workflow debug for workflow debug for workflow debug for workflow debug for workflow debug for workflow new action added env ssh key added gh_token to secrets added gh_token to secrets using cpina with SSH changed deployment to https://cpina.github.io/push-to-another-repository-docs/sphinx-example.html updated docs for push ofuxed error in make and with touch attempt now branch gh-pages exists: g docs --> /docs in target-directory changed back target directory and source_directory now has docs/_ moved target directory to . to see if docs are detected in this fashion moved target directory to . to see if docs are detected in this fashion added ipython to requirements and IPython.sphinxext.ipython_console_highlighting to conf.py in order to try and get syntax highlighting in ipynb. see spatialaudio/nbsphinx#27 added pygments_lexer and as a extension in conf.py and as a requirement
I'm not sure if this is the appropriate place for this, so feel free to close if it's not.
On readthedocs, I don't get syntax highlighting (conf file): http://cobrapy-test.readthedocs.org/en/latest/getting_started.html#Reactions
However, I do get syntax highlighting when I make the docs locally
The text was updated successfully, but these errors were encountered: