On Sun, 11 Sep 2011, Aditya Mahajan wrote:
On Sun, 11 Sep 2011, Philipp A. wrote:
2011/2/23 Mathieu Boespflug <0xbadcode@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
A slightly more robust solution is to load the attached module instead of t-tikz. (It also patches \usetikzlibrary). However, I cannot figure out what is the expected catcode of & inside a tikz \matrix. So, you will still need to use amserand replacement=\&. Note that this sets the catcode of ! to other (as expected by tikz). In the past, circuittikz has some troubles with the catcode of !. Aditya