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

DataFrames rendered with Python Markdown {{ }} do not convert #320

Closed
clayms opened this issue May 31, 2016 · 8 comments
Closed

DataFrames rendered with Python Markdown {{ }} do not convert #320

clayms opened this issue May 31, 2016 · 8 comments
Milestone

Comments

@clayms
Copy link

clayms commented May 31, 2016

DataFrames refered to with the Python Markdown {{Table1}} notation display just fine inside the notebook. However, they do not convert into a pdf with nbconvert. All I see is the {{Table1}} Python Markdown reference.

Do I need to add a special code block in a latex .tplx template file? If so, any idea what that code would be?

@clayms clayms changed the title DataFrames rendered with Python Markdown do not convert DataFrames rendered with Python Markdown {{ }} do not convert May 31, 2016
@clayms
Copy link
Author

clayms commented May 31, 2016

Actually none of the variables referred to in markdown cells with the Python Markdown {{}} notation work.

@clayms
Copy link
Author

clayms commented May 31, 2016

Also, I did try adding --execute to the console command which did not help.

@juhasch
Copy link
Contributor

juhasch commented May 31, 2016

Did you check if the PyMarkdownPreprocessor is called from nbconvert ?
If not, see https://github.com/ipython-contrib/IPython-notebook-extensions/tree/master/nbextensions/usability/python-markdown
It should work for both HTML and PDF

@clayms
Copy link
Author

clayms commented May 31, 2016

I did try adding the following to my config file but still get errors. Don't think I have pre_pymarkdown.py in the right place.

c = get_config()
c.Exporter.preprocessors = ['pre_pymarkdown.PyMarkdownPreprocessor']

@juhasch
Copy link
Contributor

juhasch commented May 31, 2016

pre_pymarkdown.py is a Python file, so you need to have it in your Python path or add it to PYTHONPATH.

@clayms
Copy link
Author

clayms commented May 31, 2016

Thanks @juhasch, yes. I thought it would have installed by default. Was not anywhere on my file system. Downloaded from github and put in Anaconda folder, which is the Python path on my system. Closing this now.

@clayms clayms closed this as completed May 31, 2016
@minrk minrk added this to the no action milestone May 31, 2016
@mooneyme
Copy link

@juhasch I'm having the same issue for all notebooks generated using nbconvert. My pre_markdown.py is in my PYTHONPATH, so that's not the issue. I'm thinking is has something to do with the PyMarkdownPreprocessor, though I'm not entirely sure.

Any thoughts on whats going on? (The link you posted is no longer active.)

@juhasch
Copy link
Contributor

juhasch commented Mar 29, 2017

Documentation is available here: http://jupyter-contrib-nbextensions.readthedocs.io/en/latest/

If you install the PyPi or conda-forge packages, you should not need to set PYTHONPATH or do any manual configuration. Feel free to open a new issue at the https://github.com/ipython-contrib/jupyter_contrib_nbextensions repo.

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

4 participants