This question already has an answer here:

I have a latexmk-based project that uses some generated tex files included via \input. I'm generating these files using a latexmkrc file.

# latexmkrc
$cleanup_includes_cusdep_generated=1;           # clean generated .tex files                                                                                                                                                        

add_cus_dep('bar', 'tex', 0, 'touchtex');
sub touchtex {
    return system("cp $_[0].bar $_[0].tex");

A minimal working example tex project is.

% main.tex

hello \input{foo}

% foo.bar

When I build the project with latexmk -pdf the first pass chokes because foo.tex doesn't exist yet.

Ultimately, the pdf is built correctly, but I have to return through each missing file. Can anyone explain how to suppress this prompt for tex files that are going to be generated via a add_cus_dep custom build command.

marked as duplicate by Andrew Swann, doncherry, Mensch, lockstep, T. Verron Apr 25 '13 at 16:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • PS: using \include instead of \input doesn't have the same file-not-found problem. – Luke Apr 25 '13 at 15:32
  • 1
    This looks a duplicate of tex.stackexchange.com/q/40850/15925 . If that helps you, let us know and we will close this question. – Andrew Swann Apr 25 '13 at 15:56
  • Thanks Andrew. There is a workaround there for this problem. – Luke Apr 25 '13 at 16:06

Browse other questions tagged or ask your own question.