Re: [OS X TeX] Non–Recovery from Error

Herbert Schulz herbs at wideopenwest.com
Fri Mar 11 22:43:14 CET 2011


On Mar 11, 2011, at 11:52 AM, Messerschmitt David wrote:

> 
> 
> <<snip>>
> 
>> 
>> There are innumerable problems that can cause any of the files produced by TeX to fail when there is a major error in compilation. And the failure can occur at multiple points (e.g., in the bibtex run, a makeindex run, etc.). The answer is that when you get error with runaway arguments it could also just be a problem in a macro that was defined.
>> 
> 
> I find myself agreeing with you and Peter, and at the same time disagreeing.
> 
> It is true that there are a lot of things that can go wrong, and latexmk has no way of knowing what.
> This need and should not be the case, but so be it. Obviously this is the result of years of incremental
> development to an architectural plan that has its limitations. But the system also has tremendous
> compensatory strengths, which is why we are all using it.
> 
> What I would do in this circumstance is ask how we can make the system as friendly as possible
> for the most common problems, without causing anomalous behavior in the other cases. The normal mode
> in my experience is a formatting that runs into problems because of some change the user made, 
> but the user recognizes what the problem is and immediately repairs it in the source files. 
> (Obviously it is related to something the user just did, which narrows it down dramatically especially
> if formattings are done often.)
> 
> Latexmk could deal with this circumstance in a way that makes it transparent to the user.
> If a formatting terminates abnormally, and subsequently the source files have changed, it would be
> very reasonable for latexmk to automatically delete .aux files and then format twice.
> In all cases where the user has correctly repaired the problem that caused the anomaly in the
> first place, this should recover completely and avoid the user having to run three or four
> commands manually. In any other cases (which I would submit are must less frequent) this 
> should do no harm other than the time it takes to do the two formattings.
> 
> This is a matter of design philosophy for a software system. I have my strong opinions on this.
> To me it is unreasonable to just say that the user should not make mistakes.
> Rather, the design goal should be to recover from user mistakes transparently
> in those cases where the user correctly repairs the mistake he has made.
> 
> -dave

Howdy,

You can try to add the -c option to the latexmk command line in the engine file(s) you use. E.g., if you use the pdflatexmk engine simply double click on the pdflatexmk.engine file in ~/Library/TeXShop/Engines/ to open it in TeXShop. The last line in that file looks like

"${LTMKBIN}"/latexmk -pdf -r "${LTMKEDIT}/latexmkrcedit" -r "${TSBIN}/pdflatexmkrc" "$1"

and simply put the -c option before the -pdf option:

"${LTMKBIN}"/latexmk -c -pdf -r "${LTMKEDIT}/latexmkrcedit" -r "${TSBIN}/pdflatexmkrc" "$1"

                    ^^^ 

if that doesn't clean enough try the -C option which cleans out a bunch more. No guarantees!

I think this will clean out the files at the start of a latexmk run.

Good Luck,

Herb Schulz
(herbs at wideopenwest dot com)






More information about the macostex-archives mailing list