Re: Caption in listings inset is messed up

2007-08-26 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: > PS: BTW, is it really necessary to firce the encoding to latin1 before > lstlisting? This is weird... I think the reason is that the listings package cannot handle utf8. So the listings have to be in another encoding than utf8. Jürgen

Ignoring text in spell-check (was: Re: Caption in listings inset is messed up)

2007-08-07 Thread Dov Feldstern
Mael Hilléreau wrote: Selon Dov Feldstern : I think it's wrong. We're mixing latex-related information (language) with GUI-related information (should this be spell-checked?). These two things have to be decoupled. I agree. Perhaps a new inset (e.g. "Ignore spellchecking") should be introduce

Re: Caption in listings inset is messed up

2007-08-07 Thread Dov Feldstern
Dov Feldstern wrote: Bo Peng wrote: So, something fishy is definitely going on, I'm looking into it now. I think the first thing to do is to figure out the correct latex syntax when other languages are used. Herbert said that only latin language is supported so maybe non-latin language is not

Re: Caption in listings inset is messed up

2007-08-07 Thread Jean-Marc Lasgouttes
Dov Feldstern <[EMAIL PROTECTED]> writes: > I think it's wrong. We're mixing latex-related information (language) > with GUI-related information (should this be spell-checked?). These > two things have to be decoupled. I realize this may not be easy to > implement, but I think it's the correct lon

Re: Caption in listings inset is messed up

2007-08-04 Thread Dov Feldstern
Bo Peng wrote: So, something fishy is definitely going on, I'm looking into it now. I think the first thing to do is to figure out the correct latex syntax when other languages are used. Herbert said that only latin language is supported so maybe non-latin language is not supported at all in th

Re: Caption in listings inset is messed up

2007-08-04 Thread Bo Peng
> So, something fishy is definitely going on, I'm looking into it now. I think the first thing to do is to figure out the correct latex syntax when other languages are used. Herbert said that only latin language is supported so maybe non-latin language is not supported at all in the listings capti

Re: Caption in listings inset is messed up

2007-08-04 Thread Mael Hilléreau
Selon Dov Feldstern <[EMAIL PROTECTED]>: > I think it's wrong. We're mixing latex-related information (language) > with GUI-related information (should this be spell-checked?). These two > things have to be decoupled. I agree. Perhaps a new inset (e.g. "Ignore spellchecking") should be introduced

Re: Caption in listings inset is messed up

2007-08-04 Thread Dov Feldstern
Jean-Marc Lasgouttes wrote: Dov Feldstern writes: *) A separate issue, but it may be related: I know there's been talk of changing the language to something like "none" in order to get the spell checker to ignore parts of the text, I don't know if it's actually happening already or not. But it

Re: Caption in listings inset is messed up

2007-08-04 Thread Jean-Marc Lasgouttes
Dov Feldstern <[EMAIL PROTECTED]> writes: > *) A separate issue, but it may be related: I know there's been talk > of changing the language to something like "none" in order to get the > spell checker to ignore parts of the text, I don't know if it's > actually happening already or not. But it see

Re: Caption in listings inset is messed up

2007-08-04 Thread Dov Feldstern
Jean-Marc Lasgouttes wrote: "Bo Peng" <[EMAIL PROTECTED]> writes: Your patch does not fix the bug for me, but why cannot you apply mine? As far as I can tell, it can do no harm. After 1.5.1, we can find a proper fix. (I have spent several hours on this, and found no better fix now). Sorry, I

Re: Caption in listings inset is messed up

2007-08-04 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > Your patch does not fix the bug for me, but why cannot you apply mine? > As far as I can tell, it can do no harm. After 1.5.1, we can find a > proper fix. (I have spent several hours on this, and found no better > fix now). Sorry, I really do not want to ad

Re: Caption in listings inset is messed up

2007-08-04 Thread Bo Peng
> To be clearer, either I commit my patch if it helps, or I don't and > the bug remains unfixed for 1.5.1. We are running out of time. Your patch does not fix the bug for me, but why cannot you apply mine? As far as I can tell, it can do no harm. After 1.5.1, we can find a proper fix. (I have spen

Re: Caption in listings inset is messed up

2007-08-04 Thread Jean-Marc Lasgouttes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: >> So my test for language==latex may still be needed, at least as a >> temporary fix for 1.5.1. > > But, to confirm, the extra \inputencoding creates a bug for you, right? To be clearer, either I commit my patch if it helps, or I don't and the bug

Re: Caption in listings inset is messed up

