On Sun, 11 Sep 2011, Philipp A. wrote:
2011/2/23 Mathieu Boespflug <0xbadc...@gmail.com>
Hi all,
just as a followup and for the mailing list archives, the solution is
to use both Aditya's suggestion to turn on \donknuthmode, as well
replacing the & signs with their interpretations, namely
\pgfmatrixnextcell. Thank you Aditya for the suggestion.
Regards,
Mathieu
umm, i can’t seem to get it to work. i use the mkiv minimals…
no combination of \donknuthmode, \nonknuthmode, \pgfmatrixnextcell and
“replace ampersand=foo”, that i tried, seems to work.
can anyone give me a minimal example of a working tikz matrix in a context
document? (preferrably something that prevents me from littering everything
with “\pgfmatrixnextcell”)
One way around this is to re-read part of tikz module code under the right
catcode regime (ideally this should be done by t-tikz). I still cannot get
& to work, but using \& is a reasonable shortcut.
Here is a working example:
\usemodule[t-tikz]
\usetikzlibrary{matrix}
\unprotect
\ReadFile{pgfmodulematrix.code.tex}
\protect
\starttext
\tikzstyle{description}=[fill=white,inner sep=2pt]
\starttikzpicture
\matrix(m)[matrix of math nodes,
row sep=3em, column sep=3em,
ampersand replacement=\&,%% AM: Added this.
text height=1.5ex, text depth=0.25ex]
{x \& y\\
z \& u\\};
\path[->]
(m-1-1) edge node[description] {$*$} (m-1-2)
edge node[description] {$*$} (m-2-1)
(m-1-2) edge[dashed] node[description] {$*$} (m-2-2)
(m-2-1) edge[dashed] node[description] {$*$} (m-2-2);
\stoptikzpicture
\stoptext
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________