You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\documentclass{article}
\usepackage{xeCJK}
\usepackage{tikz}
\makeatletter\tikzset{
x name/.code={\setbox\@tempboxa=\hbox{中文}}
}
\makeatother\begin{document}
\begin{tikzpicture}
\node[draw, x name=名字] {测试};
\end{tikzpicture}
abc测试
\end{document}
预期效果:带框的文本「测试」 + 文本「abc测试」
实际输出:一个空框 + 文本「abc」,同时 log 中包含 Missing Character 报错:
Missing character: There is no 中 in font nullfont!
Missing character: There is no 文 in font nullfont!
Missing character: There is no 名 in font nullfont!
Missing character: There is no 字 in font nullfont!
Missing character: There is no 测 in font nullfont!
Missing character: There is no 试 in font nullfont!
其他信息:
把例子里的 中文 换成 中文w,会新增报错 Missing character: There is no w in font nullfont! 和 ! Missing } inserted.
一个
xeCJK
文档中,如果tikzpicture
之前无中文输入,tikzpicture
里使用了一个内部把中文存进盒子的pgfkeys
key,那么整篇文档的中文都无法显示
其他信息:
中文
换成中文w
,会新增报错Missing character: There is no w in font nullfont!
和! Missing } inserted.
luatex-ja
,问题不复现上述例子的来源:
<name>
和<text>
相同时,定义一个新的 key 来简化形如\node (<name>) {<text>};
的输入\tikzset{x name/.style={name={#1}, node contents={#1}}}
,于是输入可简化为\node[x name=<...>];
<text>
在较短时能两端对齐,于是新 key 的定义调整为The text was updated successfully, but these errors were encountered: