1

I'm having some issues with the latest version of the tkz-berge package: it seems to be ignoring node-distance specifications. If I compile this file (using example n. 39 from the tkz-berge documentation),

\documentclass{article} 

\usepackage{tkz-berge}
\usetikzlibrary{positioning} 


\begin{document} 

\begin{tikzpicture}
 \SetVertexNoLabel
   \GraphInit[vstyle=Shade]
 \begin{scope}[rotate=-45]
    \grComplete[RA=6]{4}
 \end{scope}
{\tikzstyle{every node}=[node distance=1.64 cm]
 \NOEA(a2){a5}}
 \Edge(a2)(a5)
 \Edge(a1)(a5)
\end{tikzpicture}

\begin{tikzpicture}
 \SetVertexNoLabel
   \GraphInit[vstyle=Shade]
 \begin{scope}[rotate=-45]
    \grComplete[RA=6]{4}
 \end{scope}
{\tikzstyle{every node}=[node distance=5.64 cm]
 \NOEA(a2){a5}}
 \Edge(a2)(a5)
 \Edge(a1)(a5)
\end{tikzpicture}

\end{document}

I get two identical graphs, in spite of the different node distance specifications:

enter image description here

Any thoughts?

3

Yes in the first version of tkz-graph and tkz-berge I used node distance but it's a problem because it's difficult to use scaling option. The link is towards an old version. You need to use the version ( V 1.00 c 02/06/2011) from TeXLive 2011 or from CTAN .

Now you have two possibilites, in the first example I used unit=4cm directly as an option of \NOEA and in the second I used SetGraphUnit (remark : in your case you don't need a TeX group but in a more complex example, a group is useful) . The macro and the option are defined by tkz-graph

\documentclass{article} 
\usepackage{tkz-berge} %  V 1.00 c 02/06/2011 c for ctan
% the version from altermundus.fr is obsolete and I need to remove this version.

\begin{document} 

\begin{tikzpicture}
 \SetVertexNoLabel
   \GraphInit[vstyle=Shade]
 \begin{scope}[rotate=-45]
    \grComplete[RA=6]{4}
 \end{scope}

 \NOEA[unit=4cm](a2){a5}
 \Edge(a2)(a5)
 \Edge(a1)(a5)
\end{tikzpicture}

\begin{tikzpicture}
 \SetVertexNoLabel
 \GraphInit[vstyle=Shade]
 \begin{scope}[rotate=-45]
    \grComplete[RA=6]{4}
 \end{scope}
{\SetGraphUnit{5.64 cm}
 \NOEA(a2){a5}}
 \Edge(a2)(a5)
 \Edge(a1)(a5)
\end{tikzpicture}

\end{document}

enter image description here enter image description here

1
  • 1
    @apc The documentation from my site is obsolete. It's preferable to use the texlive or the ctan version. Oct 20 '11 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.