Hi sage-devel,
Graph latex method outputs tikz code apparently using tkz-berge library.
Does anyone was ever able to compile tkz-berge code where vertices are some
array, tabular or matrices?
In tikz, I use to draw a graph using simply "node" and "edge" instead of
tkz-berge library and I know it is possible to put some array inside a node
and make it compile... Is coding a new version of _latex_ method using
basic tikz code my only solution?
Sébastien
sage: m = matrix(3, range(9))
sage: m.set_immutable()
sage: G = Graph()
sage: G.add_vertex(m)
sage: latex(G)
\begin{tikzpicture}
%
\useasboundingbox (0,0) rectangle (5.0cm,5.0cm);
%
\definecolor{cv0}{rgb}{0.0,0.0,0.0}
\definecolor{cfv0}{rgb}{1.0,1.0,1.0}
\definecolor{clv0}{rgb}{0.0,0.0,0.0}
%
\Vertex[style={minimum
size=1.0cm,draw=cv0,fill=cfv0,text=clv0,shape=circle},LabelOut=false,L=\hbox{$\left(\begin{array}{rrr}
0 & 1 & 2 \\
3 & 4 & 5 \\
6 & 7 & 8
\end{array}\right)$},x=2.5cm,y=2.5cm]{v0}
%
%
\end{tikzpicture}
Here is the error I get :
sage: view(G)
An error occurred.
This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009) (format=pdflatex
2011.4.19) 18 OCT
2012 21:34
entering extended mode
[...]
! Use of \tikz@@scope@env doesn't match its definition.
\pgfutil@ifnextchar #1#2#3->\let \pgfutil@reserved@d =#1\def
\pgfutil@reserved@a {
#2}\def \pgf
util@reserved@b {#3}\futurelet \pgfutil@let@token \pgfutil@ifnch
l.54 \end{array}\right)$},x=2.5cm,y=2.5cm]{v0}
If you say, e.g., `\def\a1{...}', then you must always
put `1' after `\a', since control sequence names are
made up of letters only. The macro here has not been
followed by the required stuff, so I'm ignoring it.
! Use of \tikz@@scope@env doesn't match its definition.
[...]
! ==> Fatal error occurred, no output PDF file produced!
Latex error
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
Visit this group at http://groups.google.com/group/sage-devel?hl=en.