These are chat archives for ipython/ipython

9th
Nov 2014
Min RK
@minrk
Nov 09 2014 03:17
@epifanio markdown to latex is handled via pandoc. It might be a bug there.
try running the same snippet through pandoc directly, and see if it comes out right.
epifanio
@epifanio
Nov 09 2014 03:18
hi @minrk i’ll try this way, i have a simple notebook that shows the issues i mentioned before
for now i’m working on fixing my notebook to have a proper pdf print, i replaced the single $ woth double $ and using HTML(image) in a code cell to display the images
i need this for an assigment at school
:) … due for monday (sweat)
i never used pandoc directly, i tought it was handled by mistune now
is’n it ?
Min RK
@minrk
Nov 09 2014 03:28
mistune is only for markdown->html. Pandoc handles all other X->Y transforms
epifanio
@epifanio
Nov 09 2014 03:28
oh i see, that’s why nbviewer work fine
ok
epifanio
@epifanio
Nov 09 2014 03:35
@minrk one more question .. the new notebook doesn’t support heading cell anymore, is there any solution to fix toc.js extension to generate the table of contents using markdown cell instead ?
Min RK
@minrk
Nov 09 2014 03:35
yes, I'll fix it
epifanio
@epifanio
Nov 09 2014 03:35
great! toc.js is really cool and super useful
Min RK
@minrk
Nov 09 2014 04:03
@epifanio toc.js should work with master now
epifanio
@epifanio
Nov 09 2014 04:05
cool, testing now :)
Jonathan Frederic
@jdfreder
Nov 09 2014 07:10
@jasongrout I still haven't been able to figure it out. If you want to take a look please do. The log statement output makes things more confusing than before. Also, I ran into some kind of OSX + PhantomJS system out error, which totally halted my investigation. All I think I can do now is try to implement things piece by piece from the beginning.
epifanio
@epifanio
Nov 09 2014 09:59

@minrk , i had to deal with browser cache and right .ipython dir being used (i’m not using default path) now toc work great again.
I found other bugs in the conveter to pdf

  • when ipython.display.image is used, if the img file point to an url the image is not renderedand
  • if i have a function that return the content of HTML(“ “) [_repr_html ?] it is not rendered ( it prints the class object instead)

I’m trying some markdown syntax on : http://johnmacfarlane.net/pandoc/try/ is there a way to save the “latex” file generated by nbconveter when i hit the button “save as pdf” ? I can use it to compare the syntax and try to build it with my latex compiler

epifanio
@epifanio
Nov 09 2014 17:33
is nbvewer able to render the new notebook format ?
i’m having 400: Bad Request
Min RK
@minrk
Nov 09 2014 17:37
@epifanio not yet, it should be able to next week.
epifanio
@epifanio
Nov 09 2014 17:38
ok, i’m having internet trouble in my new place so i was wondering if was a malformed upload
thanks to confirm!
i’m trying to make a test notebook to list all the problems to convert to pdf
i saw that for latex there are some special “usepackages” that are capable to render images from url
and seems that pandoc doesn’t use them
same for html in return form “_repr_html” pandoc put “Out[31]: <IPython.core.display.HTML object>” in the pdf, instead of rendering the html table
Min RK
@minrk
Nov 09 2014 17:42
you can modify the template used to write latex
It's not generally safe to assume that HTML can be converted to latex
simple tables can, but the default nbconvert template does not assume that
if you want it to, you can modify the template to run pandoc html->latex on html outputs
epifanio
@epifanio
Nov 09 2014 17:44
i’ll try that, but this mean i can’t use the “save to pdf” action from the toolbar any more, right ?
instead i should connect it to a “custom button” as js extension .. i guess
Min RK
@minrk
Nov 09 2014 17:44
you can set the custom template in your IPython config
so that latex export uses it by default
in which case, it would be used in PDF export
epifanio
@epifanio
Nov 09 2014 17:45
oh i see, i need to check how to use custom template in nbconvert
i never tryied it .. i should hgave done long time ago
Dale Jung
@dalejung
Nov 09 2014 22:21
fyi @ivanov codemirror/CodeMirror#2915 changes in vim keymap might screw up vimception. it messed up my integration.
Kyle Kelley
@rgbkrk
Nov 09 2014 22:50
This message was deleted
@epifanio nbviewer now renders nbformat4 due to PR and deploy by @minrk
epifanio
@epifanio
Nov 09 2014 22:54
:)