On Wed, 2004-10-06 at 18:02, Angus Leeming wrote: > Martin Vermeer wrote: > > > On Wed, 2004-10-06 at 17:48, Angus Leeming wrote: > >> Martin Vermeer wrote: > >> > So I re-wrote the patch like attached... only problem is, > >> > runparams.lang appears to be empty, no matter what I set as document > >> > language or even "paint" the surroundings of the index inset to > >> > another language. > >> > > >> > Sure this is supposed to work? Stumped. > >> > >> Me too, because this is your earlier patch... > > > > Mysteries, mysteries. > > > > - Martin > > Martin, get a grip! All three are identical. > Angus
OK, this should be the real patch now. I checked by saving to 'drafts' and opening it there... Why is runparams.lang empty no matter what I do? - Martin
Index: LaTeX.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LaTeX.C,v retrieving revision 1.103 diff -u -r1.103 LaTeX.C --- LaTeX.C 5 Oct 2004 10:11:26 -0000 1.103 +++ LaTeX.C 6 Oct 2004 14:24:30 -0000 @@ -44,6 +44,7 @@ using lyx::support::QuoteName; using lyx::support::rtrim; using lyx::support::split; +using lyx::support::subst; using lyx::support::suffixIs; using lyx::support::Systemcall; using lyx::support::unlink; @@ -274,7 +275,7 @@ // no checks for now lyxerr[Debug::LATEX] << "Running MakeIndex." << endl; message(_("Running MakeIndex.")); - rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx"))); + rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")), runparams); } // run bibtex @@ -342,7 +343,7 @@ // no checks for now lyxerr[Debug::LATEX] << "Running MakeIndex." << endl; message(_("Running MakeIndex.")); - rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx"))); + rerun = runMakeIndex(OnlyFilename(ChangeExtension(file, ".idx")), runparams); } // 2 @@ -393,12 +394,14 @@ } -bool LaTeX::runMakeIndex(string const & f) +bool LaTeX::runMakeIndex(string const & f, OutputParams runparams) { lyxerr[Debug::LATEX] << "idx file has been made," " running makeindex on file " << f << endl; string tmp = lyxrc.index_command + " "; + string s = runparams.lang; + tmp = subst(tmp, "$$lang", s); tmp += QuoteName(f); Systemcall one; one.startscript(Systemcall::Wait, tmp);
signature.asc
Description: This is a digitally signed message part