xqms / graphicscache

Caching & DPI control for the LaTeX graphicx package
BSD 3-Clause "New" or "Revised" License
10 stars 5 forks source link

Graphicscache not updated when input files are edited #3

Closed MatthiasNieuwenhuisen closed 6 years ago

MatthiasNieuwenhuisen commented 6 years ago

If an already cached image file is edited, the cache is not updated when recompiling the LaTeX document.

xqms commented 6 years ago

Hmm, I can't reproduce that here. The update check is based on the file modification time. Does your filename contain strange characters?

MatthiasNieuwenhuisen commented 6 years ago

It seems that this happens if the file extension is not speficied.

In this example the first figure is updated as expected, while the second figure is not.

\documentclass{article}
\usepackage{graphicx}
\usepackage{graphicscache}
\begin{document}
\includegraphics[width=\linewidth]{left-fig.jpg}
\includegraphics[width=\linewidth]{left-fig}
\end{document}
MatthiasNieuwenhuisen commented 6 years ago

Related: Graphics file extensions and their order of inclusion when not specified

Extensions can be printed with, e.g.,

texdef -t pdflatex -p graphicx Gin@extensions
xqms commented 6 years ago

Here is code for finding the filename in the same manner as \includegraphics:

https://tex.stackexchange.com/questions/99070/check-for-a-valid-file-before-using-includegraphics/99099#99099

xqms commented 6 years ago

Should be fixed in c4fa1b9.

MatthiasNieuwenhuisen commented 6 years ago

Works for my test case