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 have a very strange problem when using TikZ and xeCJK. I managed to extract this MWE from my original sources:

\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{english}
\usepackage{tikz}
\usepackage{xeCJK}
\newCJKfontfamily\hiraganaFont[AutoFakeBold=1]{NanumMyeongjo}
\begin{document}

{\hiraganaFont \textbfる}\tikz{}

\end{document}

(the polyglossia/defaultlanguage is only there to keep xeCJK (I believe) quiet.)

Symptoms:

  • Output is る. (hiragana, period; the period is set in whatever is the document default font, not the CJK font; when a Scale is present in the CJK font definition, the period is unaffected). Expected output is , without the period.

  • The dot stays when lines are drawn inside the \tikz{} command. It would appear to be positioned to the right of the picture origin (i.e., 'inside' the picture).

  • The dot stays when the \tikz{} command is put between and }.

  • The dot stays when the \tikz{} command is changed into a tikzpicture environment.

  • The dot stays when exchanging the CJK font.

  • The dot vanishes when AutoFakeBold is set to 0.

  • The dot vanishes when \textbf is deleted (or \bf for that matter, whatever their difference is).

  • The dot vanishes as soon as a non-whitespace, non-CJK glyph is put behind the hiragana, be it inside or outside the pair of braces that surrounds the kana.

  • I haven't managed to make the dot appear using a custom-defined environment.

Judging from the diagnostics, it would appear that somehow xeCJK's fake boldening feature and TikZ interact in freaking ways.

Any ideas?

share|improve this question
    
Welcome to TeX.sx! –  mafp Mar 28 '13 at 0:01
add comment

1 Answer

(It is not an answer, sorry.)

It's irrelevant to CJK scripts. I guess it's a bug of fontspec.

Test this file:

\documentclass{article}
\usepackage{tikz}[2011/06/07 v2.10-cvs (rcs-revision 1.81)]
\usepackage{fontspec}[2013/03/16 v2.3a Font selection for XeLaTeX and LuaLaTeX]

\newfontfamily\testfont[FakeBold=1]{Latin Modern Roman}

\begin{document}

{\testfont X}\tikz{}

\end{document}

The problem remains.

Maybe you can ask Joseph Wright to have a look at this.

share|improve this answer
add comment

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.