On Tue, Aug 29, 2000 at 10:00:56PM +0200, Lars Gullik Bj&resh;nnes wrote:
> Dekel Tsur <[EMAIL PROTECTED]> writes:
> | On Mon, Aug 28, 2000 at 07:42:26PM +0200, Lars Gullik Bj?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).
> 
> I understand the prolem, but I don't like the solution.
> And you also assume that the requirements for pdflatex and latex are
> identical, wrt the dependency file etc. I belive that this need not be
> true.

Yes, the dependency file of pdflatex can be different.
So perhaps the correct solution is to use different dependency files for
latex & pdflatex:

+++ LaTeX.C     Wed Aug 30 00:12:57 2000
@@ -71,6 +71,8 @@ LaTeX::LaTeX(string const & latex, strin
 {
        num_errors = 0;
        depfile = file + ".dep";
+       if (prefixIs(cmd, "pdf")) // Do we use pdflatex ?
+               depfile += "-pdf";
 }

The above change (without changing LaTeX::run) fixes the problem mentioned
above.
I've attached an updated patch.

> One thing: Your patch seems to be broken with regard to new and
> deleted files.
>
> Do you have a local cvs repository that you create the patches from?
>         (if so don't do that)

I used a script to add new files to the patch. I've now fixed the script.

patch.gz

Reply via email to