Re: [patch] fix language switch issue

2008-01-26 Thread Jürgen Spitzmüller
Koji Yokota wrote: > > Here's my test document and the resulting PDF. Looks correct to me. > > The ERT looks more complicated than what we'll need in the output > > finally. > > It worked fine for me, too. The problem is a general one: everything that might appear in the header or TOC (probably a

Re: [patch] fix language switch issue

2008-01-26 Thread Koji Yokota
Jürgen Spitzmüller wrote: But this will fail for sections and if the title contains for instance french and Japanese. You're right. Here's my test document and the resulting PDF. Looks correct to me. The ERT looks more complicated than what we'll need in the output finally. It worked fine f

Re: [patch] fix language switch issue

2008-01-25 Thread Jürgen Spitzmüller
Koji Yokota wrote: > Although I haven't extensively tested, the header issue of AMS seems to > be resolved just by enclosing \maketitle by \begin{CJK} and \end{CJK} > when the title includes CJK characters. But this will fail for sections and if the title contains for instance french and Japanese

Re: [patch] fix language switch issue

2008-01-25 Thread Koji Yokota
Although I haven't extensively tested, the header issue of AMS seems to be resolved just by enclosing \maketitle by \begin{CJK} and \end{CJK} when the title includes CJK characters. So a document should include parts such as \title{Header problem in second page with \begin{CJK}{EUC-JP}{}日本語\

Re: [patch] fix language switch issue

2008-01-25 Thread Jürgen Spitzmüller
Koji Yokota wrote: > Yes, output of the first page is fine. But the header of the second page > shows """ at the place of Japanese characters for "amsart" (it worked > fine for "article"). Here's my test document and the resulting PDF. Looks correct to me. The ERT looks more complicated than what

Re: [patch] fix language switch issue

2008-01-24 Thread Koji Yokota
Juergen Spitzmueller wrote: > In which respect? (I'm illiterate when it comes to kana script, but the > output at least *looks* correct to me). Sorry, it seems I made a mistake again (I have several versions of lyx installed on different machines, which causes a human error :<). I retried with

Re: [patch] fix language switch issue

2008-01-23 Thread Juergen Spitzmueller
Koji Yokota wrote: >> However, it seems that the following works: >> >> \title{Header problem in second page with >> \begin{CJK}{EUC-JP}{}???\end{CJK}} > > Yes, this makes compilation finish, but output is again not correct. In which respect? (I'm illiterate when it comes to kana script, but th

Re: [patch] fix language switch issue

2008-01-23 Thread Koji Yokota
Juergen Spitzmueller wrote: But this inserts a pagebreak, right? I don't think it's a good idea to enter pagebreaks at each language switch (moreover, the fix does not work for me). I also found that page break actually doesn't solve the problem (previously, I succeeded because I mistakenly us

Re: [patch] fix language switch issue

2008-01-22 Thread Juergen Spitzmueller
Koji Yokota wrote: > The patch seems to have solved the last case. Good. Thanks again for testing. > However, I encountered another case which we need consider and which is > probably a (known) bug of the cjk package. [...] > So, it may be better insert these clearing commands when the CJK pac

Re: [patch] fix language switch issue

2008-01-22 Thread Koji Yokota
Jürgen Spitzmüller wrote: Please try the attached patch, and again, test carefully also with you other test cases. The patch seems to have solved the last case. However, I encountered another case which we need consider and which is probably a (known) bug of the cjk package. When a title in

Re: [patch] fix language switch issue

2008-01-21 Thread Jürgen Spitzmüller
Koji Yokota wrote: > Is the attached case reproducible? I tested with 1.5.4svn. There is > inconsistency in closing bracing brackets of \title{} and > \begin{CJK}-\end{CJK}. Yes, it is reproducible. Please try the attached patch, and again, test carefully also with you other test cases. The cha

Re: [patch] fix language switch issue

2008-01-19 Thread Koji Yokota
Jürgen, Is the attached case reproducible? I tested with 1.5.4svn. There is inconsistency in closing bracing brackets of \title{} and \begin{CJK}-\end{CJK}. Koji testcase.lyx Description: application/lyx \batchmode \makeatletter [EMAIL PROTECTED]/usr/home/uji//}} \makeatother \documentclass

Re: [patch] fix language switch issue

2008-01-18 Thread Jürgen Spitzmüller
Uwe Stöhr wrote: > I have tested the the latest version of your patch you posted here: > http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134546.html > and it passed all my testcases. Of course it also fixes the specific > problem the patch is for. Thanks for testing, Uwe. I'll wait a few da

Re: [patch] fix language switch issue

2008-01-17 Thread Uwe Stöhr
Jürgen Spitzmüller schrieb: I have tested with all my CJK testcases. Uwe and Koji, could you please test the patch with your cases as well? I have tested the the latest version of your patch you posted here: http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg134546.html and it passed all m

Re: [patch] fix language switch issue

2008-01-16 Thread Jean-Marc Lasgouttes
Jürgen Spitzmüller <[EMAIL PROTECTED]> writes: > Jean-Marc Lasgouttes wrote: >> Another solution would have been to add a ismaintext bool to >> OutputParams. > > Yes. But I don't want to rewrite it again ;-) What a lame argument :-p JMarc

Re: [patch] fix language switch issue

2008-01-16 Thread Jürgen Spitzmüller
Jean-Marc Lasgouttes wrote: > Another solution would have been to add a ismaintext bool to > OutputParams. Yes. But I don't want to rewrite it again ;-) Jürgen

Re: [patch] fix language switch issue

2008-01-16 Thread Jean-Marc Lasgouttes
Jürgen Spitzmüller <[EMAIL PROTECTED]> writes: > Abdelrazak Younes wrote: >> Instead of doing this, you could pass a Text object instead of >> ParagraphList. As the reference Buffer is also available, you can then >> use Text::isMainText(). > > Ah, yes. Patch attached. Another solution would have

Re: [patch] fix language switch issue

2008-01-16 Thread Jürgen Spitzmüller
Abdelrazak Younes wrote: > Instead of doing this, you could pass a Text object instead of > ParagraphList. As the reference Buffer is also available, you can then > use Text::isMainText(). Ah, yes. Patch attached. Jürgen Index: src/insets/InsetEnvironment.cpp =

Re: [patch] fix language switch issue

2008-01-16 Thread Abdelrazak Younes
Jürgen Spitzmüller wrote: I stumbled over a bug in trunk and branch that slipped in with my CJK patch. If "auto begin" is disabled in Prefs->Language, a language switch command is inserted in an optArg inset, so you get something like \section[\selectlanguage{english}short title]{long

[patch] fix language switch issue

2008-01-16 Thread Jürgen Spitzmüller
I stumbled over a bug in trunk and branch that slipped in with my CJK patch. If "auto begin" is disabled in Prefs->Language, a language switch command is inserted in an optArg inset, so you get something like \section[\selectlanguage{english}short title]{long title} in an English documen