Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

graphicx: includegraphics file not found: choice between error and warning #1016

Open
Reissner opened this issue Mar 12, 2023 · 0 comments
Open
Assignees
Labels
category graphics enhancement long-term issues (or enhancements) that will not be resolved any time soon but should be considered eventually

Comments

@Reissner
Copy link

Brief outline of the enhancement

I suggest to add a key fileNotFondDo with possible values error and warning.
The default shall be error so it behaves as it does now.
This ensures backward compatibility.
Implementation could be something like \IfFileExists{foo.png}{\includegraphics.}{"foo not found"}.
If the file does not exist, one shall display a replacement indicating that something is missing.

The motivation behind is that with generator tools like latexmk one cannot compile a latex file with graphic to be generated,
because first the graphics must be present then one can compile without failures
but graphic files to be included are generated after the first latex run.
With the suggestion above one could specify a warning then all works fine.
What is also needed is the suggestion to run the according converter and then rerun latex.
Same as for bib, index and glossary.
This would be also an advantage: unification.
With -recorder, the graphic file shall not occur in the fls file.

LaTeX2e generally cannot add new features without an extreme amount of care to accommodate backwards compatibility. Please do not be offended if your request is closed for being infeasible.

Minimal example showing the current behaviour

\RequirePackage{latexbug}       % <--should be always the first line (see CONTRIBUTING)!
\documentclass{article}
\usepackage{graphicx}
  % Any preamble code goes here


\begin{document}
\includefile{iDontExist}% causes an error 
  % Demonstration of issue here
  
\end{document}

Minimal example showing the desired new behaviour

\RequirePackage{latexbug}       % <--should be always the first line (see CONTRIBUTING)!
\documentclass{article}

  % Any preamble code goes here
\usepackage[fileNotFondDo=warning]{graphicx}
\begin{document}
\includefile{iDontExist}% shall display a warning only
  % Demonstration of issue here
  
\end{document}
@josephwright josephwright added category graphics enhancement long-term issues (or enhancements) that will not be resolved any time soon but should be considered eventually labels Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category graphics enhancement long-term issues (or enhancements) that will not be resolved any time soon but should be considered eventually
Projects
Status: Pool (unscheduled issues)
Development

No branches or pull requests

3 participants