2007-08-04 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: >> I get that too, but it does not prevent typesetting. >> I know where this latin1 encoding is set for lang_latex, but I do not >> know why, and this makes me nervous. > > So my test for language==latex may still be needed, at least as a > temporary fix for 1

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
I am not familiar with these encoding stuff at all. I played a bit and found something interesting. The latex output when I open a listings inset with caption is different from when I insert a caption in lyx. The former has correct latex output. I guess the problem is that the outer layout of this

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
On 8/3/07, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > "Bo Peng" <[EMAIL PROTECTED]> writes: > > >> Therefore I propose the following patch if it works for you. > > > > It does not work. I still get for my listings inset. > > > > \begingroup > > \inputencoding{latin1} > > \begin{lstlisting}[c

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > "Bo Peng" <[EMAIL PROTECTED]> writes: > >>> Therefore I propose the following patch if it works for you. >> >> It does not work. I still get for my listings inset. >> >> \begingroup >> \inputencoding{latin1} >> \begin{lstlisting}[caption={\inputen

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: >> Therefore I propose the following patch if it works for you. > > It does not work. I still get for my listings inset. > > \begingroup > \inputencoding{latin1} > \begin{lstlisting}[caption={\inputencoding{latin1}ddd\selectlanguage{english} > }] > ddd > \end{

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
> \begingroup > \inputencoding{latin1} > \begin{lstlisting}[caption={\inputencoding{latin1}ddd\selectlanguage{english} > }] > ddd > \end{lstlisting} > \endgroup I notice that \selectlanguage{english} does not matter (though ugly),and \inputencoding{latin1} is causing the problem. I do not know whe

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
> Therefore I propose the following patch if it works for you. It does not work. I still get for my listings inset. \begingroup \inputencoding{latin1} \begin{lstlisting}[caption={\inputencoding{latin1}ddd\selectlanguage{english} }] ddd \end{lstlisting} \endgroup > PS: BTW, is it really necessar

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > On 8/3/07, Bo Peng <[EMAIL PROTECTED]> wrote: >> > I'd really prefer if possible >> > +par_language != latex_language && >> > >> > Don't commit now, I'll try to do basic testing when I am home. > > If this problem is taken care of, 1.5.1

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
On 8/3/07, Bo Peng <[EMAIL PROTECTED]> wrote: > > I'd really prefer if possible > > +par_language != latex_language && > > > > Don't commit now, I'll try to do basic testing when I am home. If this problem is taken care of, 1.5.1 is ready. Bo

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
> I'd really prefer if possible > +par_language != latex_language && > > Don't commit now, I'll try to do basic testing when I am home. OK. Thanks. Bo

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > Thanks JMarc. This is it. Can I apply the attached patch? I'd really prefer if possible +par_language != latex_language && Don't commit now, I'll try to do basic testing when I am home. JMarc

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
> Actually, I do not think LyX should _ever_ output a > \selectlanguage{latex} command. You are missing a "language != > latex_language" test somewhere. Thanks JMarc. This is it. Can I apply the attached patch? Index: src/output_latex.cpp ==

Re: Caption in listings inset is messed up

2007-08-03 Thread Dov Feldstern
Jean-Marc Lasgouttes wrote: "Bo Peng" <[EMAIL PROTECTED]> writes: Chances are this has to do with my fix to bug 1820 (r19150) --- I'm testing that now (compiling after undoing that changeset). But I won't have time to look into it until tomorrow night. What's this "latex" language? I do not k

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
On 8/3/07, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > "Bo Peng" <[EMAIL PROTECTED]> writes: > > >> Well, this is for listings with captions. > > > > Are you sure all other Caption output is correct?? > > At first sight it seems to work. OK. If it is only listings, at least I can try not to

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
> Actually, I do not think LyX should _ever_ output a > \selectlanguage{latex} command. You are missing a "language != > latex_language" test somewhere. But that duplicated \inputencoding{latin1} also causes problem. Bo

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: >> Well, this is for listings with captions. > > Are you sure all other Caption output is correct?? At first sight it seems to work. JMarc

Re: Caption in listings inset is messed up

2007-08-03 Thread Dov Feldstern
Bo Peng wrote: Well, this is for listings with captions. Are you sure all other Caption output is correct?? Bo At the time my change was made, I tested it with captions in figure floats, and they were fine, even with language switches...

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: >> Chances are this has to do with my fix to bug 1820 (r19150) --- I'm >> testing that now (compiling after undoing that changeset). But I won't >> have time to look into it until tomorrow night. >> >> What's this "latex" language? > > I do not know. But pleas

Re: Caption in listings inset is messed up

2007-08-03 Thread Dov Feldstern
Bo Peng wrote: Chances are this has to do with my fix to bug 1820 (r19150) --- I'm testing that now (compiling after undoing that changeset). But I won't have time to look into it until tomorrow night. What's this "latex" language? I do not know. But please fix it before 1.5.1 because it stops

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
> Well, this is for listings with captions. Are you sure all other Caption output is correct?? Bo

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
> Chances are this has to do with my fix to bug 1820 (r19150) --- I'm > testing that now (compiling after undoing that changeset). But I won't > have time to look into it until tomorrow night. > > What's this "latex" language? I do not know. But please fix it before 1.5.1 because it stops all my w

Re: Caption in listings inset is messed up

2007-08-03 Thread Dov Feldstern
Jean-Marc Lasgouttes wrote: "Bo Peng" <[EMAIL PROTECTED]> writes: On 8/3/07, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: This makes listings totally unusable, and stops my documents from compiling! Well, this is for listings with captions. I think the top priority is to release a version

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > On 8/3/07, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > This makes listings totally unusable, and stops my documents from > compiling! Well, this is for listings with captions. I think the top priority is to release a version of 1.5 that does not eat

Re: Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
On 8/3/07, Jean-Marc Lasgouttes <[EMAIL PROTECTED]> wrote: > > This has to be fixed now! > > I do not think it will be for 1.5.1. This makes listings totally unusable, and stops my documents from compiling! Who did the \setlanguage change? > BTW, what about the selection patches? For reference he

Re: Caption in listings inset is messed up

2007-08-03 Thread Jean-Marc Lasgouttes
"Bo Peng" <[EMAIL PROTECTED]> writes: > This has to be fixed now! I do not think it will be for 1.5.1. BTW, what about the selection patches? For reference here is the patch I have in my 1.5 tree, and I like a nod before applying. JMarc Index: src/BufferView.cpp ===

Caption in listings inset is messed up

2007-08-03 Thread Bo Peng
Insert caption "d" in a listing inset, I get \begingroup \inputencoding{latin1} \begin{lstlisting}[caption={\selectlanguage{latex} \inputencoding{latin1}d\selectlanguage{english} }] \end{lstlisting} \endgroup and latex can not compile. Why this second inputencoding, and all these setlanguage mes