Martin Vermeer wrote:

> On Wed, 2004-10-06 at 10:51, Angus Leeming wrote:
>> Martin Vermeer wrote:
>> >> Huh? The string stored in lyxrc::index_command is presumably
>> >> something like
>> >> "makeindex.sh -m $$lang". So, before you launch makeindex.sh in
>> >> LaTeX.C's
>> >> runMakeIndex, you need to substitute $$lang for the document
>> >> language.
>> >> 
>> >> Where's the difficulty?
>> > Where do I find the document language?
>> 
>> $ grep -n language bufferparams.h
>> 111:    InsetQuotes::quote_language quotes_language;
>> 164:    Language const * language;
> 
> Yes... what I was afraid of. Pulls in a lot... see attached patch. Does
> this work for you too? And wasn't bufferlist something to get rid of
> here? And is the use of first() kosher?

Well, the latex run is initiated from here:
bool Converters::runLaTeX(Buffer const & buffer, string const & command,
                          OutputParams const & runparams)
{
        ...
        LaTeX latex(command, runparams, name, buffer.filePath());
        TeXErrors terr;
        showMessage show(buffer);
        latex.message.connect(show);
        int result = latex.run(terr);

Why not pass 'buffer' to LaTeX::run() ? That would enable you to proceed
without jumping through hoops.

-- 
Angus

Reply via email to