[IPython-dev] CodeMirror versions?

pierre.gerold pierre.gerold at laposte.net
Fri Jun 20 08:18:00 EDT 2014


Le 19/06/2014 20:27, Fernando Perez a écrit :
> Hey Doug,
>
> as you look into markdown questions for more academic/scientific work, 
> it's worth keeping an eye on "Pandoc markdown":
>
> http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown
>
> which is an extension in this direction, and one that was adopted by 
> the last version of RStudio for their RMarkdown work:
>
> http://www.rstudio.com/products/rstudio/download/preview/
>
> This requires server-side components (and pandoc, at that!), but if 
> things gain traction in this direction, it may be better to 
> collaborate rather than reinvent...
>
> Cheers
>
> f

Hi,

As Matthias said, I have more or less the same purpose as Doug, namely, 
create academic document using IPython. If you want to replace marked 
markdown rendering by pandoc ones, I have investigated a bit.

I have a draft of notebook with all ingredients making things works ( 
except the javascript linking .. but if you are interrested in I can 
help). Basicaly, rendering a IPython cell with Pandoc needs just a very 
easy filter (written in python) and , of course, put the rendering in 
server side. But you gain all the Pandoc markdown functionnality (A lot 
of !). Also, doing that, you are sure that nbconvert and interactive 
session render the same way.

https://github.com/parleur/sandbox/blob/master/Pandoc%20markdown%20VS%20ipython%20markdown.ipynb

In practice, this hack could be shaped into an IPython extension, that 
monkey patch the current IPython mardown renderer.


About, converting pandoc in javascript, well, I tried and encountered 
some problem ( I am not expert in Haskwell environment, nor in 
emscripten ...), so right now I cannot say if possible ( I suppose 
anyway ) nor usable ( speed ? ). But it would be great isnt it ;-)





More information about the IPython-dev mailing list