[IPython-dev] defining latex commands in notebook

Damon Allen damontallen at gmail.com
Fri Nov 29 10:16:56 EST 2013


I haven't used functions like this but I have found if you have a LaTex
command defined in a raw cell at the beginning of a notebook it does note
get hashed out.  I just put the following two lines in a raw cell and
converted it to check:

$\newcommand{\Mt}[1]{\mathbf{#1}}$
> \pagestyle{plain}
>

followed by a simple code cell, 2+2, and it survived the conversion.

Damon



On Fri, Nov 29, 2013 at 10:14 AM, Matthias BUSSONNIER <
bussonniermatthias at gmail.com> wrote:

>
> Le 29 nov. 2013 à 16:05, Zoltán Vörös a écrit :
>
> Hi all,
>
> I was trying to define some latex commands in the notebook, and there it
> works fine. I run into trouble, however, when I try to convert it to pdf
> via LaTeX. I found that in such a case one could place the new commands
> in a raw cell
> (
> http://python.6.x6.nabble.com/newcommand-in-Markdown-cells-and-nbconver-td5037469.html),
>
> and the statement was that those cells would be passed unchanged into
> the latex source file. But in my case, that's not what happens. During
> conversion, lines in the raw cell are prepended by a hash symbol, and
> that obviously throws LaTeX off.
>
> So, my question is, whether this has changed since Oct 30 (the date of
> the above-referred posting), or I am just missing something trivial.
>
>
> It should not have changed (yet)
> https://github.com/ipython/ipython/pull/4306
> --
> M
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20131129/3838dba7/attachment.html>


More information about the IPython-dev mailing list