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

ipynb2doconce missing sympy latex and matplotlib figures #85

Open
nagordon opened this issue Sep 26, 2016 · 4 comments
Open

ipynb2doconce missing sympy latex and matplotlib figures #85

nagordon opened this issue Sep 26, 2016 · 4 comments
Assignees

Comments

@nagordon
Copy link

I think this is more of a feature request, but the ipynb2doconce command does not capture latex output from sympy equations or matplotlib figures in jupyter notebooks. Thanks.

@hplgit
Copy link
Owner

hplgit commented Sep 26, 2016

Unfortunately, I will not be able to add this feature now. But feel free to contribute.

@KGHustad
Copy link
Collaborator

KGHustad commented Oct 2, 2016

I like the idea. Perhaps including output from IPython/Jupyter notebooks should be optional? For my own use, I cannot think of a scenario where I would not want to include all the output, but I still feel there should be an option which allowed for just including the input. There is also the issue with how one distinguishes between input and output (such as printed results), and how this is going to fit in with how a DocOnce document is structured.

I made a quick modification to allow for inclusion of SymPy LaTeX, which seems to work perfectly well. Will probably push this soon.
EDIT: Pushed to a new branch of my fork, see https://github.com/KGHustad/doconce/tree/ipynb2doconce_sympy_latex . Will push to master when I have had more time to test it.

I will have a look at matplotlib figures later.

@KGHustad KGHustad self-assigned this Oct 2, 2016
@KGHustad
Copy link
Collaborator

ipynb2doconce includes LaTeX output as of 1b3d50c .

Exporting the matplotlib figures in a way that preserves quality is going to be harder as they appear to be stored only in as a low-res png.

@utsekaj42
Copy link

utsekaj42 commented Nov 10, 2017

According to this

from IPython.display import set_matplotlib_formats
set_matplotlib_formats('png', 'pdf')

This allows one to at least generate pdfs of the figures in the notebook when downloading as latex.

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