Take the 2-minute tour ×
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.

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?

share|improve this question
    
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
1  
@MarkS.Everitt Thanks! Written up. –  LianTze Lim Jan 31 '12 at 15:41

1 Answer 1

up vote 5 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

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.