tikz에서 png로 작동하지 않습니다

tikz에서 png로 작동하지 않습니다

png비슷한 질문에 대한 이 답변을 따르도록 TikZ 파일을 변환하려고 합니다 .TikZ를 PDF가 아닌 파일로.

이것은 mwe입니다:

\documentclass[convert={density=300,size=1080x800,outext=.png}]{standalone}
\usepackage{tikz}

\begin{document}
\begin{tikzpicture}
  \draw [step=0.5] (-1.4,-1.4) grid (1.4,1.4);
\end{tikzpicture}
\end{document}

log파일에 다음과 같은 오류 메시지가 나타납니다.

(Ext.aux)
runsystem(imgconvert -density 300 Ext.pdf -resize 1080x800 -quality 90 
Ext.png)
...executed.



 Class standalone Warning: Conversion unsuccessful!
 (standalone)              There might be something wrong with your
 (standalone)              conversation software or the file permissions!

 ) ) 

내 버전의 독립 실행형 패키지:

Document Class: standalone 2015/07/15 v1.2 Class to compile TeX sub-files stand alone

다음 명령으로 컴파일했습니다.

pdflatex -shell-escape -synctex=1 -interaction=nonstopmode Ext.tex

ImageMagick-7.0.7-Q16을 설치했는데 C:\Program Files\ImageMagick-7.0.7-Q16에 설치되어 있습니다.

어떻게든 경로 변수를 설정해야 합니까? 경로 변수를 설정해야 한다는 내용을 온라인에서 찾을 수 없습니다.

답변1

내 경우에는 Image Magick 설치 디렉터리를 변수에 추가해야 했습니다 PATH. 에서 프로그램이 발견 where imgconvert되면 Windows 명령줄에서 쉽게 확인할 수 있습니다 .imgconvertPATH

Image Magick의 설치 경로가 반환되면 imgconvert가 호출 가능합니다.

그렇지 않으면 변수를 수정해야 합니다 PATH. 여기에 대한 간단한 가이드가 있습니다.PATH변수 에 디렉토리 추가.

관련 정보