Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-11 Thread Jean-Marc Lasgouttes
Guenter Milde mi...@users.berlios.de writes: Ah, so you probably wanted to say: add encoding to the text properties dialogue? Yes. JMarc

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-11 Thread Jean-Marc Lasgouttes
Uwe Stöhr uwesto...@web.de writes: We must do this: - if there is only one encoding, use this - if there are several encodings, set h_inputencoding to auto. So yes, this is independent of the languages. But what is there is only one encoding specified in the package loading command of

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-11 Thread Jean-Marc Lasgouttes
Guenter Milde writes: > Ah, so you probably wanted to say: add encoding to the text properties > dialogue? Yes. JMarc

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-11 Thread Jean-Marc Lasgouttes
Uwe Stöhr writes: > We must do this: > > - if there is only one encoding, use this > - if there are several encodings, set h_inputencoding to "auto". > > So yes, this is independent of the languages. But what is there is > only one encoding specified in the package loading

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Jean-Marc Lasgouttes
Le 10 déc. 09 à 03:46, Uwe Stöhr a écrit : LyX doesn't know ascii as encoding; we therefore need to translate it to an encoding that LyX understands. LyX understands latin5. Hmmm... 2007-02-16 Georg Baum georg.b...@post.rwth-aachen.de * format incremented to 262: Allow ascii

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: LyX doesn't know ascii as encoding; we therefore need to translate it to an encoding that LyX understands. LyX understands latin5. 2007-02-16 Georg Baum georg.b...@post.rwth-aachen.de * format incremented to 262: Allow ascii \inputencoding What else

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Jean-Marc Lasgouttes
G. Milde mi...@users.sourceforge.net writes: OK. Then the document encoding unconditionally. Only if it differs from the language's default. Maybe. Note that tex2lyx does not read Languages file currently (but I think it should). We just have to be careful about what language is handled at

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Jean-Marc Lasgouttes
Uwe Stöhr uwesto...@web.de writes: OK. But if there is one encoding and two languages, In this case we could set the encoding as it is but when the inputencoding is specified after babel, we don't know if there is only one or several encodings when we detect several languages. I therefore

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: OK. But if there is one encoding and two languages, In this case we could set the encoding as it is but when the inputencoding is specified after babel, we don't know if there is only one or several encodings when we detect several languages. I therefore set the

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Uwe Stöhr
Uwe Stöhr schrieb: 2007-02-16 Georg Baum georg.b...@post.rwth-aachen.de * format incremented to 262: Allow ascii \inputencoding What else do we need to make it work? tex2lyx currently produces fileformat 264, so the special ascii handling can indeed go. I'll have a closer look

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Guenter Milde
On 2009-12-10, Jean-Marc Lasgouttes wrote: G. Milde mi...@users.sourceforge.net writes: OK. Then the document encoding unconditionally. Only if it differs from the language's default. Maybe. Note that tex2lyx does not read Languages file currently (but I think it should). We just have to be

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Guenter Milde
On 2009-12-10, Uwe Stöhr wrote: Jean-Marc Lasgouttes schrieb: But what about ignoring the number of languages? It is about encodings, after all. - if there is only one encoding, use this - if there are several encodings, set h_inputencoding to auto. ... But what is there is only one

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Jean-Marc Lasgouttes
Le 10 déc. 09 à 03:46, Uwe Stöhr a écrit : LyX doesn't know "ascii" as encoding; we therefore need to translate it to an encoding that LyX understands. LyX understands latin5. Hmmm... 2007-02-16 Georg Baum * format incremented to 262: Allow ascii

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: LyX doesn't know "ascii" as encoding; we therefore need to translate it to an encoding that LyX understands. LyX understands latin5. 2007-02-16 Georg Baum * format incremented to 262: Allow ascii \inputencoding What

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Jean-Marc Lasgouttes
"G. Milde" writes: >> OK. Then the document encoding unconditionally. > > Only if it differs from the language's default. Maybe. Note that tex2lyx does not read Languages file currently (but I think it should). We just have to be careful about what language is

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Jean-Marc Lasgouttes
Uwe Stöhr writes: >> OK. But if there is one encoding and two languages, > > In this case we could set the encoding as it is but when the > inputencoding is specified after babel, we don't know if there is only > one or several encodings when we detect several languages. I

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: OK. But if there is one encoding and two languages, >> In this case we could set the encoding as it is but when the inputencoding is specified after babel, we don't know if there is only one or several encodings when we detect several languages. I therefore set

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Uwe Stöhr
Uwe Stöhr schrieb: 2007-02-16 Georg Baum * format incremented to 262: Allow ascii \inputencoding What else do we need to make it work? tex2lyx currently produces fileformat 264, so the special ascii handling can indeed go. I'll have a closer look

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Guenter Milde
On 2009-12-10, Jean-Marc Lasgouttes wrote: > "G. Milde" writes: >>> OK. Then the document encoding unconditionally. >> Only if it differs from the language's default. > Maybe. Note that tex2lyx does not read Languages file currently (but I > think it should). We

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-10 Thread Guenter Milde
On 2009-12-10, Uwe Stöhr wrote: > Jean-Marc Lasgouttes schrieb: >> But what about ignoring the number of languages? It is about encodings, >> after all. > - if there is only one encoding, use this > - if there are several encodings, set h_inputencoding to "auto". > ... But what is there is only

