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
Adding PDFFormatter and kernel side handling of PDF display data #4920
Conversation
OK the basics are now working, along with a refactored
The problem is that the IPython input machinery sees the
|
Looks like we have another bug: |
I have also tested this with nbconvert and it uses the embedded PDF files for latex/PDF output. Yeah! |
Note that this would partially conflict with one PR of mine. Also I think at some point we were wondering if we shoudln't have a Now go to sleep Brian :-) |
Great! |
Disabling var_expand on several magics that don't actually want the extra magic would solve a lot of issues, but it's probably a task for another time. In general, I'm not convinced that runtime config should really be the recommended approach for anything we expect people to actually change, since many configurables only make sense on first load, and can have weird, incomplete effects when changed at runtime. I would suggest making the recommended approach directly calling |
@@ -79,6 +79,12 @@ def _figure_format_changed(self, name, old, new): | |||
else: | |||
select_figure_format(self.shell, new) | |||
|
|||
figure_format = Unicode() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should still be configurable with a deprecation note
The decision from the dev meeting is to:
Commits on the way... |
I just pushed a commit that adds this API:
Alternatives:
Also, much nicer to call most of the time is the
Thoughts? |
We decided |
I have made the API changes discussed. For consistency I have also added a |
|
||
In [1]: set_matplotlib_formats('png', 'jpeg', quality=90) | ||
|
||
To set this in your config files use the following:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For equivalence with the example above, this should also indicate how to set the quality parameter in the config file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Looks great. I made some small comments about docs, and it's also missing an entry in the what's new/api changes documentation sources indicating the new/changed API calls. Once these small fixes are in, this looks good to merge to me. |
Review comments addressed, ready for merge. |
Adding PDFFormatter and kernel side handling of PDF display data
@ellisonbg Two questions:
|
.3. Will there be a 'Download As' > 'PDF (.pdf)`? Trying to respond to this: http://www.reddit.com/r/IPython/comments/1xzjrx/ipython_founder_details_road_map_for_interactive/cfg1ex2
? |
Yes, but not immediately. We plan to replace the |
This affects execution, it does not affect the choices in nbconvert.
Not at all. |
Cool; thanks. So will that require all 1G of rst2pdf/xhtml2pdf (reportlab) may also work. On 2/15/14, Min RK notifications@github.com wrote:
Wes Turner |
You can get by with basictex and then installing the missing packages with |
I should mention that with this change, if you have PDF output for a cell On Sat, Feb 15, 2014 at 11:43 AM, Min RK notifications@github.com wrote:
Brian E. Granger |
Oh, I didn't see that you added a application/pdf->pdf transform in the javascript. That should probably not have been added. I'll make a PR to remove that. |
I thought this was a originally a "not yet" thing. But once I got working, On Sat, Feb 15, 2014 at 1:13 PM, Min RK notifications@github.com wrote:
Brian E. Granger |
The "not yet" part is fixing the renames that we already do. That doesn't mean that any new formats should get their own rename, knowing that it will just be removed later. We can already have arbitrary mimetype output in the notebook document, so I don't think there's a reason to add a rename for pdf.
No capabilities are affected. The only thing I removed in #5132 is renaming 'application/pdf' to 'pdf', which did not add anything. |
OK, thanks for the clarification, sounds good. On Sat, Feb 15, 2014 at 6:55 PM, Min RK notifications@github.com wrote:
Brian E. Granger |
Adding PDFFormatter and kernel side handling of PDF display data
This is a continuation of #4130 to add PDF handling.