[IPython-User] py2tex magic

Fernando Perez fperez.net@gmail....
Mon Nov 12 16:11:07 CST 2012


BTW, this is really cool!  With some tests, I'd love to see a PR to
ship this included in our default installation, it's exactly the kind
of  thing that will be useful for authoring more
mathematically-oriented notebooks and hence belongs in core.

Would you be up for adding some tests so we can include it, and make a
PR for it?

Thanks!

f

On Wed, Nov 7, 2012 at 12:52 PM, Thomas Kluyver <takowl@gmail.com> wrote:
> On 7 November 2012 17:35, Johan Beke <johanbeke@hotmail.com> wrote:
>>
>> I finally finished my magic function to provide python input to tex
>> conversion. I uploaded it at https://gist.github.com/4032651
>> Feel free to contribute.
>>
>> What is possible for now:
>> - single and multi line magic functions can be displayed (with or without
>> result)
>> - numerical output format can be set as a C prinft like format string
>> - support for unum unit package
>> - conversion of variable names with the greek letters (rules: a_b_c
>> everything after first _ is subscript. Next _ are converted to , remaining
>> parts are converted to greek letters)
>
>
> Cool! Bonus points for the innovative use of AST. Could you whip up an
> example notebook showing it in action?
>
>> For now, the file must be placed in the startup direction. Anyone willing
>> to convert it to an extension?
>> Can I set a link somewhere in the wiki to make this magic functions
>> available to users not in the list?
>
>
> Making an extension will be really easy. You just need to put the last
> couple of lines inside a load_ipython_extension function. See the docs:
> http://ipython.org/ipython-doc/stable/config/extensions/index.html#writing-extensions
>
> You're welcome to add it to the extensions index:
> http://wiki.ipython.org/Extensions_Index
>
> Thanks,
> Thomas
>
> P.S. LatexVisitor is up there with EscapedTransformer for class names to
> take out of context.
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>


More information about the IPython-User mailing list