(to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Jean-Marc Lasgouttes
Uwe, I have been looking at this code from preamble.cpp // only set when there is not more than one inputenc // option therefore check for the , character also // only set when there is not more then one babel // language option

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Guenter Milde
On 2009-12-09, Jean-Marc Lasgouttes wrote: Uwe, I have been looking at this code from preamble.cpp // only set when there is not more than one inputenc // option therefore check for the , character also // only set when there is not more then one

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Jean-Marc Lasgouttes
In LyX, you can set DocumentSettingsLanguage to either (*) Language default ( ) Other With Other, you set *one* encoding for the whole document, with Language default the encoding is taken from the 'languages' config file and there can be more than one encoding in the document. To get

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Uwe Stöhr
I have been looking at this code from preamble.cpp // only set when there is not more than one inputenc // option therefore check for the , character also // only set when there is not more then one babel // language option if (opts.find(,) == string::npos one_language == true) { if

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Jean-Marc Lasgouttes
Le 9 déc. 09 à 22:48, G. Milde a écrit : OK, so what about just keeping the last encoding and, after finishing the parsing of preamble, resetting this encoding to auto if it is the default encoding for the language? But what to do if not? We should rather expect the other encoding to be used

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: For the case of ascii I already know that I am going to remove it :) If you read the linked bug, you will notice that we do create ascii-friendly accents as needed since we switched to unicode. There zero need to handle ascii differently from, say, latin5. LyX

(to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Jean-Marc Lasgouttes
Uwe, I have been looking at this code from preamble.cpp // only set when there is not more than one inputenc // option therefore check for the "," character also // only set when there is not more then one babel // language option

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Guenter Milde
On 2009-12-09, Jean-Marc Lasgouttes wrote: > Uwe, > I have been looking at this code from preamble.cpp > // only set when there is not more than one inputenc > // option therefore check for the "," character also > // only set when there is not more then

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Jean-Marc Lasgouttes
In LyX, you can set Document>Settings>Language to either (*) Language default ( ) Other With "Other", you set *one* encoding for the whole document, with "Language default" the encoding is taken from the 'languages' config file and there can be more than one encoding in the document. To get

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Uwe Stöhr
> I have been looking at this code from preamble.cpp > > // only set when there is not more than one inputenc > // option therefore check for the "," character also > // only set when there is not more then one babel > // language option > if (opts.find(",") == string::npos && one_language ==

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Jean-Marc Lasgouttes
Le 9 déc. 09 à 22:48, G. Milde a écrit : OK, so what about just keeping the last encoding and, after finishing the parsing of preamble, resetting this encoding to "auto" if it is the default encoding for the language? But what to do if not? We should rather expect the other encoding to be used

Re: (to Uwe) Special tex2lyx handling for multiple encodings declarations

2009-12-09 Thread Uwe Stöhr
Jean-Marc Lasgouttes schrieb: For the case of "ascii" I already know that I am going to remove it :) If you read the linked bug, you will notice that we do create ascii-friendly accents as needed since we switched to unicode. There zero need to handle ascii differently from, say, latin5. LyX