ghostscript and LyX-CJK
Dear list, I just installed SUSE9.3, japanese version, in Unicode. Basically everything works, except two snags: 1) lyx-cjk-1.3.5-3 does not allow for kanji input in the main window. I tried this after starting kinput2 -canna& LANG=ja_JP LC_XMODIFIERS="@im=kinput2" lyx-cjk I can see japanese text, e.g. the splash.lyx file. I can input Japanese if I open the "find" dialog, or in the lower bar, the minibuffer, and even copy and paste the result into the main window, but NOT enter Japanese directly. This worked still fine with SUSE 9.1. 2) Next, ghostview. I took an example file, like http://www.suse.de/~mfabian/suse-cjk/vertical-orizontal-test.ps I verified that I can open this in my old SUSE8.2 and see all characters correctly. Next, I open it with gs as normal user in 9.3, from bash. The result are Mojibake and the messages: --- gs vertical-horizontal-test.ps ESP Ghostscript 8.15 (2004-09-22) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Scanning /usr/X11R6/lib/X11/fonts/ for fonts... 12 files, 12 scanned, 0 new fonts. Scanning /usr/share/fonts/ for fonts... 2 files, 2 scanned, 0 new fonts. Can't find (or can't open) font file /home/hisha/Resource/Font/Ryumin-Light-UniJIS-UTF8-V. Can't find (or can't open) font file Ryumin-Light-UniJIS-UTF8-V. Querying operating system for font files... Didn't find this font on the system! Substituting font Courier for Ryumin-Light-UniJIS-UTF8-V. Loading NimbusMonL-Regu font from /usr/share/ghostscript/fonts/n022003l.pfb... 2395532 1032646 1474788 180942 1 done. Can't find (or can't open) font file /home/hisha/Resource/Font/Ryumin-Light-UniJIS-UTF8-H. Can't find (or can't open) font file Ryumin-Light-UniJIS-UTF8-H. Didn't find this font on the system! Substituting font Courier for Ryumin-Light-UniJIS-UTF8-H.
showpage, press <return> to continue<<
Then I switched to root (su -) and there I CAN open the file, without a hitch. The messages are in this case --- ESP Ghostscript 8.15 (2004-09-22) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Scanning /usr/X11R6/lib/X11/fonts/ for fonts... 12 files, 12 scanned, 0 new fonts. Scanning /usr/share/fonts/ for fonts... 2 files, 2 scanned, 0 new fonts. Loading a TT font from /usr/X11R6/lib/X11/fonts/truetype/ipam.ttf to emulate a CID font Ryumin-Light ... Done.
showpage, press <return> to continue<<
These two things happend just afer I installed the system, so I did not change the standard configuration. Now, because I did not find any hint in the suse-cjk guide, does anybody have an idea of what might be going wrong? Hisha __________________________________ Save the earth http://pr.mail.yahoo.co.jp/ondanka/
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
lyx-cjk-1.3.5-3 does not allow for kanji input in the main window. I tried this after starting kinput2 -canna& LANG=ja_JP LC_XMODIFIERS="@im=kinput2" lyx-cjk I can see japanese text, e.g. the splash.lyx file. I can input Japanese if I open the "find" dialog, or in the lower bar, the minibuffer, and even copy and paste the result into the main window, but NOT enter Japanese directly. This worked still fine with SUSE 9.1.
This is a known problem, but unfortunately no good solution is known yet. The problem is caused by the qt-immodule patch. SuSE Linux 9.1 didn't yet have that patch, therefore the Qt version of CJK-LyX worked in SuSE Linux 9.1. See also: http://lists.freedesktop.org/archives/immodule-qt/2004-December/000648.html http://lists.freedesktop.org/archives/immodule-qt/2004-December/000649.html http://lists.freedesktop.org/archives/immodule-qt/2005-March/000715.html http://lists.freedesktop.org/archives/immodule-qt/2005-June/000733.html The bug report at the lyx bugzilla has been closed as FIXED, I'll check whether the patches from that bugreport can be used to fix the problem in CJK-LyX as well: http://bugzilla.lyx.org/show_bug.cgi?id=1830 As a temporary workaround you can use the cjk-lyx and xforms packages from SuSE Linux 9.0 on SuSE Linux 9.3. SuSE Linux 9.0 was the version of SuSE Linux where the cjk-lyx package still used xforms and not Qt. xforms was dropped in later versions of SuSE Linux and cjk-lyx was built against Qt. This worked in SuSE Linux 9.1, but has been broken by the qt-immodule patch since SuSE Linux 9.2. As soon as I have a solution, I'll update the cjk-lyx package for SuSE Linux 9.3. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
--- Mike FABIAN <mfabian@suse.de> からのメッセージ:
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
lyx-cjk-1.3.5-3 does not allow for kanji input in the main window. I tried this after starting kinput2 -canna& LANG=ja_JP LC_XMODIFIERS="@im=kinput2" lyx-cjk I can see japanese text, e.g. the splash.lyx file. I can input Japanese if I open the "find" dialog, or in the lower bar, the minibuffer, and even copy and paste the result into the main window, but NOT enter Japanese directly. This worked still fine with SUSE 9.1.
This is a known problem, but unfortunately no good solution is known yet.
The problem is caused by the qt-immodule patch. SuSE Linux 9.1 didn't yet have that patch, therefore the Qt version of CJK-LyX worked in SuSE Linux 9.1.
See also:
http://lists.freedesktop.org/archives/immodule-qt/2004-December/000648.html
http://lists.freedesktop.org/archives/immodule-qt/2004-December/000649.html
http://lists.freedesktop.org/archives/immodule-qt/2005-March/000715.html
http://lists.freedesktop.org/archives/immodule-qt/2005-June/000733.html
The bug report at the lyx bugzilla has been closed as FIXED, I'll check whether the patches from that bugreport can be used to fix the problem in CJK-LyX as well:
http://bugzilla.lyx.org/show_bug.cgi?id=1830
As a temporary workaround you can use the cjk-lyx and xforms packages from SuSE Linux 9.0 on SuSE Linux 9.3. SuSE Linux 9.0 was the version of SuSE Linux where the cjk-lyx package still used xforms and not Qt. xforms was dropped in later versions of SuSE Linux and cjk-lyx was built against Qt. This worked in SuSE Linux 9.1, but has been broken by the qt-immodule patch since SuSE Linux 9.2.
As soon as I have a solution, I'll update the cjk-lyx package for SuSE Linux 9.3.
-- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Yes, that would help me a lot. Why, I am using cjk-lyx every day. It is really the best software for scientific writing in Japanese. Even 300+ pages documents with all kinds of cross references and figures work out perfectly, and fast. Of course, I tried to install my old SUSE8.2 cjk-lyx-1.3.2-72 together with xforms. The Japanese works there all right. However, in SUSE 9.1 as well in 9.3 I get weird (too large) boxes around \int or \sum symbols in math, or any other symbol from the math panel's "sum" / "integral" sub-panel. So any equation is hideously distorted, if only one of these symbols is appearing (The compiled dvi, ps or pdf works still fine, so it is not a latex problem). Actually, I even do not get all the symbols inside the math panel popup disaplayed if I use the SUSE 9.0 version of xforms (with or without extension), or any other SUSE version I tried, but only if I use the xforms-1.0-i18n_7.i386.rpm from the cjk-lyx ftp server. This (smaller) problem I faced in SUSE 8.2, 9.1 and 9.3 . Regrettably, while with the xforms-1.0-i18n_7.i386.rpm all symbols IN the math panel popup window appear correctly, in the MAIN WINDOW the sum/integral symbols appear distorted, no matter which version of xforms I use. On my old SUSE 8.2 the above cjk-lyx+xforms worked perfectly. So there must be some inconsistency from SUSE 9.1 (or 9.0?) on. As I can guess that just installing an earlier version of qt causes more new problems then it fixes, I am happy to wait a few weeks if you really can fix the much more beautiful qt version of cjk-lyx. Kind regards, Hisha __________________________________ Save the earth http://pr.mail.yahoo.co.jp/ondanka/
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
As soon as I have a solution, I'll update the cjk-lyx package for SuSE Linux 9.3.
[...]
Yes, that would help me a lot.
[...]
Of course, I tried to install my old SUSE8.2 cjk-lyx-1.3.2-72 together with xforms.
[... some problems ...]
So there must be some inconsistency from SUSE 9.1 (or 9.0?) on.
Maybe.
As I can guess that just installing an earlier version of qt causes more new problems then it fixes,
Yes, certainly this would cause problems. Instead of installing an older Qt version, I would rather take the source rpm of the qt package in SuSE Linux 9.3, comment out the line which applies the qt-immodule patch and rebuilt that. Such a Qt package will certainly also cause a few problems with Japanese input in some KDE applications (the qt-immodule patch fixed a many bugs for CJK input in KDE), but it will be usable.
I am happy to wait a few weeks if you really can fix the much more beautiful qt version of cjk-lyx.
I will check the patches from the lyx bug report http://bugzilla.lyx.org/show_bug.cgi?id=1830 tomorrow and see if they can fix the problem. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
--- Mike FABIAN <mfabian@suse.de> からのメッセージ:
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
As soon as I have a solution, I'll update the cjk-lyx package for SuSE Linux 9.3.
[...]
Yes, that would help me a lot.
[...]
Of course, I tried to install my old SUSE8.2 cjk-lyx-1.3.2-72 together with xforms.
[... some problems ...]
So there must be some inconsistency from SUSE 9.1 (or 9.0?) on.
Maybe.
As I can guess that just installing an earlier version of qt causes more new problems then it fixes,
Yes, certainly this would cause problems.
Instead of installing an older Qt version, I would rather take the source rpm of the qt package in SuSE Linux 9.3, comment out the line which applies the qt-immodule patch and rebuilt that.
Such a Qt package will certainly also cause a few problems with Japanese input in some KDE applications (the qt-immodule patch fixed a many bugs for CJK input in KDE), but it will be usable.
I am happy to wait a few weeks if you really can fix the much more beautiful qt version of cjk-lyx.
I will check the patches from the lyx bug report
http://bugzilla.lyx.org/show_bug.cgi?id=1830
tomorrow and see if they can fix the problem.
-- Mike FABIAN <mfabian@suse.de>
I read that apparently this bug has been fixed in the version cjk-lyx-1.3.6-2.i586.rpm . See http://lists.freedesktop.org/archives/immodule-qt/2005-June/000734.html Is there any way to get this version running on SUSE 9.3? With kind regards Hisha -------------------------------------- Know more about Breast Cancer http://pr.mail.yahoo.co.jp/pinkribbon/
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
Next, ghostview. I took an example file, like http://www.suse.de/~mfabian/suse-cjk/vertical-orizontal-test.ps I verified that I can open this in my old SUSE8.2 and see all characters correctly. Next, I open it with gs as normal user in 9.3, from bash. The result are Mojibake and the messages: --- gs vertical-horizontal-test.ps ESP Ghostscript 8.15 (2004-09-22) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Scanning /usr/X11R6/lib/X11/fonts/ for fonts... 12 files, 12 scanned, 0 new fonts. Scanning /usr/share/fonts/ for fonts... 2 files, 2 scanned, 0 new fonts. Can't find (or can't open) font file /home/hisha/Resource/Font/Ryumin-Light-UniJIS-UTF8-V. Can't find (or can't open) font file Ryumin-Light-UniJIS-UTF8-V.
'/home/hisha' is weird! I found that the problem is caused by the environment variable GS_LIB. Apparently KDE sets it to GS_LIB=/home/hisha/.fonts If you unset this variable, ghostscript works again. Therefore the problem doesn't happen if you don't use KDE and it also disappears after 'su -' because then you do not have GS_LIB in the environment anymore. As a temporary workaround, you can add unset GS_LIB to your ~/.profile. I'll check now out why KDE sets this environment variable. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Mike FABIAN <mfabian@suse.de> さんは書きました:
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
Next, ghostview. I took an example file, like http://www.suse.de/~mfabian/suse-cjk/vertical-orizontal-test.ps I verified that I can open this in my old SUSE8.2 and see all characters correctly. Next, I open it with gs as normal user in 9.3, from bash. The result are Mojibake and the messages: --- gs vertical-horizontal-test.ps ESP Ghostscript 8.15 (2004-09-22) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Scanning /usr/X11R6/lib/X11/fonts/ for fonts... 12 files, 12 scanned, 0 new fonts. Scanning /usr/share/fonts/ for fonts... 2 files, 2 scanned, 0 new fonts. Can't find (or can't open) font file /home/hisha/Resource/Font/Ryumin-Light-UniJIS-UTF8-V. Can't find (or can't open) font file Ryumin-Light-UniJIS-UTF8-V.
'/home/hisha' is weird!
I found that the problem is caused by the environment variable GS_LIB. Apparently KDE sets it to
GS_LIB=/home/hisha/.fonts
If you unset this variable, ghostscript works again.
Therefore the problem doesn't happen if you don't use KDE and it also disappears after 'su -' because then you do not have GS_LIB in the environment anymore.
As a temporary workaround, you can add
unset GS_LIB
to your ~/.profile.
I'll check now out why KDE sets this environment variable.
I reported that as bug #91584 against KDE at http://bugzilla.novell.com -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Next, ghostview. I took an example file, like
http://www.suse.de/~mfabian/suse-cjk/vertical-orizontal-test.ps
I verified that I can open this in my old SUSE8.2 and see all characters correctly. Next, I open it with gs as normal user in 9.3, from bash. The result are Mojibake and the messages: --- gs vertical-horizontal-test.ps ESP Ghostscript 8.15 (2004-09-22) Copyright (C) 2004 artofcode LLC, Benicia, CA. All rights reserved. This software comes with NO WARRANTY: see the file COPYING for details. Scanning /usr/X11R6/lib/X11/fonts/ for fonts... 12 files, 12 scanned, 0 new fonts. Scanning /usr/share/fonts/ for fonts... 2 files, 2 scanned, 0 new fonts. Can't find (or can't open) font file
/home/hisha/Resource/Font/Ryumin-Light-UniJIS-UTF8-V.
Can't find (or can't open) font file Ryumin-Light-UniJIS-UTF8-V.
'/home/hisha' is weird!
I found that the problem is caused by the environment variable GS_LIB. Apparently KDE sets it to
GS_LIB=/home/hisha/.fonts
If you unset this variable, ghostscript works again.
Therefore the problem doesn't happen if you don't use KDE and it also disappears after 'su -' because then you do not have GS_LIB in the environment anymore.
As a temporary workaround, you can add
unset GS_LIB
to your ~/.profile.
I'll check now out why KDE sets this environment variable.
I reported that as bug #91584 against KDE at
Yahari, that was the clincher. I guess that this already does it for all requirements. Thank you so much! Teached me a lesson: Always know your environment variables :) Hisha __________________________________ Save the earth http://pr.mail.yahoo.co.jp/ondanka/
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
As a temporary workaround, you can add
unset GS_LIB
to your ~/.profile.
I'll check now out why KDE sets this environment variable.
I reported that as bug #91584 against KDE at
Yahari, that was the clincher. I guess that this already does it for all requirements. Thank you so much! Teached me a lesson: Always know your environment variables :)
Well, I don't think this is your fault. There is a bug somewhere, probably in KDE and maybe in Ghostscript as well. KDE should probably not set that variable. And even if it is set to GS_LIB=/home/hisha/.fonts, I think Ghostscript should still work, there seems to be a bug in Ghostscript as well. -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Mike FABIAN <mfabian@suse.de> さんは書きました:
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
As a temporary workaround, you can add
unset GS_LIB
to your ~/.profile.
I'll check now out why KDE sets this environment variable.
I reported that as bug #91584 against KDE at
Yahari, that was the clincher. I guess that this already does it for all requirements. Thank you so much! Teached me a lesson: Always know your environment variables :)
Well, I don't think this is your fault. There is a bug somewhere, probably in KDE and maybe in Ghostscript as well. KDE should probably not set that variable. And even if it is set to GS_LIB=/home/hisha/.fonts, I think Ghostscript should still work, there seems to be a bug in Ghostscript as well.
Werner Fink fixed the bug in Ghostscript. Updated ghostscript packages are available in ftp://ftp.suse.com/pub/projects/m17n/9.3/ With these packages, Ghostscript works for Japanese even if the environment variable GS_LIB is set: * Tue Jun 21 2005 - werner@suse.de - Do not check for the first directory in LIBPATH for Resources but for the first occurance of CMap (bug #91584) -- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
--- Mike FABIAN <mfabian@suse.de> からのメッセージ:
Mike FABIAN <mfabian@suse.de> さんは書きました:
hisha <dmtaisaku@yahoo.co.jp> さんは書きました:
As a temporary workaround, you can add
unset GS_LIB
to your ~/.profile.
I'll check now out why KDE sets this environment variable.
I reported that as bug #91584 against KDE at
Yahari, that was the clincher. I guess that this already does it for all requirements. Thank you so much! Teached me a lesson: Always know your environment variables :)
Well, I don't think this is your fault. There is a bug somewhere, probably in KDE and maybe in Ghostscript as well. KDE should probably not set that variable. And even if it is set to GS_LIB=/home/hisha/.fonts, I think Ghostscript should still work, there seems to be a bug in Ghostscript as well.
Werner Fink fixed the bug in Ghostscript.
Updated ghostscript packages are available in
ftp://ftp.suse.com/pub/projects/m17n/9.3/
With these packages, Ghostscript works for Japanese even if the environment variable GS_LIB is set:
* Tue Jun 21 2005 - werner@suse.de
- Do not check for the first directory in LIBPATH for Resources but for the first occurance of CMap (bug #91584)
-- Mike FABIAN <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Yes, it works! Just rpm -Uvh and then SuSEconfig. Thank you again so much. Hisha __________________________________ Save the earth http://pr.mail.yahoo.co.jp/ondanka/
participants (2)
-
hisha
-
Mike FABIAN