On Wed, 22 Jul 2009, Mojca Miklavec wrote:
On Wed, Jul 22, 2009 at 03:08, Aditya Mahajan wrote:
CCed to ConTeXt mailing list.
(And removed the pgf mailing list? :)
No... it was in the newsroup header (I was replying via gmane interface).
On Tue, 21 Jul 2009, Mojca Miklavec wrote to pgf.user list:
Hello,
I noticed that a large number of \begin{tikzpicture} \draw (0,0) -- (5,1); \end{tikzpicture} breaks at line end while \starttikzpicture \draw (0,0) -- (5,1); \stoptikzpicture just generates an infinitely long line.
Is there any simple way to fix the behaviour in ConTeXt?
Don't know.
I have just noticed that (independent of the second issue) when placing several items of:
1.) \tikz \draw (0,0)--(4,2); works OK in both LaTeX and ConTeXt 2.) \begin{tikzpicture} \draw (0,0)--(4,2); \end{tikzpicture} works OK in LaTeX 3.) \starttikzpicture \draw (0,0)--(4,2); \stoptikzpicture{} works OK in ConTeXt 4.) \starttikzpicture \draw (0,0)--(4,2); \stoptikzpicture creates an infinitely long line in ConTeXt
Does that ring a bell to anyone? (It must be something trivial like eating any spaces after \commandsequence, but I don't know what exactly.)
Try the undocumented equivalent of \begin{...} \end{...} in ConTeXt: \start[tikzpicture] ... \stop[tikzpicture]
I also don't like the behaviour in \placefigure{title}{\starttikzpicture ... \stoptikzpicture} that has to be surrounded with \hbox{\starttikzpicture ... \stoptikzpicture} else the figure gets placed at the beginning of line instead of being centered.
[explanation snipped]
If neither of these is acceptable, then we can have a simple wrapper around \start-stop tikzpicture:
\def\startTIKZcode{\hbox\bgroup\starttikzpicture} \def\stopTIKZcode {\stoptikzpicture\egroup}
which will only affect ConTeXt code.
Would it affect anyone if TikZ would generate an hbox instead of vbox (at least in ConTeXt)?
That means ... instead of \let\starttikzpicture=\tikzpicture \let\stoptikzpicture=\endtikzpicture having \def\starttikzpicture{\hbox\bgroup\tikzpicture} \def\stoptikzpicture{\endtikzpicture\egroup}
This is same as the workaround that I suggested. It should work perfectly fine in ConTeXt. Aditya