Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

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

share|improve this answer
1  
@apc The documentation from my site is obsolete. It's preferable to use the texlive or the ctan version. –  Alain Matthes Oct 20 '11 at 12:35
    
Thanks, that's very helpful. –  apc Oct 20 '11 at 16:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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