mkrphys / ipython-tikzmagic

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

Set TEXINPUTS variable to include notebook dir #8

Closed goerz closed 8 years ago

goerz commented 8 years ago

By setting the TEXINPUTS environment variable to include the directory where the notebook is located, we may reference any files relative to the notebook. This allows using \input (a nice alternative to writing lengthy tikz code directly in the notebook), \includegraphics of local files, or using local packages.

See the test notebook for an example.

Since the fact that compilation of the tex file happens in a temporary directory is hidden from the user, being able to reference local files -- as implemented by this patch -- would probably be considered "expected behavior".