Eric Germaneau wrote:

Does someone know how to use Chinese caracter in a lyx document (so in Latex as well ....).

If you only need a few Chinese characters, rather than an entire document's worth, you can use conventional LyX (rather than LyX-CJK and a CJK version of LaTeX). Here's what I've done to insert a single Japanese kanji into a conventional LyX document:

1. Install the LaTeX "cjk" and "cjk-fonts" packages, if you don't have them already. (I use MiTeX on Windows, so I can't give you any advice for doing this for Slackware.)

2. In the preamble, include the CJK package with \usepackage{cjk}. See the cjk package's documentation (installed with the package) for information on options; I'm not setting any in my documents, but you may want some.

3. Where you need a Chinese, Japanese, or Korean character, insert ERT with the appropriate CJK macro. Here again you'll have to consult the cjk package documentation to find out how to enter Chinese in the encoding of your choice. The CJK package allows you to enter characters directly in various encodings, or as their hex equivalent, which is useful if you want to keep the document pure ASCII (eg so you can edit it in other editors). For my single Japanese kanji, I took the latter route:

   \begin{CJK}{JIS}{song} \CJKchar{"3B}{"52} \end{CJK}.

That inserts the character corresponding to JIS codepoint 3B52 at that point in the document. It's a real character in an appropriate font, so it scales with the rest of the text and so forth.

This works well for DVI and PDF, in my tests.

I'd like to thank several people on the list who offered advice when I asked how to do this a while back, by the way, particularly Helge Hafting, who pointed me down this path.

--
Michael Wojcik

Reply via email to