fchauvel / flap

Flattening LaTeX projects
https://fchauvel.github.io/flap
GNU General Public License v3.0
17 stars 2 forks source link

wrong files was used in includegraphics if multiple files have the same prefix #39

Open Hugo-Leung opened 1 year ago

Hugo-Leung commented 1 year ago

I have the following file structure

main.tex
image
|___screenshot.png
|___screenshot_not_the_one_I_want.png

And the content of main.tex is

\documentclass{article}

\begin{document}
        \includegraphics[width=\textwidth]{image/screenshot}
\end{document}

When I run flap main.tex merge, the resulting merged file is using screenshot_not_the_one_I_want.png instead of screenshot.png

merged.tex:

\documentclass{article}

\begin{document}
        \includegraphics[width=\textwidth]{image_screenshot_not_the_one_I_want}
\end{document}