]> git.lyx.org Git - features.git/blobdiff - src/buffer.C
ok, some more changes, this time I have gotten the fonttable and insettable in lyxpar...
[features.git] / src / buffer.C
index e0953cf145bdde710a6fad6f78f0acb7232a5fe5..649dc2e291f4b9a7ceac42103bde327f6618ba97 100644 (file)
@@ -3167,7 +3167,9 @@ int Buffer::runLaTeX()
 
        // do the LaTex run(s)
        TeXErrors terr;
-       LaTeX latex(lyxrc->latex_command, name, filepath);
+       string latex_command = lyxrc->pdf_mode ?
+               lyxrc->pdflatex_command : lyxrc->latex_command;
+       LaTeX latex(latex_command, name, filepath);
        int res = latex.run(terr,
                            users->owner()->getMiniBuffer()); // running latex
 
@@ -3233,7 +3235,9 @@ int Buffer::runLiterate()
                markDviDirty();
        }
 
-        Literate literate(lyxrc->latex_command, name, filepath, 
+       string latex_command = lyxrc->pdf_mode ?
+               lyxrc->pdflatex_command : lyxrc->latex_command;
+        Literate literate(latex_command, name, filepath, 
                          lit_name,
                          lyxrc->literate_command, lyxrc->literate_error_filter,
                          lyxrc->build_command, lyxrc->build_error_filter);
@@ -3301,8 +3305,10 @@ int Buffer::buildProgram()
                 makeLaTeXFile(lit_name, org_path, false);
                 markNwDirty();
         }
-        Literate literate(lyxrc->latex_command, name, filepath, 
+
+       string latex_command = lyxrc->pdf_mode ?
+               lyxrc->pdflatex_command : lyxrc->latex_command;
+        Literate literate(latex_command, name, filepath, 
                          lit_name,
                          lyxrc->literate_command, lyxrc->literate_error_filter,
                          lyxrc->build_command, lyxrc->build_error_filter);