[IPython-User] [notebook] centered equations

Matthias BUSSONNIER bussonniermatthias@gmail....
Thu Mar 28 09:47:59 CDT 2013


Hi, 

It is not supported yet, 

https://github.com/CamDavidsonPilon/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers/blob/master/Chapter1_Introduction/Chapter1_Introduction.ipynb

Do it by injecting some JS, you should be able to figure it out. Last cell, you will have to inspect the output by hand

The relevant part in the ipynb is past at the end of this mail.

The methods will probably fail to work for next release, but using custom.js with the same code should do the same :

-- 
Matthias 


        "<script>\n",
        "    MathJax.Hub.Config({\n",
        "                        TeX: {\n",
        "                           extensions: [\"AMSmath.js\"]\n",
        "                           },\n",
        "                tex2jax: {\n",
        "                    inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n",
        "                    displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ]\n",
        "                },\n",
        "                displayAlign: 'center', // Change this to 'center' to center equations.\n",
        "                \"HTML-CSS\": {\n",
        "                    styles: {'.MathJax_Display': {\"margin\": 4}}\n",
        "                }\n",
        "        });\n",
        "</script>"




Le 27 mars 2013 à 17:41, giacomo boffi a écrit :

> i'm using 0.13.1 as distributed in debian testing, and i'd like to
> have the displayed equation, in markdown cells, centered
> 
> i have tried injecting simple html around the mathjax/latex code, like
> in
> 
>        <center>...</center>
>        <div style="text-align:center;">...</align>
> 
> to no avail 
> 
> i've googled that next ipython permits to configure mathjax to suit my
> desire, but i'd prefer to find a solution working with the debian
> repository version of ipython
> 
> could anyone kindly help me? thank you in advance,
>                                                        gb
> 
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130328/08bf3687/attachment-0001.html 


More information about the IPython-User mailing list