放置在 TEXINPUTS 中声明的文件夹中时找不到 .tex 文件
我有一组基于 LaTeX 模板的文档。每个文档都有自己的文件夹,如下所示:
docs-folder
|-doc #1
|-doc #2
...
|-doc #n
|-texmf
|-tex
|-bibtex
|-fonts
|-docs
|-misc
|-logo.jpg
|-acronyms.tex
我自己编写了模板,并且对于每个文档(从 #1 到 #n),它都会加载文件 logo.jpg
和 acronyms .tex
与 \includegraphics{logo.jpg}
和 \input{acronyms.tex}
。
路径 ..\docs-folder\texmf 在 MikTeX 中设置为项目根目录,并且可以正确识别本地 texmf 树,不包括 misc
文件夹。
因此,路径 ..\docs-folder\texmf\misc
被设置为 TEXINPUTS 环境变量的值(在 Windows 下)。这样做是为了避免不必要的两个文件的复制。
发生的情况是,当我编译其中一个文档时,找不到文件 acronyms.tex
,而 logo.jpg
被 PDFLaTeX 正确找到。
我不奇怪为什么 acronym.tex 文件没有加载。
I have a set of documents based on a LaTeX template. Every document has its own folder, as following:
docs-folder
|-doc #1
|-doc #2
...
|-doc #n
|-texmf
|-tex
|-bibtex
|-fonts
|-docs
|-misc
|-logo.jpg
|-acronyms.tex
I wrote the template on my own, and, for every document (from #1 to #n) it loads the files logo.jpg
and acronyms.tex
with \includegraphics{logo.jpg}
and \input{acronyms.tex}
.
The path ..\docs-folder\texmf is set as a project root in MikTeX, and the local texmf tree is recognized properly, excluding the misc
folder.
So, the path ..\docs-folder\texmf\misc
is set as the value of the TEXINPUTS environment variable (under Windows). This is done in order to avoid an unwanted replication of the two files.
What happens is that, when I compile one of the documents, the file acronyms.tex
is not found, while the logo.jpg
is correctly found by PDFLaTeX.
I have no wonder why the acronyms.tex file is not loaded.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 UNIX 系统上,解决方案是运行 texhash 或 mktexlsr。根据此页面,等效的解决方案对于 MikTeX 来说,就是运行 MikTeX 设置并单击“刷新 FNDB”按钮。
On unix systems the solution is to run
texhash
ormktexlsr
. According to this page, the equivalent solution for MikTeX is to run MikTeX settings and click the "Refresh FNDB" button.