From: Jürgen Spitzmüller Date: Mon, 29 May 2006 14:49:08 +0000 (+0000) Subject: fix bug 2623: X-Git-Tag: 1.6.10~13181 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=28fa2c0efa8047b29494345ddcccca8b268c6dc0;p=lyx.git fix bug 2623: * lib/layouts/memoir.layout: add ProvidesMakeindex * src/LaTeX.C (run): rerun latex im idx file is empty (needed by memoir) fix typo in comment * src/LaTeXFeatures.C (getPackages): whitespace git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13950 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/lib/layouts/memoir.layout b/lib/layouts/memoir.layout index 7c1bc9e930..63abd2cd5e 100644 --- a/lib/layouts/memoir.layout +++ b/lib/layouts/memoir.layout @@ -13,6 +13,7 @@ SecNumDepth 2 TocDepth 2 DefaultStyle Standard PageStyle Headings +ProvidesMakeidx 1 ClassOptions diff --git a/src/LaTeX.C b/src/LaTeX.C index 90092a7cf9..5837c5d9b3 100644 --- a/src/LaTeX.C +++ b/src/LaTeX.C @@ -269,6 +269,11 @@ int LaTeX::run(TeXErrors & terr) // the .aux file is checked for signs of bibtex. Bibtex is then run // if needed. + // memoir (at least) writes an empty *idx file in the first place. + // A second latex run is needed. + rerun = fs::exists(ChangeExtension(file, ".idx")) + && fs::is_empty(ChangeExtension(file, ".idx")); + // run makeindex if (head.haschanged(onlyFilename(changeExtension(file, ".idx")))) { // no checks for now @@ -331,7 +336,7 @@ int LaTeX::run(TeXErrors & terr) // 1.5 // The inclusion of files generated by external programs like - // makeindex or bibtex might have done changes to pagenumbereing, + // makeindex or bibtex might have done changes to pagenumbering, // etc. And because of this we must run the external programs // again to make sure everything is redone correctly. // Also there should be no need to run the external programs any diff --git a/src/LaTeXFeatures.C b/src/LaTeXFeatures.C index 347c10a814..2a2b757436 100644 --- a/src/LaTeXFeatures.C +++ b/src/LaTeXFeatures.C @@ -294,7 +294,7 @@ string const LaTeXFeatures::getPackages() const // makeidx.sty if (isRequired("makeidx")) { - if (! tclass.provides(LyXTextClass::makeidx)) + if (!tclass.provides(LyXTextClass::makeidx)) packages << "\\usepackage{makeidx}\n"; packages << "\\makeindex\n"; }