lyx-cjk, dvi viewers and ps viewers
Hi! I am a new subscriber of this mailist list. I hope to have enjoyable chats with others in the list. First of all, I would like to raise some issues on lyx-cjk. I could not export my lyx file to .ps .pdf at all. It sounds funny, but I tell you my situation in a lengthy explanation. I use suse8.0. And, I followed the guideline SuSE-CJK from Dr. M. Fabian for installing some stuffs for Korean. I made a user account in my machine for specially using Korean applications in order not to disturb other users' inintial setting ( I share this SuSe machine with others whose knowledge on linux is virtually empty, so as root and as a user I use this trick) . So, normally I follow this process for login: 1. login to the use name: Hangul 2. type its password ( My machine starts with KDM in the graphical mode.) 3. In the X-windows system, I return to the text mode with root privilege with this command: /etc/init.d/xdm stop 4. In the text mode, I relogin to Hangul 5. Start X windows again, like LANG=ko_KR.eucKR startx windowmaker 6. An xim, ami comes up automatically ( because, I set it before following Dr. Fabian's guidebook.) 7. I open 'Hanterm', and start lyx-cjk in hanterm. I can write Korean in lyx-cjk with ami, and see the multi-lingual documents - Korean is included, but not Japanese, nor Chinese. Because, I use Hlatex for Korean. I can see the result of my writing through xdvi. ^^^^^^^ But, I cannot see it in Kdvi! ^^^^^^ ^^^^^^^ I cannot see some Korean fonts in gv, Kghostview, acroread at all! ^^^^^^^ To sum up, in my writing of an English document where I should introduce Korean and some other European symbols, Kdvi, gv, Kghostview, acroread could not interpret Korean fonts. Only Xdvi does this job. Personally, I guess that my setting for Korean seem to have problems, but I don't know where I could start solving them. Best Wishes Jong-Hwa
"Shin, Jong-Hwa" <jong-hwa.shin@iue.it> writes:
I made a user account in my machine for specially using Korean applications in order not to disturb other users' inintial setting (I share this SuSe machine with others whose knowledge on linux is virtually empty, so as root and as a user I use this trick) .
So, normally I follow this process for login: 1. login to the use name: Hangul 2. type its password ( My machine starts with KDM in the graphical mode.)/var/lib/canna/default.canna 3. In the X-windows system, I return to the text mode with root privilege with this command: /etc/init.d/xdm stop 4. In the text mode, I relogin to Hangul 5. Start X windows again, like LANG=ko_KR.eucKR startx windowmaker 6. An xim, ami comes up automatically
That's more complicated than necessary. Just put export LANG=ko_KR.eucKR into ~/.profile in the home directory of the user 'hangul'. Then login using KDM as the user 'hangul' (if you want windowmaker you can choose it in the KDM menu before logging in). The XIM server Ami will start automatically for the user 'hangul' because this user now has LANG=ko_KR.eucKR as the default. The other users still have the system default locale (unless they changed it in their ~/.profile). Stopping KDM and then using LANG=ko_KR.eucKR startx windowmaker achieves the same of course, but appears to be a bit complicated. If the user 'hangul' always want's to use LANG=ko_KR.eucKR, you can just as well write it into ~/.profile and use KDM to login. Because I switch locales very often for testing purposes, I write neither LANG nor any LC_ variables in ~/.profile, and usually start my X-session with LANG=something startx some-window-manager But I do that mainly to avoid having to edit ~/.profile each time I want to change locales. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
"Shin, Jong-Hwa" <jong-hwa.shin@iue.it> さんは書きました:
I could not export my lyx file to .ps .pdf at all.
[...]
7. I open 'Hanterm', and start lyx-cjk in hanterm.
I can write Korean in lyx-cjk with ami, and see the multi-lingual documents - Korean is included, but not Japanese, nor Chinese. Because, I use Hlatex for Korean. I can see the result of my writing through xdvi. ^^^^^^^ But, I cannot see it in Kdvi! ^^^^^^ ^^^^^^^ I cannot see some Korean fonts in gv, Kghostview, acroread at all! ^^^^^^^
To sum up, in my writing of an English document where I should introduce Korean and some other European symbols, Kdvi, gv, Kghostview, acroread could not interpret Korean fonts. Only Xdvi does this job.
It seems to work fine for me with the sample file: /usr/share/doc/packages/cjk-lyx/example-korean-HLaTeX.lyx But I found that 'gsftopk' fails for some of the fonts used by HLaTeX: mfabian@gregory:~$ gsftopk umj26 300 gsftopk(k) version 1.19.2/705 [0gs: Error: /undefined in Q gs: Operand stack: gs: false --dict:9/20(L)-- --dict:9/20(L)-- Private --dict:14/20(L)-- --dict:9/20(L)-- CharStrings --dict:253/257(L)-- kfd (\021\214\255\347\2627\)\223\351Ue3\024\253\317Y+\211c"\262\025\264.\240^kFm%\347^\210\316>\366\377B\016@\223\275\270\302\340\023\354b\024\003V<\271?\342\036\001\376E\233\327\211dX\357\362\237\017\305&\204\nX\227D\314\325{\002\216|\020\371\031\235\367\341\201\310\245\250\200\031\004\225\266\267q\023l\340\23709\217@|\020\305\273\372\320\232t\001\230p\022#q\335\3072\251\200\323$\023kHg\265\376q\224\271~\034\357\b\305\341\363*\316>vL\373l\372f[\257\(\)\304\0000\307\355\325\006\374\346\033\364\360\205\214j\241\344zq\364I\300 "j\326\026T73&\312\335\223:\032B\361\342s\314\020j\340...) gs: Execution stack: gs: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1 3 %oparray_pop 1 3 %oparray_pop 1 3 %oparray_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- 3 3 %oparray_pop --nostringval-- --nostringval-- --nostringval-- --nostringval-- gs: Dictionary stack: gs: --dict:1057/1417(ro)(G)-- --dict:0/20(G)-- --dict:92/200(L)-- --dict:1057/1417(ro)(G)-- --dict:14/20(L)-- --dict:253/257(L)-- gs: Current allocation mode is local ESP Ghostscript 7.05.3: Unrecoverable error, exit code 1 Premature end of file mfabian@gregory:~$ file /usr/share/texmf/fonts/type1/uhc/myoungjo/umj26.pfb /usr/share/texmf/fonts/type1/uhc/myoungjo/umj26.pfb: PostScript Type 1 font program data mfabian@gregory:~$ For other fonts it works, for example 'gsftopk umj27 300' works. The problem that gsftopk doesn't work for some of the Korean .pfb files explains why it works in xdvi but doesn't work in kdvi. xdvi can use the .pfb files directly but kdvi needs .pk files which need to be created by gsftopk. I.e. if gsftopk fails for some fonts, some characters may be missing in kdvi. I could not yet solve this problem, therefore I can only suggest to use xdvi instead of kdvi for the moment. But it doesn't explain why you have problems with gv and Kghostview and acroread. That is a different problem: gv and Kghostview use the .ps file created by dvips. To include the correct .pfb files into the .ps file, dvips uses the information from /var/lib/texmf/dvips/config/psfonts.map acroread uses the pdf files created by pdflatex and pdflatex uses the information from /var/lib/texmf/dvips/config/pdftex.map to include the correct .pfb files into the .ps file. I guess something went wrong when generating the information for the Korean .pfb files into psfonts.map and pdftex.map. For example, if I grep for 'umj26' in psfonts.map and pdftex.map, I see some entries on my machine: mfabian@gregory:~$ grep umj26 /var/lib/texmf/dvips/config/psfonts.map umj26 Umj26 <umj26.pfb umjc26 Umj26 " .75 ExtendFont " <umj26.pfb umjco26 Umj26 " .167 SlantFont .75 ExtendFont " <umj26.pfb umjo26 Umj26 " .167 SlantFont " <umj26.pfb umju26 Umj26 " 2.0 ExtendFont " <umj26.pfb umjuo26 Umj26 " .167 SlantFont 2.0 ExtendFont " <umj26.pfb umjx26 Umj26 " 1.25 ExtendFont " <umj26.pfb umjxo26 Umj26 " .167 SlantFont 1.25 ExtendFont " <umj26.pfb You have new mail in /var/mail/mfabian mfabian@gregory:~$ grep umj26 /var/lib/texmf/dvips/config/pdftex.map umj26 Umj26 <umj26.pfb umjc26 Umj26 " .75 ExtendFont " <umj26.pfb umjco26 Umj26 " .167 SlantFont .75 ExtendFont " <umj26.pfb umjo26 Umj26 " .167 SlantFont " <umj26.pfb umju26 Umj26 " 2.0 ExtendFont " <umj26.pfb umjuo26 Umj26 " .167 SlantFont 2.0 ExtendFont " <umj26.pfb umjx26 Umj26 " 1.25 ExtendFont " <umj26.pfb umjxo26 Umj26 " .167 SlantFont 1.25 ExtendFont " <umj26.pfb mfabian@gregory:~$ I guess you will get nothing when trying these commands. If you get no output here, the most likely reason is that HLaTeX got installed first and other TeX related packages like tetex got installed later. On SuSE Linux 8.0, the entries in these .map files were created by a post-install script of HLaTeX, which needed many other tetex related packages to run. Therefore this failed if tetex was installed after HLaTeX. And this may happen accidentally if you install with YaST2, because YaST2 may install them in the wrong order. And it happens also if you update tetex later because an update of tetex will overwrite psfonts.map and pdftex.map again with the original versions, without the information about the Korean fonts. One possible workaround is to reinstall HLaTeX: rpm -e HLaTeX then install it again. During the reinstallation of HLaTeX, the post-install script should have worked correctly and you should now have the above entries in psfonts.map and pdftex.map. But this is only an ugly workaround, because you have to reinstall HLaTeX always after an update of tetex. I believe I fixed this problem in SuSE Linux 8.1 by moving the code from the post-install script of HLaTeX into /sbin/conf.d/SuSEconfig.tetex That way, psfonts.map and pdftex.map will always be updated correctly after updating any TeX related packages. I attach the script /sbin/conf.d/SuSEconfig.tetex from SuSE Linux 8.1 to this mail, it should work on SuSE Linux 8.0 as well. Just copy it to /sbin/conf.d/SuSEconfig.tetex and run SuSEconfig --module tetex and try to use dvips and pdflatex again. Now it should work. In case it still doesn't work after trying the above suggestions, can you please send me a short example file where this problem occurs? -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
participants (2)
-
Mike Fabian
-
Shin, Jong-Hwa