我试图运行pdfLaTex
位于 Windows 环境中环境变量中存储的路径中的文件(例如%TEMP%
目录)。该路径使用 8.3 DOS 名称存储。这似乎令人不安pdfLaTeX
,并且它在第一次时就破坏了路径名~
。
是否可以pdfLaTeX
使用源的 8.3 路径名?下面是显示问题的简短命令行摘录:
C:\>echo \stop > "c:\Documents and Settings"\test.tex
C:\>REM This works
C:\>pdflatex "c:\Documents and Settings\test.tex"
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX)
restricted \write18 enabled.
entering extended mode
(c:/Documents and Settings/test.tex
LaTeX2e <2011/06/27>
Babel <3.9k> and hyphenation patterns for 78 languages loaded.
)
No pages of output.
Transcript written on test.log.
C:\>REM This does not work
C:\>pdflatex c:\DOCUME~1\test.tex
This is pdfTeX, Version 3.1415926-2.5-1.40.14 (TeX Live 2013/W32TeX)
restricted \write18 enabled.
entering extended mode
! I can't find file `c:/DOCUME'.
<to be read again>
\protect
<*> c:/DOCUME~
1/test.tex
(Press Enter to retry, or Control-Z to exit)
Please type another input file name:
! Emergency stop.
<to be read again>
\protect
<*> c:/DOCUME~
1/test.tex
! ==> Fatal error occurred, no output PDF file produced!
Transcript written on texput.log.
C:\>REM But the file is there
C:\>dir c:\DOCUME~1\test.tex
Volume in drive C is OS
Volume Serial Number is C642-601C
Directory of c:\DOCUME~1
06-06-2014 18:42 8 test.tex
1 File(s) 8 bytes
0 Dir(s) 93.225.000.960 bytes free
C:\>
答案1
您可以使用
pdflatex \input{c:/DOCUME\string~1/test.tex}
或者可能
set TEXINPUTS=%TEMP%;
pfdflatex test
也可以。
我也会期待
pdflatex c:/DOCUME\string~1/test.tex
可以工作,但是我无法在本机 Windows tex 上进行测试。
答案2
仅供参考:我已将这个问题报告给 TeXlive 邮件列表。请参阅这里用于线程的开始。
8.3 版将支持短文件名2015 年 TeXlive。