![! LaTeX 오류: ../images/vi.gif(BoundingBox 없음)에서 그래픽 크기를 확인할 수 없습니다.](https://rvso.com/image/370291/!%20LaTeX%20%EC%98%A4%EB%A5%98%3A%20..%2Fimages%2Fvi.gif(BoundingBox%20%EC%97%86%EC%9D%8C)%EC%97%90%EC%84%9C%20%EA%B7%B8%EB%9E%98%ED%94%BD%20%ED%81%AC%EA%B8%B0%EB%A5%BC%20%ED%99%95%EC%9D%B8%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
나는 다운로드했다https://hea-www.harvard.edu/~fine/Tech/vi.html파일을 사용하여 이 제품을 wget -p -k https://hea-www.harvard.edu/~fine/Tech/vi.html
실행하세요 .pandoc --latex-engine=xelatex -o vi.pdf vi.html
pandoc: Error producing PDF from TeX source.
! LaTeX Error: Cannot determine size of graphic in ../images/vi.gif (no Boundin
gBox).
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.884 ...html}{\includegraphics{../images/vi.gif}}
그리고 이 제품을 pdflatex
사용하여 (pandoc의 기본 라텍스 엔진)을 사용할 때 -pandoc -o vi.pdf vi.html
pandoc: Error producing PDF from TeX source.
! LaTeX Error: Unknown graphics extension: .gif.
See the LaTeX manual or LaTeX Companion for explanation.
Type H <return> for immediate help.
...
l.884 ...html}{\includegraphics{../images/vi.gif}}
나는 또한 wkhtmltopdf https://hea-www.harvard.edu/~fine/Tech/vi.html
웹링크에서 PDF를 만드는 데 사용합니다. 그러나 wkhtmltopdf
솔루션에서는 배경색을 제어할 수 없습니다. 흑백 PDF를 만들고 싶습니다.
답변1
가져가다허버트의 코드파일에 넣으십시오.
% file: gif2png.tex
% Herbert's code:
% https://tex.stackexchange.com/questions/7602/how-to-add-a-gif-file-to-my-latex-file/7608#7608
\usepackage{epstopdf}
\epstopdfDeclareGraphicsRule{.gif}{png}{.png}{convert gif:#1 png:\OutputFile}
\AppendGraphicsExtensions{.gif}
이제 다음 옵션을 사용하여 pandoc을 호출할 수 있습니다.--pdf-engine-opt=-shell-escape --include-in-header=gif2png.tex
예:
다음 간단한 HTML 파일을 사용하세요.
<!-- file: test.html -->
<p>Here is a gif:</p>
<img src="test.gif" title="A dummy picture" alt="The gif" />
그리고 다음과 같은 gif가 있습니다 test.gif
.
그리고 pandoc을 실행하세요:
pandoc test.html --pdf-engine-opt=-shell-escape --include-in-header=gif2png.tex -o test.pdf
결과적으로 다음 PDF를 얻게 됩니다.
경고:
epstopdf
PDF 엔진으로 pdflatex
만 지원lualatex