mkrphys / ipython-tikzmagic

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

"No image generated." #18

Closed tnightengale closed 4 years ago

tnightengale commented 6 years ago

Hi,

I cannot seem to get tikz to work in Jupyter using your extension. I apologize in advance as I am relatively inexperienced using any kind of Jupyter add on.

The I run the command%load_ext tikzmagic followed by %tikz \draw (0,0) rectangle (1,1); in two cells in a Jupyter notebook and receive the error "No image generated".

I saw this previous issue and had been resolved and followed the instructions in that solution, but to no avail.

I am using jupyter with anaconda (I launch a notebook from terminal using $ jupyter notebook). I also have used homebrew to install ImageMagick and pdf2svg. I copied the command line given to install this package using pip. I also believe I used pip to install an older version of tikzmagic from a different repo (if that somehow has any bearing on the issue).

Any suggestions would be truly welcome. Thanks

mahmutkocak commented 5 years ago

I have the same issue.

AegeusZerium commented 5 years ago

Did you find any solution ?

irustandi commented 5 years ago

On Ubuntu 18.04, I ran into the same issue. It seems the problem was because ImageMagick tightened their security policy so that it prevented the generation of PNG file from the PDF file generated by latex. To fix this problem, I edited /etc/ImageMagick-6/policy.xml, changing the following

<policy domain="coder" rights="none" pattern="PDF />

to

<policy domain="coder" rights="read|write" pattern="PDF />

fehiepsi commented 5 years ago

Confirmed that @irustandi solution works!

AegeusZerium commented 5 years ago

Thank you very much @irustandi, your solution worked.

trylks commented 4 years ago

The cause of the problem and its solution have been identified and the issue should be closed.

usmandroid commented 1 year ago
git clone https://github.com/mkrphys/ipython-tikzmagic.git
pip install -e ./ipython-tikzmagic
pip install pdflatex
sudo apt-get install texlive-latex-base
sudo apt-get install texlive-fonts-recommended; sudo apt-get install texlive-fonts-extra
sudo apt-get install texlive-latex-extra
sudo apt-get install pdf2svg
sudo apt install imagemagick
cd /etc/ImageMagick-6/
cd /etc/ImageMagick-6/
%
<!--  Next, I edited /etc/ImageMagick-6/policy.xml, changing the following
<policy domain="coder" rights="none" pattern="PDF />
to
<policy domain="coder" rights="read|write" pattern="PDF /> -->
%
sudo nano policy.xml