After discovered how to mix glossary and acronym system (See here), and how to put kana/kanji working with pdfLaTeX (See here), I was trying to mix the both, in order to create kind of dictonnary, with the name of the object, in romanji (with our alphabet), in kana/kanji in parenthesis, and then, a description, with a picture if necessary.

The 2 packages and command work well together, but, if you try to put some kana/kanji in the "name", in the glossary entry (with the related command), it doesn't work. But, if in the description, there's no problem.

Here is an example that goes fine:

\usepackage{CJKutf8,pinyin} % Enables TeX to generate (a) East Asian glyphs and (b) their pronunciations.
\usepackage[overlap,CJK]{ruby} % Simple method for generating sub- and super-textual pronunciation keys (Pīnyīn, kana, etc.)
    breaklinks = true,
    bookmarksnumbered = true,
    colorlinks = true,
    linkcolor = bleuvert,
    bookmarks = true,
    pdfpagemode = UseOutlines,
    pdfstartview = FitH,
    pdfpagelayout = OneColumn,
    urlcolor = darkpink,
\date{Dernière compilation le \today}
\newglossaryentry{Test}{name={Obon}, description={\kana{お}\kanji{盆}}}
\chapter{Les index}

(Sorry if looks so ugly...) Note that, my problem is, rather than having the japanese caracters in the description, I'd like to have them in the name, like this:

\newglossaryentry{Test}{name={Obon (\kana{お}\kanji{盆})}, description={This is ...}}

Any idea?

=> \unexpanded{} was the solution, thanks to egreg for his answer.

  • 2
    Can you provide a minimal example that illustrates the problem? Jan 29, 2013 at 19:36

1 Answer 1


It's a problem related to the timing of expansions. It seems that making the commands robust solves the issue if the characters are in the description field.


However, this doesn't solve it when they are in the name field; in this case this hack works:

  name={Obon \unexpanded{\kana{お}\kanji{盆}}},
  • Hi, thanks for answer. There were absolutly no problem if in the description field. Indeed, your hack for the 'if in the name field case', does work perfectly ! Thanks a lot. What the \unexpanded{} does ? And why this solved the problem here ?
    – Julien
    Jan 30, 2013 at 20:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .