<PM'ed again. Reading a thousand times: L for list reply, r for 
reply... >

On Tue, Jan 06, 2004 at 02:12:13PM +0000, Angus Leeming wrote:
> A question for you:
> Does Latex stop when it encounters the first error, or does it try 
> and compile the whole file?

At least on my system, latex does not stop on errors. I created a bunch 
of incorrect formulae among many correct ones. Latex gave simple list of 
correct ones and long error messages/attempts-to-fix for incorrect ones.

> If it stops, then shouldn't we implement
>         while (true)
>         do
>                 compile latex
>                 check log file
>                 if (no errors)
>                         break
>                 replace flagged formulae with $WRONGFORMULAMESSAGE
>         done

My only worry about the process is that maybe some incorrect formulae 
are bad enough to affect others. Say, latex may think these four 
snippets cor,inc,cor,inc as cor,inc,inc and all the index will be wrong. 
Whether latex stop on errors or not, it is a good idea to compare the 
number of previews between latex and log file.

> # QUESTION: Will Tightpage always be there? What does it mean?
> The "Tightpage" and "Snippet" lines are added to the log file by the 
> preview-latex package. I use them to ascertain how to place the image 
> on the screen. See 'setAscentFractions' in 
> src/graphics/PreviewLoader.C for the gory details.

As long as it does not change across different flavor of latex, Preview: 
Tightpage and Preview: Snippet are good anchors of previews.

> It might be more elegant to use ${BASE}_retry.tex, but I don't think 
> that it really matters.

I guess so. I was tempted to keep ${TEXFILE} and only replace DVI and 
LOG with new ones as I did in the previous patch.

> This looks suspicious:
> +if (/^!.*Preview:\s+[^S]/gcms){

> In fact, if I understand you correctly, you're using this regex to 
> identify the line "Preview: Tightpage...", no?

Yes. I was not so sure about Tightpage so I used 'non-Snippet'.

> I think that if the line doesn't exist, then you should just abort.
> +if (!/Preview:\s+Tightpage/gcms){
>         // bail out

Under what condition will this line disappear? I thought that this line 
will exist for both correct and incorrect first preview.

> (I've forgotten what all those 'gcms' commands mean --- if I ever 
> knew.)

g: global. m: let ^ be beginning of line even when we deal with multiple 
lines all at ones. s: let . match new line. c: continue (later with 
different pattern.)

> * Grammatical point: don't call them 'wrong formulas'. Call them 
> 'incorrrect formulas', or even 'incorrect formulae'.

You can tell that English is not my native language everywhere. :-) 
Thanks.


-- 
Bo Peng

Reply via email to