允许LaTeX中的includegraphics包含具有任意文件名的文件

Tho*_*mas 16 latex

我有一些图形文件,包含一些相当长的文件名,包括几个句点.includegraphics将这些中的第一个解释为文件扩展名的开头,这使得它无法猜出正确的图形扩展.典型的错误消息是

LaTeX Error: Unknown graphics extension: .9332.1dwc_kpl_h.log.png
Run Code Online (Sandbox Code Playgroud)

一种解决方案是重命名所有文件,但它们是由另一个程序生成的,我宁愿从那里使用命名方案.有没有办法告诉graphics图像格式是什么,这样扩展将被忽略?

kef*_*ich 20

您还可以通过在以下位置添加额外的花括号来隐藏LaTeX中的点:

\includegraphics{{my.file.with.dots.in.it}.png}
Run Code Online (Sandbox Code Playgroud)

(来自https://tex.stackexchange.com/questions/10574/includegraphics-dots-in-filename)


Phi*_*ipp 6

使用grffile包.