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

Kyle Kelley rgbkrk@gmail....
Sun Aug 25 15:05:12 CDT 2013


Oh. This is important for all the RTL languages. Great ideas.

It looks like @amitkot added this as an issue on GitHub:
https://github.com/ipython/ipython/issues/3278.

Wonder if there's a way to detect it when rendering it.


On Sun, Aug 25, 2013 at 2:54 PM, Ronen Abravanel <ronena@gmail.com> wrote:

> 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
> support.
>
> 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:
> custom.js:
>
> "using strict";
>
> requirejs.config({
>     shim: {
>         'bidiweb.style': ['bidiweb']
>     }
> });
>
> $([IPython.events]).on('app_initialized.NotebookApp', function(){
>      require(['custom/bidiweb'],function(style){
>         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?
>
>
> Thanks,
> 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
> notebook.
> [2] https://github.com/hasenj/bidiweb
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130825/e87450eb/attachment-0001.html 


More information about the IPython-dev mailing list