[IPython-dev] Right to left markdown in IPython (1.0)

Ronen Abravanel ronena at gmail.com
Sun Aug 25 15:54:04 EDT 2013

Hello all,

I'm planning a python class, and my hope is to present it as "live
reavel"[1]  interactive presentation

On of my problems is that I want some of the text and explanations to be in
Hebrew, e.g., be written from right to left, which markdown dose not

One option is to write html with dir=rtl inside the markdown block, but
then I have to write all-html, which is incontinent.

another option is to use this cool bidiweb[2]  script.
bidiweb can operate in two modes:
1. Process html (as returned from the markdown processor) and add dir=rtl
when needed.
2. Post process the page  (searching for specific class and add
right-to-left tags when needed)

In IPython 0.13, option seems cool, as pagedown, the markdown
implementation used, supported post processing hook.

In IPython 1.0, I did the following:

"using strict";

    shim: {
        'bidiweb.style': ['bidiweb']

$([IPython.events]).on('app_initialized.NotebookApp', function(){
        bidiweb.style('.rendered_html *');


+custom.css with .rtl and .ltr definitions.

This work only partially: It's add RTL support to the markdown blocked that
exists when the page is loaded, but when I add new markdown or edit
existing one, the RTL is killed.
Is there any way to call bidiweb.style whenever a markdown blocked is
update? or any good way to use mode 1 without changing IPython's code?

Ronen Abravanel

[1] http://www.youtube.com/watch?v=bCb2HJy-yc0 I hoped it will be usable
and published by the end of October. otherwise, I'll just present a
[2] https://github.com/hasenj/bidiweb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130825/b73f34f4/attachment.html>

More information about the IPython-dev mailing list