I've just started a Discrete Mathematics class at University, and have decided to learn LaTeX for writing my notes.
A few days ago, I used it for Logic Theory (including Truth Tables), and am now quite efficient with that.
Today we were learning Graph Theory, so I looked for LaTeX libraries and found this blog post for tkz-berge.
Using there example (after installing tkz-berge via mpm, as I couldn't get my own repo running due to mpc not being available), I got the following error:
Code: Select all
! Undefined control sequence.
<argument> \pgfmathdeclarefunction
{gcd}{2}{\begingroup \pgfmathcontinueloop...
l.52 }{}
Code: Select all
\documentclass{article}
\usepackage{tikz}
\usepackage{tkz-berge}
\pagestyle{empty}
\tikzstyle{NormalVertexStyle}=[shape = circle,%
shading = ball,%
ball color = white,%
very thin,
inner sep=3pt,%
draw]
\SetVertexNoLabel
\tikzstyle{EdgeStyle}= [thick,%
double= orange,%
double distance = 1pt]
\begin{document}
\begin{center}
\begin{tikzpicture}
\tikzstyle{every node} = [node distance=1.5cm]
\Vertex(A)
\EA{A}(C) \NO{C}(B) \SO{C}(D)
\tikzstyle{every node} = [node distance=1.2cm]
\EA{B}(F) \NO{F}(E) \SO{F}(G)
\EA{D}(I) \NO{I}(H) \SO{I}(J)
\EA{F}(L) \NO{L}(K) \SO{L}(M)
\EA{I}(O) \NO{O}(N) \SO{O}(P)
\EA{L}(Q)
\tikzstyle{every node} = [node distance=1.5cm]
\SO{Q}(R) \SO{R}(S) \EA{R}(T)
\Edge(A)(B) \Edge(A)(C) \Edge(A)(D)
\Edge(B)(E) \Edge(B)(G)
\Edge(C)(F) \Edge(C)(I)
\Edge(D)(H) \Edge(D)(J)
\Edge(E)(K) \Edge(E)(F) \Edge(F)(M)
\Edge(G)(L) \Edge(G)(H) \Edge(H)(O)
\Edge(I)(N) \Edge(I)(J) \Edge(J)(P)
\Edge(K)(Q) \Edge(K)(L)
\Edge(M)(Q) \Edge(M)(N)
\Edge(T)(Q) \Edge(L)(R)
\Edge(O)(R) \Edge(O)(P)
\Edge(T)(R) \Edge(N)(S)
\Edge(P)(S) \Edge(T)(S)
\end{tikzpicture}
\end{center}
\end{document}
Thanks for all suggestions,
Alec Taylor