<div dir="ltr"><div><div>Hi everybody. <br><br>Last year I proposed a pull request [1] that added support to restructuredText in the notebook.  This was dismissed, but with a  very interesting debate of core commiters [2]<br>


<br>The idea behind my PR isn't very elegant, but solves the main obstacle: 
as rst is a document wide markup (i.e. it needs to parse the whole document
 to add semantic to each syntax element), we can't render rst cells 
individually. The other point <span id="result_box" class="" lang="en"><span class="">addressed </span></span>was that there isn't a restructuredtext parser in javascript, so we need to render in the backend.<br><br>

</div>the trick was concatenate every cell as a document adding a mark (a comment), process it in the backend via doctutils (I did in the server instead the kernel, wrongly), split the output by those marks, and then update each cell with its corresponding chunk. <br>

<br></div><div>As I'm a heavy rst advocate [3] I would like to implement this as an extension. I was looking for some example of a "render hook" based on raw data, but I couldn't find one. <br>I've found instead the minrk's "gist" extension [4] which use a "comm" between the notebook and the kernel, but I couldn't move forward much. <br>

<br></div><div>So, where should I start?<br></div><div>thanks<br></div><div><br></div><div><div><div><br>[1] <a href="https://github.com/ipython/ipython/pull/4301" target="_blank">https://github.com/ipython/ipython/pull/4301</a><br>

[2] <a href="https://www.youtube.com/watch?v=TB7JRe68k84#t=3028" target="_blank">https://www.youtube.com/watch?v=TB7JRe68k84#t=3028</a><br>

[3] <a href="https://mgaitan.github.io/en/posts/the-reStructuredText-processor.html">https://mgaitan.github.io/en/posts/the-reStructuredText-processor.html</a><br clear="all"><div>[4] <a href="https://raw.github.com/minrk/ipython_extensions/master/gist.py">https://raw.github.com/minrk/ipython_extensions/master/gist.py</a><br>

<br>-- <br><div dir="ltr"><a href="http://mgaitan.github.io" target="_blank">mgaitan.github.io</a><br><a href="http://textosyprextextos.com.ar" target="_blank">textosypretextos.com.ar</a></div>
</div></div></div></div></div>