On Mon, Aug 28, 2000 at 07:42:26PM +0200, Lars Gullik Bj&resh;nnes wrote:
> 
> +       * src/LaTeX.C (run): If no file has been changed, check if the
> +       output dvi/pdf file exists. If not, run (pdf)latex once.
> 
> Why is this needed?

The code is needed for the following case: Suppose I view the document as DVI,
so LyX runs latex several times, and the DVI is generated.
Now I want to view PDF, using pdflatex.
However when calling to LaTeX::run, nothing will be done as there was no
changes in the LyX file (or in other files).

The new code solves this problem by checking whether the output file exists.
In this case, we check for filename.pdf (as we run pdflatex), and since it
is missing, we need to run pdflatex once to generate it.

> (You use it to get the dvi file generated even if
> we are really setup to making pdf files, I'd like us to find a better

No. See above.

> solution than this, that does not involve modifing the latex
> generation algorithm.)

Note that the new code also solves the following (very minor) problem:
Suppose you preview the DVI, and then (for some reason) you close xdvi, and
delete the DVI file. If you now try to preview the dvi again, without modifying
the LyX file, LyX will not regenerate the DVI file. The only way to enforce
regeneration of the DVI file is to modify the LyX file.

> And why did you remove my "// 0"? (that is item zero)

I guess that I didn't figured it is used for numbering.
I suggest you use positive integers...

Reply via email to