asteppke / tikzedt

Automatically exported from code.google.com/p/tikzedt
0 stars 0 forks source link

'\node' in combination with 'axis cs:' causes wysiwyg editing to be disabled #30

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
\begin{tikzpicture}
\begin{axis}
\addplot3{x*y};
\node at (axis cs:0,0,0) {Bug!};
\end{axis}
\end{tikzpicture}

What is the expected output? What do you see instead?
Output is correct, but TikzEdt complains about the following error:
"Couldn't parse code. MismatchedTokenException: Expected token ')'. Instead 
found "," in line 4 at position 19."

I assume that 'axis cs:' causes the problem. This causes "Wysiwyg editiing is 
currently disabled, source out of sync."

What version of the product are you using? On what operating system?
TikzEdt 0.2.1.0 with newest Tikz/PGFPlots

Original issue reported on code.google.com by markus.b...@gmail.com on 11 Apr 2012 at 8:40

GoogleCodeExporter commented 8 years ago
Yes, i can confirm this. 
>> I assume that 'axis cs:' causes the problem.
Yes, that is correct, it is currently not supported by the parser.
(also 3D coordinates are currently not WYSIWYG supported) 
I should still make sure that the parser accepts the document and just ignores 
these things...

For now, one quick fix is to enclose conflicting parts of the document in /* .. 
*/ comment signs like this:

\begin{tikzpicture}
%/*
\begin{axis}
\addplot3{x*y};
\node at (axis cs:0,0,0) {Bugsdfsd sdf sd fsd fs dfs 
dfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx!};
\end{axis}
%*/
\draw (1.5,-3) -- (-2.5,0.5) -- (0,5.5); % here you can still do WYSIWYG 
editing.
\end{tikzpicture}

Original comment by t.willwa...@gmail.com on 12 Apr 2012 at 10:34

GoogleCodeExporter commented 8 years ago

Original comment by t.willwa...@gmail.com on 12 Apr 2012 at 10:35

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks for the hint on the workaround/quick fix. =)

Original comment by markus.b...@gmail.com on 13 Apr 2012 at 8:22

GoogleCodeExporter commented 8 years ago
It would be a great feature of TikzEdt if it could support the axis coordinate 
system. For scientfic plots you often want to manually add text nodes, arrows, 
etc. to your plots. 
At the moment you can either do this by manually tuning the coordinate values 
which is slow or by not using the axis cs which has a lot of disadvantages, 
mainly that you cannot change the axis scaling anymore without your labels 
shifting around.

Original comment by astep...@gmail.com on 13 Feb 2013 at 3:25

GoogleCodeExporter commented 8 years ago
I agree it would be a good feature.
It is technically not so easy to realize however. Since the axis are 
automatically placed by Tikz, Tikzedt does not know how to translate from axis 
coordinates to absolute coordinates and vice versa. 

It does not mean that the feature is impossible to implement, but one needs to 
secretely insert some extra tex code before compiling. Tikzedt does that anyway 
btw. to get the bounding box of the tikz picture. However, I generally try to 
avoid secretely inserted code if possible.

Original comment by t.willwa...@gmail.com on 19 Feb 2013 at 10:23