![尝试在 genealogytree 中定义 \gtrSymbolsSetCreateSelected{blue}{Male} 时未定义控制序列](https://linux22.com/image/440885/%E5%B0%9D%E8%AF%95%E5%9C%A8%20genealogytree%20%E4%B8%AD%E5%AE%9A%E4%B9%89%20%5CgtrSymbolsSetCreateSelected%7Bblue%7D%7BMale%7D%20%E6%97%B6%E6%9C%AA%E5%AE%9A%E4%B9%89%E6%8E%A7%E5%88%B6%E5%BA%8F%E5%88%97.png)
当我尝试使用 template=symbol 节点编译简单的家谱树时收到错误消息
梅威瑟:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\gtrSymbolsSetCreateSelected{blue}{Male}
\gtrSymbolsSetCreateSelected{red}{Female}
\gtrSymbolsSetCreateSelected{black}{Neuter}
\begin{tikzpicture}
\genealogytree[template=symbol nodes]{
child{
gm pf cf
child{gm pf cf cm}
child{gm pf cm c- cm}
}
}
\end{tikzpicture}
\end{document}
给出错误:
...
! Undefined control sequence.
l.5 \gtrSymbolsSetCreateSelected
{blue}{Male}
?
答案1
\documentclass{article}
\usepackage[all]{genealogytree}
\begin{document}
\gtrSymbolsSetCreateSelected{blue}{Male}
\gtrSymbolsSetCreateSelected{red}{Female}
\gtrSymbolsSetCreateSelected{black}{Neuter}
\begin{tikzpicture}
\genealogytree[template=symbol nodes]{
child{
gm pf cf
child{gm pf cf cm}
child{gm pf cm c- cm}
}
}
\end{tikzpicture}
\end{document}
另一个代码得到相同的结果
\documentclass[
border=2mm,
convert={ density=600 -alpha Remove, outext=.png }
]{standalone}
\usepackage[all]{genealogytree}
\usepackage{lmodern}
\begin{document}
\gtrSymbolsSetCreateSelected{blue}{Male}
\gtrSymbolsSetCreateSelected{red}{Female}
\gtrSymbolsSetCreateSelected{green}{Neuter}
\begin{genealogypicture}[template=symbol nodes]
child{
gm pf cf
child{gm pf cf cm}
child{gm pf cm c- cm}
}
\end{genealogypicture}
\end{document}