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

fix SVG2PDF #3695

Merged
merged 4 commits into from Jul 19, 2013
Merged

fix SVG2PDF #3695

merged 4 commits into from Jul 19, 2013

Conversation

minrk
Copy link
Member

@minrk minrk commented Jul 19, 2013

there were some logical issues, with SVG2PDF assuming it was run
both before and after figure extraction.

Also makes the inkscape command configurable,
in case it doesn't work some places.

Adds pdf block for output in latex templates.

closes #3693

@jdfreder
Copy link
Member

Looks good to me. I can open a PR later adding Win support.

minrk added a commit that referenced this pull request Jul 19, 2013
fix SVG2PDF

there were some logical issues, with SVG2PDF assuming it was run
both before and after figure extraction.

Also makes the inkscape command configurable,
in case it doesn't work some places.

Adds pdf block for output in latex templates.

closes #3693
@minrk minrk merged commit 26d4b0d into ipython:master Jul 19, 2013
@Carreau
Copy link
Member

Carreau commented Jul 19, 2013

You could have waited a little before merging this...

Adding this kind of things was exactly what I was hopping to avoid.
The display data priority should match 1 to 1 with the mimetype of the notebook.
If we add PDF, for latex, then why not add :

  • tif
  • gif
  • bmp
  • ps
  • dvi
  • ...

This was the point of the configurability of ext-map that @ellisonbg wanted to remove. The png/jpg/latex/text/... block should insert into the template the name of the converted figure not the name of the original figure.

@minrk
Copy link
Member Author

minrk commented Jul 19, 2013

it is a bug that the notebook doesn't support
arbitrary mine types, that is mainly a result

@Carreau
Copy link
Member

Carreau commented Jul 19, 2013

So you basically thing we should have almost infinite kind of _repr_mimetype_ ?

@minrk
Copy link
Member Author

minrk commented Jul 19, 2013

mainly a result of a poor decision in the JavaScript, where we convert mine type keys in the display protocol to short keys. We will remove this transform in the next nbformat, thus adding support for all mine types to the notebook document.

@minrk
Copy link
Member Author

minrk commented Jul 19, 2013

So you basically thing we should have almost infinite kind of repr_mimetype ?

The display protocol and display formatted are already extensible to support this. it's just a bug in the notebook document spec that it doesn't reflect this.

@jdfreder
Copy link
Member

A possible solution for the scenario with infinite mime-types would be to add another transformer, one that performed the same mapping functionality @Carreau implemented in the original extract figure transformer. Maybe a FileRenameTransformer... Like @minrk said, something else will be required in 2.0

@Carreau
Copy link
Member

Carreau commented Jul 19, 2013

Hum I don't quite see how this works from end to end, But we'll have the wek to discuss that then.

@minrk
Copy link
Member Author

minrk commented Jul 19, 2013

For now, we can call the writing the new key in the notebook structure instead of resources for the transforms a sub-optimal implementation, and next week we can discuss how we want to deal with the fact that the notebook can contain arbitrary mime-types in 2.0.

@minrk minrk deleted the nbconvert branch July 19, 2013 19:17
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014
fix SVG2PDF

there were some logical issues, with SVG2PDF assuming it was run
both before and after figure extraction.

Also makes the inkscape command configurable,
in case it doesn't work some places.

Adds pdf block for output in latex templates.

closes ipython#3693
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

Successfully merging this pull request may close these issues.

nbconvert does not process SVGs into PDFs
3 participants