On Mon, Sep 7, 2015 at 9:57 PM, Enrico Forestieri <for...@lyx.org> wrote:
> On Mon, Sep 07, 2015 at 04:11:07PM -0400, Scott Kostyshak wrote:
>
>> On Sun, May 03, 2015 at 02:02:06AM +0200, Enrico Forestieri wrote:
>> > On Sat, May 02, 2015 at 07:03:53PM -0400, Scott Kostyshak wrote:
>> > >
>> > > Attached is a patch. I have tested it and it works well for me. I'm
>> > > not sure about one part of the implementation. I have
>> > > Converters::runLaTeX() check the buffer member storing whether there
>> > > was an error, and if so it calls LaTeX::deleteFilesOnError(). I'm
>> > > wondering if it would make more sense to have LaTeX check the buffer
>> > > variable (and thus I would not have to make
>> > > LaTeX::deleteFilesOnError() public), but in LaTeX there is currently
>> > > no access to the buffer.
>> > >
>> > > An alternative would be to add a parameter to LaTeX::LaTeX() that says
>> > > whether to do a fresh compile.
>> >
>> > This alternative seems the most logical one to me. Add a bool parameter
>> > (clean_start or similar) which is false by default to tell the
>> > constructor to start afresh by removing previous leftovers.
>>
>> Why should it be false by default? I have introduced the bug
>> http://www.lyx.org/trac/ticket/9765
>> into master because the aux is preserved from a separate compilation.
>>
>> My question is, when the user begins a preview, shouldn't the .aux
>> always removed so there is a fresh compile? I think the answer has to do
>> with somehow there is a faster compilation if that .aux can be reused.
>> What determines whether the aux should be used or regenerated though?
>> LyX or LaTeX?
>
> There are cases where the previously generated aux files are useful and
> removing them causes wrong results. For example, if you include a number
> of child documents, say a child for each chapter, like this:
>
> \begin{document}
> \include{chap1}
> \include{chap2}
> ...
> \end{document}
>
> latex generates aux files for each included child. If you later are only
> working on chapter 4, you could do
>
> \includeonly{chap4}
> \begin{document}
> \include{chap1}
> \include{chap2}
> ...
> \end{document}
>
> and only chap4.tex gets compiled while cross-references to other chapters
> are still correct because their aux files are still there.

And how do we know that the aux files do not need updating? Does this
depend on whether the timestamp of the corresponding .tex is newer or
older?

> This is one example that comes to mind but I am sure there are others.

I see. Thank you for the example. Then I am not sure how to solve #9765.

Scott

Reply via email to