osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: usepackage{tikz} and : conflict? (minimal example)
- msg#00029

List: tex.pgf.user

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

\listfiles
\documentclass{minimal}
\usepackage{tikz}
\begin{document}
$a {\:} b$ % other error results from omitting accolades
\end{document}
\endinput

This gives an error. The question is: is it a tikz/pgf bug, or is there
something wrong with my TeX installation? If somebody could try the
minimal example and report back, then I'd already know whether it is due
to my installation. I've included some log exerpts below that give
additional information.


! Use of \pgfutil@xifnch doesn't match its definition.
l.5 $a {\:}
b$
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.

! Missing } inserted.
<inserted text>
}
l.5 $a {\:} b$

I've inserted something that you may have forgotten.
(See the <inserted text> above.)
With luck, this will get me unwedged. But if you
really didn't forget anything, try typing `2' now; then
my insertion and my current dilemma will both disappear.


*File List*
minimal.cls 2001/05/25 Standard LaTeX minimal class
tikz.sty 2006/10/17 v1.10 (rcs-revision 1.68)
pgf.sty 2006/10/11 v1.10 (rcs-revision 1.7)
pgfrcs.sty 2006/10/26 v1.10 (rcs-revision 1.14)
pgfrcs.code.tex
pgfcore.sty 2006/10/11 v1.10 (rcs-revision 1.4)
graphicx.sty 1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
keyval.sty 1999/03/16 v1.13 key=value parser (DPC)
graphics.sty 2001/07/07 v1.0n Standard LaTeX Graphics (DPC,SPQR)
trig.sty 1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg 2005/02/03 v1.3 graphics configuration of teTeX/TeXLive
pdftex.def 2002/06/19 v0.03k graphics/color for pdftex
pgfsys.sty 2006/10/16 v1.10 (rcs-revision 1.19)
pgfsys.code.tex
pgfsyssoftpath.code.tex 2006/10/16 (rcs-revision 1.4)
pgfsysprotocol.code.tex 2006/10/16 (rcs-revision 1.4)
xcolor.sty 2005/12/21 v2.09 LaTeX color extensions (UK)
color.cfg 2005/02/03 v1.3 color configuration of teTeX/TeXLive
pgfcore.code.tex
pgfbaseshapes.sty 2006/10/16 v1.10 (rcs-revision 1.16)
pgfbaseshapes.code.tex
pgfbaseplot.sty 2006/10/16 v1.10 (rcs-revision 1.5)
pgfbaseplot.code.tex
pgfbaseimage.sty 2006/10/16 v1.10 (rcs-revision 1.5)
pgfbaseimage.code.tex
pgfbaselayers.sty 2006/10/16 v1.10 (rcs-revision 1.5)
pgfbaselayers.code.tex
pgfbasesnakes.sty 2006/10/16 v1.10 (rcs-revision 1.10)
pgfbasesnakes.code.tex
pgfbasepatterns.sty 2006/10/16 v1.10 (rcs-revision 1.9)
pgfbasepatterns.code.tex
pgfcomp-version-0-65.sty 2006/10/11 v1.10 (rcs-revision 1.4)
calc.sty 1998/07/07 v4.1b Infix arithmetic (KKT,FJ)
pgffor.sty 2006/10/16 v1.10 (rcs-revision 1.5)
pgffor.code.tex
xkeyval.sty 2005/01/30 v2.0 package option processing (HA)
xkeyval.tex 2005/01/30 v2.0 key=value parser (HA)
tikz.code.tex
***********

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


Thread at a glance:

Previous Message by Date:

Re: Matrices in TiKZ

