mkrphys / ipython-tikzmagic

IPython magics for generating figures with TikZ
BSD 3-Clause "New" or "Revised" License
159 stars 43 forks source link

Allow delimiters around picture_options #40

Open EmericT opened 2 years ago

EmericT commented 2 years ago

Currently not possible to use -po option with space characters : @magic_arguments split around these.

e.g.

%%tikz -po line width=3pt
\draw (0,0) -- (1,0) ;

would be converted to

    \begin{tikzpicture}[scale=1,line]
    width=3pt\draw (0,0) -- (1,0) ;

    \end{tikzpicture}

I think the easiest workaround is to allow quotes or double quotes around po arguments, and to remove them. The code is quite self-explanatory. With this, you would write :

%%tikz -po "line width=3pt"
\draw (0,0) -- (1,0) ;