So I am making Digraphs in tikz and want to put infinity as edge label but im getting an error. I got no error when i set the label under the vertices to infinity.
\documentclass[a4paper,11pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{listingsutf8}
\usepackage{multicol}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[retainorgcmds]{IEEEtrantools}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,matrix}
\usepackage{wasysym}
\usepackage{float}
\usepackage{listings,relsize}
\lstloadlanguages{R}
\lstset{language=R,basicstyle=\smaller[1],
commentstyle=\rmfamily\smaller, showstringspaces=false,breaklines=true}
\lstset{escapeinside={(*}{*)}}
\begin{document}
\tikzstyle{vertex}=[circle,fill=black!25,minimum size=15pt,inner sep=0pt]
\tikzstyle{selectedvertex} = [vertex, fill=red!24]
\tikzstyle{edge} = [draw,thick,-]
\tikzstyle{arc}= [draw,thick,->,shorten >=1pt,>=stealth']
\tikzstyle{arcl} = [draw,thick,->,shorten>=1pt,>=stealth',bend left=25]
\tikzstyle{arcr} = [draw,thick,->,shorten >=1pt,>=stealth']
\tikzstyle{rpath}=[draw, thick,->,shorten >=1pt,>=stealth',red, opacity=0.4]
\tikzstyle{weight} = [font=\small]
\tikzstyle{selected edge} = [draw,line width=5pt,-,red!50]
\tikzstyle{ignored edge} = [draw,line width=5pt,-,black!20]
\newcommand*{\vpointer}{\vcenter{\hbox{\scalebox{2}{\Huge\pointer}}}}
\def\Arrow{\raisebox{3\height}{\scalebox{3}{$\Rightarrow$}}}
\begin{figure} [H]
\begin{tikzpicture}[width=0.3\textwidth, auto,swap]
% First we draw the vertices
\foreach \pos/\name/\weight in
{{(0,1)/s/-2},
{(1,4)/1/1},
{(4.5,4)/2/-1},
{(4,0)/3/2},
{(5,1.5)/t/0},
{(2.5,0)/s'/-$\infty$},
{(0.5,6)/t'/0}}
\node[vertex,label=below:\weight] (\name) at \pos {$\name$};
% Connect vertices with edges and draw weights
\foreach \source/ \dest /\weight in {
s/1/2, 1/2/2,1/3/2,2/3/3, 3/t/3 , t/s/$\infty$, s/t'/2,2/t'/1,s'/1/1,s'/3/2
}
\path[arcr] (\source) -- node[weight] {$\weight$} (\dest);
\end{tikzpicture}
\end{figure}
The first -$\infty$ works fine but at the line with the edges the infinity won't work. I get the error at the line with \path[arcr] and I don't know how to copi paste the error from kile :S.
It does show the infinity sign as wanted but right behind it it writes "pgf@stop"
Hope you can help : )
\documentclassand including all required libraries and definitions? – Jake Sep 27 '12 at 9:17