
有沒有辦法儲存或匯出tex
檔案以產生 jpg/jpeg/png 檔案?
答案1
- 去https://imagemagick.org/script/download.php並下載合適的版本。就我而言(Windows)是這樣的
ImageMagick-7.0.9-12-Q16-x64-dll.exe
(截至 2019 年 12 月 29 日)。 - 去https://www.ghostscript.com/download/gsdnld.html並下載合適的版本。就我而言(Windows),它是
Ghostscript 9.50 for Windows (32 bit)
(GNU Affero 通用公共授權)。圖像魔術師來電鬼腳本據我了解,用於轉換 PDF。 - 產生 LaTeX 檔案 (
test.tex
) 並產生單一 PDF 頁面。
\documentclass{article}
\begin{document}
Test
\end{document}
- 在同一資料夾中,建立一個
myConvertBatch.txt
包含以下內容的文字 ( ) 檔案(-density 300
用於提高品質/解析度)。
magick -density 300 test.pdf test.png
pause
- 將文字檔重命名為
myConvertBatch.bat
. - 雙擊
myConvertBatch.bat
- 這應該會產生test.png
. - 查看
standalone
文件類別(https://ctan.org/pkg/standalone)。
有關該magick
命令的選項的更多詳細信息,請參見https://imagemagick.org/script/command-line-processing.php。