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?

2
  • Since you're using xelatex, you wouldn't need the line \tikzset{every leaf node/.style={font=\ja}} for font switching at all.
    – imnothere
    Commented Jan 31, 2012 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
    Commented Jan 31, 2012 at 10:01

1 Answer 1

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.

You must log in to answer this question.

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