I'm using latexmk as my building assistance. I'm also trying to use it as the clean-up contractor... In .latexmkrc I added:
$pdf_previewer = "open -a /Applications/Skim.app";
$clean_ext = "rel paux lox pdfsync out bbl %R.run.xml %R.table %R.gnuplot";
$pdflatex = 'pdflatex -8bit -etex -shell-escape -file-line-error -halt-on-error -synctex=1 %O %S';
$new_viewer_always [0];
$pvc_view_file_via_temporary [1];
so it will remove the tex_name.func_name.table and tex_name.func.gnuplot file types in addition to the defaults. Unfortunately, it doesn't work. When I run latexmk -c, this is the first output's line (I don't know if it is related):
Useless use of array element in void context at (eval 12) line 5, <GEN0> chunk 1.
And these files stay in the directory. How can I make them gone?
Edit:
As @N.N. suggested I corrected the mistake in the last two code lines. As for the main issue of this question, I have to clarify the case. Compiling my document produces several files all having the following filename pattern: tex_main_name.function_name.gnuplot and similarly tex_main_name.function_name.table. I want latexmk -c to remove all of them. Therefore, using func_name.table in the latexmkrc will only remove two files. I hope the problem is clearer now.
Edit 2:
As @N.N. asked, here's a WME:
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
% Function
\begin{scope}[domain=0.9:5.5,samples=200]
\draw[<->,color=blue,line width=2pt] plot[id=func1]
function{(x*x+x+1)/(x*x)} node[right] {$f(x)$};
\end{scope}
\begin{scope}[domain=0.9:5.5,samples=200]
\draw[<->,color=blue,line width=2pt] plot[id=func2]
function{-(x*x+x+1)/(x*x)} node[right] {$f(x)$};
\end{scope}
\end{tikzpicture}
\end{document}
Compiling this code generates two files, namely file_name.func1.table and file_name.func2.gnuplot. I want that latexmk -c will remove these two files.
.latexmkrc. Thanks again. – Dror Jan 17 '12 at 6:26test.func1.tableandtest.func1.gnuplot(i.e. func1 and not func2). Anyway I have updated my answer to cover it. – N.N. Jan 17 '12 at 13:11$clean_ext = "%R.table %R.gnuplot";but$clean_ext = "%R.*.table %R.*.gnuplot";- but the wildcard*does not work:o( – Hans-Peter E. Kristiansen Feb 21 '12 at 1:30