On a LaTeX document that is split into many files, if only part of the
files are enabled through the use of \includeonly, the following errors
are produced:
--------------------------------
Latexmk: Log file says output to 'ykk.pdf'
Latexmk: Couldn't find aux file 'FrontBackmatter/titlepage.aux'
Latexmk: Couldn't find aux file 'FrontBackmatter/declaration.aux'
Latexmk: Couldn't find aux file 'FrontBackmatter/acknowledge.aux'
Latexmk: Couldn't find aux file 'FrontBackmatter/publications.aux'
Latexmk: Couldn't find aux file 'FrontBackmatter/abstract.aux'
Latexmk: Couldn't find aux file 'Chapters/chap1.aux'
Latexmk: Couldn't find aux file 'Chapters/chap3.aux'
Latexmk: Couldn't find aux file 'Chapters/chap4.aux'
Latexmk: Couldn't find aux file 'Chapters/chap5.aux'
Latexmk: Couldn't find aux file 'Chapters/chap6.aux'
Latexmk: Couldn't find aux file 'Chapters/chap7.aux'
Latexmk: Found bibliography file(s) [../bib/misc.bib ../bib/networks.bib
../bib/qdsoa.bib ../bib/semiconductor.bib PhD.bib Publications.bib ykk-blx.bib]
Latexmk: Found bibliography file(s) [../bib/misc.bib ../bib/networks.bib
../bib/qdsoa.bib ../bib/semiconductor.bib PhD.bib Publications.bib ykk-blx.bib]
Latexmk: All targets (ykk.pdf) are up-to-date
For rule 'view', running '&if_source( )' ...
------------
Running 'open "ykk.pdf"'
------------
Collected error summary (may duplicate other messages):
BibTeX ykk: Run of rule 'bibtex ykk' gave a non-zero error code
Latexmk: Use the -f option to force complete processing.
make: *** [pdf] Error 12
--------------------------------
I wonder if this is expected? Is there a way to ask latexmk to output
the sequences of commands it has tried so that I can see if it has run
more times than necessary? Thank you.
Best wishes,
Leo
did you try the '-f' option? and are you using more options to latexmk?
do those aux files exist?
which version of latexmk are you using?
/daleif
A document \including many files is a general case, so I was raising the
question so that latexmk can be improved. Actually without the -f
option, it runs fine (the .pdf was produced).
> do those aux files exist?
When \includeonly is used, some are not produced.
> which version of latexmk are you using?
Sorry, I should be clearer on this. I am using latexmk 4.10 from tl2009.
> /daleif
Best,
Leo
yes that IS what \includeonly does
I don't think there is a problem with latexmk. I use it for all my
projects, some use \includeonly and I do not have any problems.
Start by making sure that all the aux files refered in the master.aux
actually exist, i.e. run latex on your full document.
Then use \includeonly, then latexmk can parse the aux files.
In your case you have an error (sort of), your master is refering to aux
files that does not exist. latexmk will parse the master aux and look in
those files. Since thay are missing and refered to by the master aux,
latexmk thinks this is an error.
using '-f' forces latexmk to run anyway. This is the option I normally use.
If you use say,
latexmk -ps file.tex
and file.tex contains a non-existing citation, then latexmk will stop
with an error, and will not create the PS file. This is fine in the
final run. But when writing it is perfectly fine to leave the citation
for later.
/daleif
Thank you for this.
Leo
The problem is that bibtex itself reported an error. (The missing aux
files are sufficient to cause that.) Actually, the message from latexmk
about using the -f option is a little misleading, since in this case (an
error in bibtex), latexmk does complete its processing of all the files
despite the error. (I'll need to correct the message.)
The warnings about latexmk not being able to find the aux files are
themselves just informational warnings, but they imply that bibtex has
reported an error. As other replies to your message have indicated, you
probably use \includeonly{...} in your master file. So you should do a run
with the \includeonly{...} command commented out. If there are no other
problems, the result will be to generate the missing aux files so that
bibtex will no longer give an error, even after you reactivate
\includeonly{...}. I assume here that there are no other causes for a
bibtex error. (HOWEVER, do NOT delete any of the aux files between runs;
otherwise you defeat the point of using \includeonly.)
But the last line of your listing shows that you are calling latexmk from a
MakeFile, and that processing of the MakeFile stopped because latexmk
returned a nonzero error. This is the expected behavior. The same would
happen if bibtex was invoked directly from your MakeFile instead of
indirectly via latexmk.
Latexmk does in fact report all the commands it (tried to) run. But they
are mixed in with the output of these commands, which are typically
verbose. Look for lines beginning "Running ", e.g.,
Running 'bibtex "ykk"'
If you want output in which these lines are easier to find, run latexmk
with the option -quiet:
latexmk -quiet ykk
John Collins
(Maintainer of latexmk)
Hi John
A little of topic, but can I instruct latexmk to ignore one single aux file?
I have a problem in a chapter that causes latexmk to loop under -pvc mode
apparently an interaction with varioref. I haven't found the problem yet.
actually, for me it would be enough if I could add an input filter for
this particular aux file, such that latexmk would ignore certain auto
generated labels from the aux file.
Now, come to thing about it, this might not help, since the md5sum is
stored ... hmmm ...
--
/daleif (remove RTFSIGNATURE from email address)
LaTeX FAQ: http://www.tex.ac.uk/faq
LaTeX book: http://www.imf.au.dk/system/latex/bog/ (in Danish)
Remember to post minimal examples, see URL below
http://www.tex.ac.uk/cgi-bin/texfaq2html?label=minxampl
http://www.minimalbeispiel.de/mini-en.html
Thank you.
Leo
Actually you can. In the latexmk documentation, look at the entry for
%hash_calc_ignore_pattern. All you need to do is to figure out a regular
expression to find the lines with the labels that are causing the problem
(presumably by changing on every run). This will apply to all aux files,
not just the one that's causing the problem, but that is probably not a bother.
(It would not be hard to extend this to restrict the ignored lines to a
single file.)
> Now, come to thing about it, this might not help, since the md5sum is
> stored ... hmmm ...
Latexmk will take care of that.
By the way (even further off topic): I assume that what's causing the loop
is that a particular auto generated label always change from run to run of
(pdf)latex, even when there is no actual change in the document. So I'm
curious to know what's changing in the aux file.
John
ahh, ok, will look into this
> (It would not be hard to extend this to restrict the ignored lines to a
> single file.)
>
>
>> Now, come to thing about it, this might not help, since the md5sum is
>> stored ... hmmm ...
>
> Latexmk will take care of that.
>
>
> By the way (even further off topic): I assume that what's causing the
> loop is that a particular auto generated label always change from run to
> run of (pdf)latex, even when there is no actual change in the document.
> So I'm curious to know what's changing in the aux file.
>
The problem is the page numbers. the output from varioref changes
depending where the reference is in relation to the label.
If the varioref reference is near a page break it can make the text jump
back and forth making a paragraph appear on one page in one run and on
the next page in the next run.
It is one of the downsides of varioref I guess.
Usually this can be fixed by deleting all aux files, but not in this case.
And making minimal example is even harder.
/daleif
Here's an (almost) minimal example. The repeated single-character words
and the vertical space are carefully tuned to make the layout of the
document extremely sensitive to the exact format of the label produced by
varioref.
No matter how many times you run (pdf)latex, the output file will never
have the correct page references!
(N.B. If you have a modern computer, such that the run of latex takes less
than a second, then latexmk may not get into the loop mentioned earlier in
this thread. Why that happens is a long story ...)
John
\documentclass{minimal}
\usepackage{varioref}
\begin{document}
a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a
Eq.\ \ref{eq} is \vpageref{eq}
\\[19.5cm]
b b b
\newpage
c c c c c c c c c c c c c c c c c c c c c c
c c c c c c c c c c c c c c c c c c c c c c
c c c c c c c c c c c c c
\\[19cm]
\begin{equation}
\label{eq}
1
\end{equation}
\end{document}
ahh, thanks
The best one might be (a bit excessive, but usefull for writing)
$hash_calc_ignore_pattern{'aux'} = 'newlabel';
because it may not be the varioref label that changes, but it might be
the cause of the change in other labels.
I used this to slow the document down
\documentclass{minimal}
\usepackage{varioref,ifthen}
\newcounter{cntr}
\begin{document}
a a a a a a a a a a a a a a a a a a
a a a a a a a a a a a a a a a a a a a a a a a
Eq.\ \ref{eq} is \vpageref{eq}
\\[19.5cm]
b b b
\newpage
c c c c c c c c c c c c c c c c c c c c c c
c c c c c c c c c c c c c c c c c c c c c c
c c c c c c c c c c c c c
\\[19cm]
\begin{equation}
\label{eq}
1
\end{equation}
\newpage
\whiledo{\value{cntr}<10000}{
\stepcounter{cntr}
1
}
\end{document}
/daleif