尝试在 genealogytree 中定义 \gtrSymbolsSetCreateSelected{blue}{Male} 时未定义控制序列

尝试在 genealogytree 中定义 \gtrSymbolsSetCreateSelected{blue}{Male} 时未定义控制序列

当我尝试使用 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}

在此处输入图片描述

相关内容