[OS X TeX] Error in TikZ code hard to find

Don Green Dragon fergdc at Shaw.ca
Tue Nov 11 18:40:28 EST 2014


Hello All,

I hope the following will not be too trivial for the knowledgeable people on this list but possibly it will help someone who regularly creates graphics with the wonderful TikZ package.

Was working on a document with three chapters and was revising certain parts of chapter 1, hence it was the only chapter whose source code was active.

Decided to include another {tikzpicture} environment. It was very simple and short and I was confident that the code would work, so typeset. TeXShop replies with an error of the form

.Chapters/Chapter1.tex: 5805: Undefined control sequence
\Generic error …
					#4 \errhelp  \@err@ ...

l. 5805 … y over the closed interval $[0 \,..\, p]
										   $.

I get those kind of messages all the time because I make careless mistakes in typing; e.g., type \em[h{. . .} instead of \emph{. . .}. Usually the error message identifies the offending control sequence, but in this case I could not figure out which string was the offender.

By the way, I use  source code fragments of the form $[a \,..\, b]$ often and they had caused no problems in the past. I focused on what appeared to be the offending  $[0 \,..\, p]$.

After a couple of hours of trying this and that, including a suspicion that TeXShop was acting badly and so  RESTART and SHUT DOWM were tried, and much more, which I will avoid relating. Here follows my error. 

In the code for {tikzpicture} I had written (not including the line number 5682)

5682 \path (7, 0.5) node[right[ {Picture of blah blah blah};

instead of 

5682 \path (7, 0.5) node[right] {Picture of blah blah blah};

and it was that incorrect occurrence of `[‘ that triggered the error that was reported about line 5805.

I know! I should have checked the tikzpicture code right away since the attempt to typeset it resulted in `strange’ behaviour. Usually, TikZ catches those sort of errors so you can track them down.

That’s it.


don green dragon
fergdc at shaw.ca






More information about the MacOSX-TeX mailing list