How can I print Japanes text from mail, webbrowser etc? What I did so far: 1. I have a HP 1200 PS printer with non japanese fonts but who understands HPLjet4. 2. I added a printer queue with LJET4 as printer driver (CUSP menue in YAST2) 3. The printer works and prints fine. 4. I can translate ps-file with gs-command to ljet4-print files and averythings works fine (also the printer prints japanese e.g. if I tex the Wadalab-test file and translate the dvi -> ps -> ljet4 it works ( I use the command gs -sDEVICE=ljet4 -sOutfile.ljet infile.ps) 5. But if I try to print with the print-command from inside applications (e.g. Morzilla) I don't get Japanese output. What do I wrong? -- Mit freundlichen Grüßen / Best regards Ulrich Groh
Am Sonntag, 5. Mai 2002 19:18 schrieb Ulrich Groh:
5. But if I try to print with the print-command from inside applications (e.g. Morzilla) I don't get Japanese output.
I can really recommend the use of KDE 3.0 and Konqueror! As I posted earlier, Qt 3.0 can embed TTF fonts in PS files, so printing of CJK documents (e.g. a webpage) is no problem anymore. Arne -- "The identical is equal to itself, since it is different." -- Franco Spisani [--- PGP key available on http://www.root42.de/ ---]
Am Sonntag, 5. Mai 2002 19:24 schrieb Arne Schmitz:
Thats what I have: SUSE 8.0 with KDE3. But no success with Konqueror. Do I have to add more fonts? I think I have all (including Ghost with japanese support). -- Mit freundlichen Grüßen / Best regards Ulrich Groh
ugroh@t-online.de (Ulrich Groh) writes:
If you use TTF fonts with Konqueror, you don't need Japanese fonts for Ghostscript because, as Arne writes, Konqueror embeds the fonts in the PS files, similar like CJK-LaTeX does. But in order to do that, you need to use scalable fonts (TTF or Type1) with Konqueror, it won't work if you use bitmap fonts for Japanese. Please have a look at http://www.suse.de/~mfabian/suse-cjk/kde-font-setup.html choose some scalable western fonts you like in the font setup of Konqueror and use qtconfig to add Japanese TrueType fonts (for example 'Kochi Mincho' or 'Kochi Gothic') as substitutes for these fonts. You can also directly select Japanese TrueType fonts like 'Kochi Mincho' in Konqueror, but that is not so nice if you also want to view German pages, many Japanese TrueType fonts lack German umlauts and most Japanese TrueType fonts are not so beautiful in the latin part as scalable fonts which are specialized on latin scripts. So it is better to choose latin fonts in Konqueror and set Japanese fonts as substitutes with qtconfig. Remember that you *must* use scalable fonts if you want Qt3 to embed the fonts into the PostScript output! If you use bitmap fonts, Qt3 will put references to Japanese PostScript fonts into the PostScript output. To print such PostScript without embedded fonts, you need Japanese fonts for Ghostscript. I guess your are currently using bitmap fonts for Japanese in KDE. With your current settings, if you print to a file with Konqueror instead directly to a printer and then call 'gs' on the created file, you will probably find that Ghostscript wants to load the Japanese font Ryumin-Light. This happens if you use Japanese bitmap fonts in Konqueror. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Is there some way to *edit* a latex file (using xemacs?) containing both German umlauts etc. (directly, that is, using \usepackage[latin1]{inputenc} and seeing them as they are usually written, not as "a etc.) and Japanese characters at the same time? Is there some other editor for linux that can do this? I would prefer xemacs, but if it does not work for some reason, we will settle for another one. Related: Which latex (CJK?) do I need to correctly process the thus created file? Is it possible at all? How should the file be encoded? Background: I am trying to make someone switch from msword to latex for writing her thesis in German language, the topic being related to Japanese characters. Forcing this person to write "a instead of the corresponding umlaut on her keyboard will make this switch more difficult. Best regards, Wolfgang Wolfgang SLANY
Wolfgang Slany <wsi@dbai.tuwien.ac.at> writes:
I suggest to use UTF-8 for this purpose[1]. I'll explain in the next mail how to use UTF-8 for German and Japanese in LaTeX. In this mail, first some remarks about editors you can use to edit UTF-8 encoded files on SuSE Linux: Yes, you can use XEmacs for that purpose. To do that, you need to install the extension package mule-ucs-xemacs.rpm[2]. Then add (if (locate-library "un-define") (require 'un-define)) to your ~/.xemacs/init.el[3]. To specify UTF-8 encoding while loading a file into XEmacs use: C-x RET c utf-8 RET C-x C-f filename RET (With XEmacs you can also use 'C-u C-x C-f filename RET', but not with Emacs). If you don't want to type that all the time when loading the file, add a coding system cookie to the first line of the file: -*- coding: utf-8 -*-
- GNU Emacs (needs mule-ucs.rpm). - Vim - yudit - mined - kedit (and other KDE editors)[4] - probably there are others ... Footnotes: [1] There are other possibilities to use CJK-LaTeX with with German and Japanese both written directly into the text, see the documentation of cjk-enc.el: /usr/share/doc/packages/cjk-latex/doc/cjk-enc.doc (contained in cjk-latex.rpm). But if you use cjk-enc.el, you will have your files encoded in an (X)Emacs specific mule encoding, which is much less portable than UTF-8, for example you cannot edit your text with other editors anymore if you use mule encoding. Using UTF-8 is probably a much better idea. [2] the updated XEmacs in ftp://ftp.suse.com/pub/people/mfabian/8.0-i386/ already contain Mule-UCS, you don't need to install mule-ucs-xemacs anymore if you are using these updated XEmacs packages. In that case it is sufficient to have (if (locate-library "un-define") (require 'un-define)) in your ~/.xemacs/init.el. [3] if you are using the default ~/.xemacs/init.el on SuSE Linux 8.0, you already have that. [4] if you want to edit UTF-8 encoded files with kedit, you have to start it with LC_CTYPE set to an UTF-8 locale, e.g. LC_CTYPE=ja_JP.UTF-8 kedit there is no option to select the encoding in kedit, you can only select the encoding via LC_CTYPE when starting kedit. This is probably true for the other KDE editors as well. Vim defaults to UTF-8 if you start it in an UTF-8 locale, but you do not absolutely have to use an UTF-8 locale to edit UTF-8 encoded files with Vim (see the Vim documentation). -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Thank you very much, this sounds great. My first step will be to update my system to Suse 8.0 (german dvd). I guess I must download the newest CJK from your page as you indicated in one of your latest posts to some else that CJK is only included in the international version. Should I also install Xemacs from your site or is the version on the dvd sufficient? Anything else? Best regards, Wolfgang
Wolfgang Slany <wsi@dbai.tuwien.ac.at> writes:
Yes. It's a rather small download, you only really need the main package cjk-latex.rpm, all other cjk-latex-*.rpm packages are optional, rarely used fonts. Probably it is best to use the fonts from ttf-kochi-mincho.rpm and ttf-kochi-gothic.rpm which are already available on the German CDs/DVD.
Should I also install Xemacs from your site or is the version on the dvd sufficient?
The version on the CD is 21.4.4 and is sufficient for editing UTF-8 with the extra package mule-ucs-xemacs (which is available on the German CDs/DVD). XEmacs 21.4.6, which is available in ftp://ftp.suse.com/pub/people/mfabian/8.0-i386/, contains various bugfixes, I don't know how important these are for you. One of the bugfixes is that the ASCII to PostScript conversion built into XEmacs works for CJK now, i.e. you can use 'M-x ps-print-buffer' or 'M-x ps-print-buffer-with-faces' from within XEmacs without having to use external tools to convert to PostScript (i.e. you don't need a2ps.pl then). And mule-ucs-xemacs has been moved into the main xemacs.rpm, i.e. you don't need to install an extra package for UTF-8 support anymore if you use the updated XEmacs packages.
Anything else?
I have built an additional package for LaTeX to enable the use of UTF-8 as input encoding for German. Together with CJK-LaTeX it does enables you to use German and Japanese directly in LaTeX, i.e you can directly write ö and don't need to write "o. I am currently testing it. Looks good, and I have already uploaded the new package to ftp://ftp.suse.com/pub/people/mfabian/8.0-noarch/latex-ucs-20020510-0.noarch.rpm After some more testing, I'll announce it on <m17n@suse.de>. Probably in an hour from now. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
On Fri, 10 May 2002, Mike Fabian wrote:
It works as described. Only one thing was missing, namely the tfm files for these fonts (they seem not to be on the DVD). However, I found your explanation on http://lists.suse.com/archive/m17n/2001-Nov/0034.html and accordingly did # rpm -i ftp://ftp.suse.com/pub/people/mfabian/7.2-i386/cjk-latex-tfm-kochi-mincho-4.4.0_20010731-0.i386.rpm # rpm -i ftp://ftp.suse.com/pub/people/mfabian/7.2-i386/cjk-latex-tfm-kochi-gothic-4.4.0_20010731-0.i386.rpm For the record, the error I encountered was something along these lines: ] kpathsea: Running mktextfm kochimin-uni4e ] mktextfm: Running mf \mode:=ljfour; mag:=1; nonstopmode; input kochimin-uni4e ] This is METAFONT, Version 2.7182 (Web2C 7.3.7) ] ] kpathsea: Running mktexmf kochimin-uni4e ] ! I can't find file `kochimin-uni4e'. ] <*> ...; mag:=1; nonstopmode; input kochimin-uni4e ] ] Please type another input file name ] ! Emergency stop. ] <*> ...; mag:=1; nonstopmode; input kochimin-uni4e ] ] Transcript written on mfput.log. ] mktextfm: `mf \mode:=ljfour; mag:=1; nonstopmode; input kochimin-uni4e' failed. ] kpathsea: Appending font creation commands to missfont.log. ] ] ! Font C70/komi/m/n/12/4e=kochimin-uni4e at 12.0pt not loadable: Metric (TFM) file not found. Now xemacs and latex work and print fine mixed Japanese-German UTF8 encoded cjk latex documents. Thank you very much and best regards, Wolfgang -- Wolfgang SLANY mailto:wsi@dbai.tuwien.ac.at
Wolfgang Slany <wsi@dbai.tuwien.ac.at> writes:
On Fri, 10 May 2002, Mike Fabian wrote:
[...]
You don't need these packages with the .tfm files anymore, the .tfm files are automatically created by SuSEconfig since SuSE Linux 8.0. See also /usr/share/doc/packages/cjk-latex/README.SuSE. Sorry for not documenting that good enough.
For the record, the error I encountered was something along these lines:
[...]
] ! Font C70/komi/m/n/12/4e=kochimin-uni4e at 12.0pt not loadable: Metric (TFM) file not found.
Probably you didn't run SuSEconfig after installing cjk-latex.rpm. You can remove the packages with the .tfm files again and run SuSEconfig or just SuSEconfig --module cjk-latex this will generate .tfm files for all installed TrueType fonts which have corresponding entries in /etc/ttf2pk/ttfonts.map. Such entries already exist for all CJK TrueType fonts available as SuSE Linux packages. If you don't remove the packages with the .tfm files, you will have the .tfm files twice in different directories as soon as you run SuSEconfig. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
On Mon, 3 Jun 2002, Mike Fabian wrote:
Just removed them and executed SuSEconfig, and it still works. Thank you very much again and best regards, Wolfgang -- Wolfgang SLANY mailto:wsi@dbai.tuwien.ac.at
For friends of KDE: The KDE3 successor of KTeXmaker - now named Kile -, a rather comprehensive and comfortable LaTeX editor from http://xm1.net.free.fr/kile works very well with both umlaut characters and Chinese characters mixed using utf-8 encoding. Start with LC_CTYPE=zh_CN.UTF-8 kile The sources from the above given address are translated without any problems even on a SuSE 8.0 personal edition. Friedrich Am Freitag, 10. Mai 2002 15:45 schrieb Mike Fabian:
-- Friedrich Dimmling Berlin, Germany
Wolfgang Slany <wsi@dbai.tuwien.ac.at> writes:
[...] The above is possible with CJK-LaTeX and the "Unicode support for LaTeX" extension by Dominique Unruh <dominique@unruh.de>: http://www.unruh.de/DniQ/latex/unicode/ which is available as SuSE Linux package here: ftp://ftp.suse.com/pub/people/mfabian/8.0-noarch/latex-ucs-20020510-0.noarch.rpm Attached is an example file which demonstrates how this can be used. Basically you just have to replace \usepackage[latin1]{inputenc} by: \usepackage{ucs} \usepackage[utf8]{inputenc} Then you can type ä instead of "a etc. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
Mike, I tried as described with various results: 1. Inside qtconfig I have Hevetica as my default font -> everything looks fine but I cannot print Japanese characters. 2. Under "Font substitution" I have Helvetica as my selected font an I add Kochi Mincho for Japanese characters. 3. Now I start Konquerror. But instead of seeing Helvetica the programm is using something different which has no ü, ä etc and looks ugly. What is wrong with this way? 4. If do the same with Ninbus Sans [Xft] I got the same result. Maybe I understand something wrong. But it doesn't worked as described. By the way: Is there a front end for the m17n-forum which makes it easier ti answer the posted informations (like newsgroup)? Thanks. Ulrich
ugroh@t-online.de (Ulrich Groh) writes:
By the way: Is there a front end for the m17n-forum which makes it easier ti answer the posted informations (like newsgroup)?
I don't think there is a newgroup yet. There is an archive at http://lists.suse.com/archive/m17n/ which can be searched with Google by entering something like following in the search field at Google : site:lists.suse.com m17n keyword(s) and there is another, searchable archive at: http://marc.theaimsgroup.com/?l=m17n&r=1&w=2 -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
ugroh@t-online.de (Ulrich Groh) writes:
1. Inside qtconfig I have Hevetica as my default font -> everything looks fine but I cannot print Japanese characters.
2. Under "Font substitution" I have Helvetica as my selected font an I add Kochi Mincho for Japanese characters.
3. Now I start Konquerror. But instead of seeing Helvetica the programm is using something different which has no �, � etc and looks ugly.
Am I right to assume you are talking about the display on screen here and not yet about printing?
What is wrong with this way?
You did remember to choose the font where you defined substitions for with qtconfig also for Konqueror in the Konqueror font settings? You must choose a suitable font in the font setup of Konqueror.
4. If do the same with Ninbus Sans [Xft] I got the same result.
Maybe I understand something wrong. But it doesn't worked as described.
To help me find out what went wrong on your system, can you send me please ~/.qt/qtrc ~/.kde/share/config/konquerorrc ~/.kde/share/config/kdeglobals /usr/X11R6/lib/X11/fonts/truetype/XftCache and the standard output of XFT_DEBUG=16 konqueror in private mail? If the problem is only with printing, please print from Konqueror into a PostScript file instead of directly to the printer, call gs print.ps and have a look at the standard output of this command to see which fonts are reported as missing. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
ugroh@t-online.de (Ulrich Groh) writes:
The Wadalab-test file is a CJK-LaTeX file. CJK-LaTeX embeds Japanese fonts into the PostScript output, i.e. it doesn't matter whether your Ghostscript has Japanese fonts.
5. But if I try to print with the print-command from inside applications (e.g. Morzilla) I don't get Japanese output.
For that you need Japanese fonts for Ghostscript. You write in your next mail that you have Japanese fonts for Ghostscript, but the description of you problem sound like Japanese fonts for Ghostcript are missing. Please check - is the 'ghostscript-fonts-kanji' package installed? (check with 'rpm -q ghostscript-fonts-kanji') - when printing from Mozilla, print to a file first and not directly to the printer. Then call 'gs' on the created file and check the standard output of 'gs'. Does 'gs' complain about missing fonts? Don't use gv for this test, it hides the output which shows you which fonts are loaded. -- Mike Fabian <mfabian@suse.de> http://www.suse.de/~mfabian 睡眠不足はいい仕事の敵だ。
participants (5)
-
Arne Schmitz
-
Friedrich Dimmling
-
Mike Fabian
-
ugroh@t-online.de
-
Wolfgang Slany