When trying to type set Chinese text with cjk-latex, the tex file compiles fine, but xdvi and dvips has trouble dealing with the document if the font is set to anything other than 10pt. And even with 10pt font, the output document has the Chinese characters only half the size of the English letters. I found the following: 1. The reason that mktexpk fails is because that a) The ttf fonts were not installed b) The hbf fonts were installed poorly, since the installation only provides the hbf fonts, but not the config files required to run hbf2gf, mktexpk cannot generated dynamically the required bitmaps. c) However, the hbf fonts and config files are both included in the cjk-latex-fonts tarball downloaded. So the ebuild initially generates the pk fonts at only 500dpi (which corresponds to latex's 10pt size font). The 500dpi fonts get installed, and because of their presence, kpathsea finds no need to try to regenerate the fonts, so the 10pt font would work. For other sizes, the 600dpi corresponding to the 12pt and 720dpi corresponding to the 14.4pt fonts were not present, and when kpathsea calls mktexpk to generate the fonts, it finds that i) the fonts were not generated from type1/postscript fonts ii) that ttf fonts are not available, and iii) hbf2gf is missing a config file. And it quits. 2. An attempt to install truetype fonts to the system reveals that ttf2tfm, ttf2pk, and its family of tools were not installed properly. ttf2pk should come with a selection of subfont definitions for the CJK encodings in the form of Big5.sfd, GB.sfd, UBig5.sfd, etc... The bug would've been minor with the sfd files included, or the config files mentioned in 1b) installed. In that case, it is possible to manually generate all the fonts at the required resolutions by hbf2gf and/or ttf2tfm + ttf2pk. But the lack of those files made the solution dependent on the location of several not-so-easy to find files. 3. Perhaps should try to provide truetype instead of hbf fonts initially. Reproducible: Always Steps to Reproduce: 1. install tetex, cjk-latex 2. create test file like the following: test.tex ------------------- \documentclass[12pt]{article} \usepackage{CJK} \begin{document} \begin{CJK}{Bg5}{kai} <insert some chinese text here> \end{CJK} \end{document} ---------------------------- 3. run latex test 4. run xdvi test Actual Results: xdvi spat out > kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+120/600 --dpi 720 +b5kai10 > mktexpk: don't know how to create bitmap font for b5kai10. > kpathsea: Appending font creation commands to missfont.log. > dvips: Font b5kai10 not found, using cmr10 instead. > dvips: Checksum mismatch in font b5kai10 > kpathsea: Running mktexpk --mfmode ljfour --bdpi 600 --mag 1+120/600 --dpi 720 +b5kai13 > mktexpk: don't know how to create bitmap font for b5kai13. > dvips: Font b5kai13 not found, using cmr10 instead. > dvips: Checksum mismatch in font b5kai13 substituted some radom characters from computer modern for the chinese characters, and dies. Expected Results: shown an xdvi preview window with the chinese characters specified in test.tex printed. tetex 2.0.2-r4 cjk-latex 4.5.2
Thanks for the helpful comment. Could you provide (an) ebuild(s) to fix the problem(s)? (I don't have much time to look at it atm, sorry)
*** Bug 48194 has been marked as a duplicate of this bug. ***
I will take a look at this, usata-san.
Go to http://www.magiclinux.org/cgi-bin/viewcvs.cgi download latest chinese portage, then emerge gbkfonts-linux, which help you setup all chinese latex environment automatically. cjk-lyx crashed at the beginning of init, i do not know why, all i can do is rm ~/.lyx and start it. Chinese Gentoo Linux site http://gentoo.linuxsir.org
Jackey, I said I'll look into and add your ebuild this weekend, but after I read it I thought it'll take longer than I expected (I'd like to find smarter way to handle fonts installation in that ebuild). Sorry for that.
Mamoru, i do not quite get what are you talking about. Are you talking about cjk-lyx ebuild or gbkfonts-linux ebuild. If you are talking about gbkfonts-linux, just forget about it and don't even bother to add into portage. Because it is not an "qualified" ebuild at all (just a hack *^_^*,but works though). My point is that you may be able to use the binary gbkfonts-linux program to deal with Janpanese or Korean TTF fonts. If that is the case, then we can put this on our table and create an ebuild for all of us. BTW, cjk-lyx does crash after first launch, i do not know why, cjk-lyx debug is not very helpful neither, but i do know there is something related to TTF fonts. This very strange, it only happens on Gentoo, I built it on Magic Linux(RPM based Linux), there is nothing wrong. Anyway, thx for your reply so quickly. Let us keep communication like this, so we can build a better cjk solution.
I was talking about gbkfonts-linux package you created. I left cjk-lyx (and cjk-latex) to jmglov, but I'll fix cjk-latex (not cjk-lyx) if someone has a patch to fix it. I will not add cjk-lyx even if someone qualifies that the ebuild works (or has a patch to get it work), just because I cannot afford fixing bugs related to cjk-lyx (lyx itself has three open bugs). If there is somebody in cjk or text-markup herd interested in adding it, feel free to do so.
So... is there any temporary solution that can help typeset CJK in any size other than 10pt, until the new ebuilds are ready?
Dan, Answer is Yes or No, I can make sure that Simplifed Chinese with GBK encoding is fine, but I can not tell that Japanese and Korean are fine. From my personal experience, it should be fine. I am trying to rebuild an overlay portage like www.gentoo.de, so people can use gentoo-dev-kits to emerge the customized portage for Chinese users. But I had to make living first, hope I can have enough spare time to work on this project.
Re-assigning the bug, the assignee has retired.
This bug is caused by the missing of hbf2gf config file and the path of MISCFONTS in texmf/web2c/texmf.cnf is not include texmf/fonts/hbf, so mktexpk can't create pk fonts for b2ka12. But I don't think it is a good idea to modify texmf/web2c/texmf.cnf, so I make texmf/font/misc, which is included in MISCFONTS's path, a symbol link to texmf/font/hbf. Do this will make the 'mktexpk: don't know how to create bitmap font for b5kai10.' problem to be resolved, but the characters is poorly displayed because the font kai is bitmap font. Install other CJK Type1 fonts from CTAN will be a good idea, I'll try to do it.
Created attachment 68629 [details] cjk-latex-4.6.0.ebuild This is the modified ebuild.
Created attachment 68716 [details] cjk-latex-4.5.2.ebuild Don't use symbol link, directly install hbf fonts into texmf/fonts/misc for hbf2gf looking hbf fonts in this dir.
should be fixed with 4.7.0