0

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
\documentclass{report}

\begin{document}
hello \input{foo}
\end{document}

% foo.bar
world

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.

Luke
  • 367

0 Answers0