JelteF / PyLaTeX

A Python library for creating LaTeX files
https://jeltef.github.io/PyLaTeX/
MIT License
2.24k stars 287 forks source link

Can we have an option to disable utils.fix_filename? #351

Open herter4171 opened 2 years ago

herter4171 commented 2 years ago

I'm on Amazon Linux 2 using TeX Live 2022, and it doesn't complain about multiple dots in an \includegraphics path. Conversely, it will not compile when those extra curly brackets are there, so for now I have to do cheesy work-around like cleaning up the TeX and invoking pdflatex directly.

Just to be clear, this works for me.

\includegraphics[width=0.35\textwidth]{Figures/power_dens_2D_ENDFB8.0_kp_endfb71_mcnp.pdf}%

This does not work.

\includegraphics[width=0.35\textwidth]{Figures/{power_dens_2D_ENDFB8.0_kp_endfb71_mcnp}.pdf}%

What the system tells me when the extra curly brackets are there is as follows.

LaTeX Warning: File `Figures/{power_dens_2D_ENDFB8.0_kp_endfb71_mcnp}.pdf' not 
found on input line 27.

If there was a way for me to toggle having utils.fix_filename enabled, that would help me out a lot.

JelteF commented 2 years ago

There's no way currently, but feel free to make a PR.