
介紹
我有一個特定於專案的 texmf 樹,用於包開發,稱為texmf-project
.該樹在 debian 11 上的 texlive 中正確註冊為 auxtree texmf-project
。編譯時使用
$ pdflatex --shell-escape mwe.tex
...
! Package pdftex.def Error: File `logo-eps-converted-to.pdf' not found: using draft setting.
...
設定
我的文件結構如下圖所示:
<project-directory>
|- texmf-project
| |- tex
| |- images
| |- logo.eps
|- mwe.tex
而 MWE 是
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[height=3cm]{logo.eps}
\end{document}
如果您需要 eps 進行測試,只需從以下位址下載 eps這個連結。
採取的調試步驟
確保可以找到徽標文件
為了確保 kpathsea 確實找到了徽標文件,我運行了(從 )
$ kpsewhich logo.eps
./texmf-project/tex/images/logo.eps
正確地找到了該文件。
確保 epstpdf 正常運作
如果我放在logo.eps
旁邊mwe.tex
,<project directory>
則pdflatex
運行時不會出現錯誤並生成logo-eps-converted-to.pdf
.
確保\includegraphics
工程從texmf-project
如果我用裡面的 jpg 替換 eps 文件,即 put ./texm-project/tex/images/logo.jpg
,並嘗試包含它,它也可以工作。
確保我(或pdflatex)有足夠的權限
如果我跑
$ ls -l ./texmf-project/tex
drwxrwxrwx 1 user user 4096 May 10 11:20 images
我相信pdflatex
用戶運行應該能夠創建轉換後的 pdf 文件。
尋求協助
為什麼這沒有如預期工作,也就是我做錯了什麼?如何使用位於自訂 texmf 樹內的映像?