我可以將 tex 檔案另存為圖片檔案嗎?

我可以將 tex 檔案另存為圖片檔案嗎?

有沒有辦法儲存或匯出tex檔案以產生 jpg/jpeg/png 檔案?

答案1

  1. https://imagemagick.org/script/download.php並下載合適的版本。就我而言(Windows)是這樣的ImageMagick-7.0.9-12-Q16-x64-dll.exe(截至 2019 年 12 月 29 日)。
  2. https://www.ghostscript.com/download/gsdnld.html並下載合適的版本。就我而言(Windows),它是Ghostscript 9.50 for Windows (32 bit)(GNU Affero 通用公共授權)。圖像魔術師來電鬼腳本據我了解,用於轉換 PDF。
  3. 產生 LaTeX 檔案 ( test.tex) 並產生單一 PDF 頁面。

\documentclass{article}

\begin{document}
Test
\end{document}

  1. 在同一資料夾中,建立一個myConvertBatch.txt包含以下內容的文字 ( ) 檔案(-density 300用於提高品質/解析度)。

magick -density 300 test.pdf test.png 
pause

  1. 將文字檔重命名為myConvertBatch.bat.
  2. 雙擊myConvertBatch.bat- 這應該會產生test.png.
  3. 查看standalone文件類別(https://ctan.org/pkg/standalone)。

有關該magick命令的選項的更多詳細信息,請參見https://imagemagick.org/script/command-line-processing.php

在此輸入影像描述

在此輸入影像描述

有關的

相關內容