1

I'm having trouble using the example code from tikz-qtree to typeset a Japanese syntax tree. Here's my MWE:

\documentclass[10pt,letterpaper]{article}

\usepackage{xeCJK}
\setCJKmainfont{MS Mincho}% for \rmfamily

\usepackage{tikz}
\usepackage{tikz-qtree}
\usepackage{tikz-qtree-compat}
\tikzset{every leaf node/.style={font=\ja}}

\begin{document}
\begin{tikzpicture}
  \Tree [ .VP [ .V\1 いる ] ]
\end{tikzpicture}
\end{document}

And I get this error:

! Undefined control sequence.

\tikz@textfont ->\ja

I am using XeLaTeX in a just-updated distribution of MiKTeX on Windows 7. Anyone know how to fix this?

  • Since you're using xelatex, you wouldn't need the line \tikzset{every leaf node/.style={font=\ja}} for font switching at all. – LianTze Lim Jan 31 '12 at 7:30
  • 1
    @LianTzeLim: When I remove that line the code compiles fine for me. You should write it up as an answer. – qubyte Jan 31 '12 at 10:01
5

The error tells you that the command \ja (presumably for font switching to Japanese) has not been defined.

But in this case, since you're using xelatex, you wouldn't need the line

 \tikzset{every leaf node/.style={font=\ja}}

for font switching at all. Your code should compile fine if you remove that line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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