On 12/19/06 5:48 AM, "Mark Wibrow" <M.Wibrow@xxxxxxxxx> wrote: > Matthew Leingang wrote: >> But what I'd like to do is have a matrix-like syntax for TiKZ, which would >> interpret & and \\ the same way as in the array or xymatrix environment, >> making each entry a node and giving them names automatically. > > Well, the following LaTeX code works, and shows what could be done, BUT > it's not perfect (some issues involving spaces which you'd see if you > create the matrix outside the \tikzpicture environment i.e. outside a > \nullfont group). Using & and \\ would make things a lot easier, but this > has a 'cleaner' look (in my opinion): Thanks, Mark, for taking a look at this. I'd like to learn more about the mechanics of TeX parsing and examples like these help a lot. It would be even nicer if the entries were positioned based on their size. Rather than having the centers of each entry in a row equidistant, the distance between the right edge of one column and the left edge of the next column is constant. This I think is how the LaTeX matrix environments work. I guess each column keeps track of its widest entry. So \creatematrix would also have to hold all the positioning information as well. The interface I'm thinking about could work like \begin{tikzpicture} \draw (0,0) matrix[delim=b] (foo) { 0 & 2 & 0 \\ 1 & \nodeoptions[draw,circle]{1} & 4 \\ 0 & 100006 & 7 } (foo[1,1].west) -- (foo[1,3].east) (foo[1,1].north) -- (foo[3,1].south); \end{tikzpicture} One of my goals would be that a matrix typeset through this method without extra decoration would look just like the same matrix typeset by $\begin{matrix}...\end{bmatrix}$. That way it would fit most nicely with other matrices in the same document. But now you've given me something to work from. Thanks again! --Matt -- Matthew Leingang Preceptor in Mathematics Harvard University http://www.math.harvard.edu/~leingang/vCard.vcf ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Next Message by Date:

Re: usepackage{tikz} and : conflict? (minimal example)

I tried the minimal example with MikTeX 2.5 and PGF 1.10, and got the same error as you. Regards Kjell Magne Fauske On 12/19/06, Erik Quaeghebeur <equaeghe@xxxxxxxxxxxxxx> wrote: > \listfiles > \documentclass{minimal} > \usepackage{tikz} > \begin{document} > $a {\:} b$ % other error results from omitting accolades > \end{document} > \endinput > > This gives an error. The question is: is it a tikz/pgf bug, or is there > something wrong with my TeX installation? If somebody could try the > minimal example and report back, then I'd already know whether it is due > to my installation. I've included some log exerpts below that give > additional information. > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Previous Message by Thread:

Matrices in TiKZ

Hi, I love PGF! For a long time I've tried to use Xy-Pic to do special graphics for my mathematical writings. But mostly I put off writing it up because Xy-Pic has a nearly write-only syntax. Now I love the chance to work out new problems in TiKZ. Something I used to do in Xy-Pic is matrices and commutative diagrams. You could enter a matrix in LaTeX array-style syntax with &'s to separate columns and \\ to separate rows. For instance, to get a matrix with some of the rows or columns crossed out and a circled entry you can do \[ \begin{xy}\xymatrix@R 0pt @C\arraycolsep{ & A & B & C & D \\ 9:00& 0 \POS[];[rrr(-0.1)];[rrr(1.1)]**\dir{-} & 3 & 1 & 0 \POS[];[ddd(-0.1)];[ddd(1.1)]**\dir{-}\\ 10:00& 1 \POS[];[rrr(-0.1)];[rrr(1.1)]**\dir{-} & 0 & 0 & 0 \\ 11:00& 2 & 2 & 2 & 0 \\ 12:00& 3 & 1\POS[];\drop\cir<8pt>{} & 2 & 0} \end{xy} \] The \POS... stuff is what made Xy-Pic hard to use for me. I wanted to do something similar in TiKZ, but the best I came up with was to make every entry its own node by hand. Here is an example of a similar thing (not the same matrix) in TiKZ: \[ \left[ \begin{tikzpicture}[xscale=\matrixxscale,yscale=\matrixyscale,baseline=-0.8c m] \draw (0,0) node (a11) {5} ++ (1,0) node (a12) {0} ++ (1,0) node[draw,circle] (a13) {2} ++ (1,0) node (a14) {2}; \draw (a11) ++ (0,-1) node (a21) {8} ++ (1,0) node (a22) {6} ++ (1,0) node (a23) {0} ++ (1,0) node (a24) {6}; \draw (a21) ++ (0,-1) node (a31) {0} ++ (1,0) node (a32) {5} ++ (1,0) node (a33) {3} ++ (1,0) node (a34) {0}; \draw (a31) ++ (0,-1) node (a41) {7} ++ (1,0) node (a42) {0} ++ (1,0) node (a43) {2} ++ (1,0) node (a44) {2}; \draw (a12.north) -- (a42.south) (a21.west) -- (a24.east) (a31.west) -- (a34.east); \end{tikzpicture} \right] With this I can see pretty easily what's where, what's circled, and where the lines are drawn. And now I know I can use the options x= and y= to get the spacing more like that of a regular matrix. And I can do it all with only one \draw command. But what I'd like to do is have a matrix-like syntax for TiKZ, which would interpret & and \\ the same way as in the array or xymatrix environment, making each entry a node and giving them names automatically. I learn LaTeX by reading source code and I'm willing to try that path to the solution. But I was wondering if I was missing a feature or if someone else had already solved the problem. Thanks, Matthew Leingang -- Matthew Leingang Preceptor in Mathematics Harvard University http://www.math.harvard.edu/~leingang/vCard.vcf ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

Next Message by Thread:

Re: usepackage{tikz} and : conflict? (minimal example)

I tried the minimal example with MikTeX 2.5 and PGF 1.10, and got the same error as you. Regards Kjell Magne Fauske On 12/19/06, Erik Quaeghebeur <equaeghe@xxxxxxxxxxxxxx> wrote: > \listfiles > \documentclass{minimal} > \usepackage{tikz} > \begin{document} > $a {\:} b$ % other error results from omitting accolades > \end{document} > \endinput > > This gives an error. The question is: is it a tikz/pgf bug, or is there > something wrong with my TeX installation? If somebody could try the > minimal example and report back, then I'd already know whether it is due > to my installation. I've included some log exerpts below that give > additional information. > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!