继续我昨天发布的问题,我在尝试定义文本标签时遇到了与\Edge
宏类似的问题 -加载编译错误被标记。如果在此处应用上一个问题提供的修复,则会引发;如tkz-graph
\usetikzlibrary{babel}
!Undefined control sequence.\cmdGR
!Package xkeyval Error: '/tikz/handle active characters in nodes' undefined in families 'edge'
\Edge[...](C)(B)
\documentclass{article}
% RN. 21 October 2017
\usepackage[utf8]{inputenc}
\usepackage[greek,ngerman,french,english]{babel}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usepackage{tkz-graph}
%\usetikzlibrary{babel}
\begin{document}
\section{Alain Matthes: tkz-graph}
\begin{tikzpicture}
\SetUpEdge[lw = 1.5pt,
color = orange,
labelcolor = gray!30,
labelstyle = {draw}]
\SetGraphUnit{3}
\GraphInit[vstyle=Normal]
\Vertex{P}
\NOEA(P){B}
\SOEA(P){M}
\SOEA(B){C}
%\Edge[/tikz/handle active characters in nodes=false,label=bc](C)(B)
\Edge[label=bp](B)(P)
\Edge[label=pm](P)(M)
\Edge[label=cm](C)(M)
\Edge[label=bm](B)(M)
\end{tikzpicture}
\end{document}
答案1
而不是应用另一个问题的修复(`\usetikzlibrary{babel}` 与 `tkz` 宏 `\tkzRep` 和 `\tkzDrawLine` 之间不兼容) 到\Edge
,您可以将边缘命令放在应用修复的范围内:
\documentclass{article}
% RN. 21 October 2017
\usepackage[utf8]{inputenc}
\usepackage[greek,ngerman,french,english]{babel}
\usepackage{tikz}
\usepackage{tkz-euclide}
\usepackage{tkz-graph}
\usetikzlibrary{babel}
\begin{document}
\section{Alain Matthes: tkz-graph}
\begin{tikzpicture}
\SetUpEdge[lw = 1.5pt,
color = orange,
labelcolor = gray!30,
labelstyle = {draw}]
\SetGraphUnit{3}
\GraphInit[vstyle=Normal]
\Vertex{P}
\NOEA(P){B}
\SOEA(P){M}
\SOEA(B){C}
\begin{scope}[/tikz/handle active characters in nodes=false]
\Edge[label=bc](C)(B)
\Edge[label=bp](B)(P)
\Edge[label=pm](P)(M)
\Edge[label=cm](C)(M)
\Edge[label=bm](B)(M)
\end{scope}
\end{tikzpicture}
\end{document}