Open
Description
- itikz version: 0.1.5
- Python version: 3.8.2
- Operating System: Ubuntu 20.04
Description
I would like to call itikz to create an SVG object, without returning the TikZ-code first. In other words, I want to create a function that returns the SVG object returned by itikz. How can I do that?
What I Did
I've tried importing itikz and creating an TikzMagics object, but I do not know what arguments should I give to the constructor of TikzMagics.
import itikz
itikz.TikZMagics().itikz("--implicit-pic", "a")
The traceback is:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-62-b8977ef3b628> in <module>
----> 1 itikz.TikZMagics().itikz("--implicit-pic", "a")
<decorator-gen-156> in itikz(self, line, cell)
/usr/local/lib/python3.8/dist-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/usr/local/lib/python3.8/dist-packages/itikz/__init__.py in itikz(self, line, cell)
190 return
191
--> 192 ipython_ns = self.shell.user_ns
193
194 if cell is None:
AttributeError: 'NoneType' object has no attribute 'user_ns'
Metadata
Metadata
Assignees
Labels
No labels