TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wanted to make some flashcards for learning japanese. I've found the flashcard class and some japanese output package (ucs, CJK). But they don't seem to work together. I've coded the following as an example:





1) student

The *.pdf file was build without any errors by pdflatex, but the *.pdf itself doesn't contain any of the japanese character.

Does anyone know how I could fix this, or does perhaps anyone know packages or classes which are more adequate here?

share|improve this question
up vote 4 down vote accepted

If you're using XeLaTeX, you should be using the xeCJK package instead of CJK. The code is then much simpler:


\setCJKmainfont{Hiragino Kaku Gothic Pro}
\setmainfont{Myriad Pro}      % set your favorite Latin-based font here



1) student
share|improve this answer
I've chanded \setmainfont to \setromanfont, now it workes to my full satisfaction! – beyeran Jan 26 '11 at 19:09

Your example works for me, so I suspect the issue is with the cyberbit font rather than ucs or CJK. Have you set up the cyberbit font for use with LaTeX? Instructions for doing so can be found here.

Alternatively, get the wadalab fonts, and use maru, min or goth instead of cyberbit.

share|improve this answer
my LaTeX editor TeXnicCenter cannot show chinese character, what should I do? I am using Miktex 2.9 distro. – xport Jan 8 '11 at 15:50
@xport, have you installed support for Eastern languages from the Windows setup CDs? Also, TeXnicCenter didn't have good support for UTF-8, I'm not sure if that's still the case with the latest versions. You might want to try TeXworks instead (also included with MikTeX). – LianTze Lim Jan 8 '11 at 16:04
It hasn't worked for a long time (every new idea was followed by more complications) but now I finally figured it out. I required fontspec,xunicode.xltxtra then I used \newfontsface\kanji{Hiragino Kaku Gothic Pro} (I'm using a mac), and every font is embedded in \kanji{ ... }. I know it's not the nicest solution but at least it finally works. – beyeran Jan 19 '11 at 23:19
@beyeran, are you using XeLaTeX instead of LaTeX? If so, using xeCJK rather than CJK is the best solution. It calls fontspec and xunicode, plus after selecting a font for use with CJK, you won't need to explicitly mark CJK text in your document. I've added an answer using xeCJK. – LianTze Lim Jan 20 '11 at 1:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.