[OS X TeX] TKZplot2d for tikz/pgf problem.

Alain Matthes alain.matthes at mac.com
Mon May 14 07:36:34 EDT 2007


Le 14 mai 07 à 09:32, Frank STENGEL a écrit :

>> This compiles fine as shown but doesn't work when the commented  
>> lines are uncommented (as they are in the original example in the  
>> documentation). When these lines are uncommented, I get the errors  
>> below. I suspect the problem is with the "exp(1)" expression but  
>> don't understand why this evidently worked as documented but  
>> doesn't work for me.
>
> I looked at tkz-plot2d.sty and found your problem stems from the  
> fact that the 1/exp(1) is not evaluated, but used as if it were a  
> floating point number. If I replace line 162 of tkz-plot2d.sty  
> (inside \tkz at fctpt's definition) by
>
> \FPeval\x{#2}%
>
> then everything works fine. One should look if some of the other  
> \FPset shouldn't be changed to \FPeval
>
> -- 


Sorry but this morning in Paris it was early and I was not well awaked

I have a problem with this macro ;  in a previous version it was
FPeval\x{#2} but i found some examples
  with a problem if i use FPeval\x{#2} ....

  and I make a change \FPset\x{#2} for FPeval\x{#2}


  if you keep \FPset\x{#2} it's impossible
  to use tkzfctpt[type=$\bullet$](1/(exp(1)),\tkzfcta){A}


so you  need to write
kzfctpt[type=$\bullet$](10.3679),\tkzfcta){A}

\documentclass{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tikz}
\usepackage{tkz-plot2d}
\thispagestyle{empty}
\begin{document}
\begin{tikzpicture}[scale=1.5]
\tkzinit[xmax=1,xstep=0.1,ymax=1,ystep=0.1]
\tkzgrid
\tkzx
\tkzy
\tkzfct[lw=0.8pt](0.00001..1){\x**\x}
\tkzfctpt[type=$\bullet$](0.3679,\tkzfcta){A}
\tkztg[color=blue,lw=.8pt,kr=0.2,kl=0.2]{\tkzfcta}(0.3679)
\tkztg[color=blue,lw=.8pt,kr=0,kl=1]{\tkzfcta}(1)
\end{tikzpicture}

\end{document}


With 1/exp(1) an evaluation is necessary so if you want
to make evaluation, you can used  Peval\x{#2} like this :

%<–––––––––––––––––––––––––– point d'une courbe  
–––––––––––––––––––––––––––––>
% 
<––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– 
––––>
\newcommand*{\tkzfctpt}[1][]{\tkz at fctpt[#1]}%

\def\tkz at fctpt[#1](#2,#3)#4{
\setkeys[TKZ]{tkzpt}{#1}%
\FPeval\x{#2}%
\FPeval\y{#3}
\tkz at pt[#1](\x,\y){#4}
}
If you have some problem with other examples, tell me...

I need to see all the examples  ... to decide what I make...
It's fine to keep the possibilty of the evaluation but only if
  if find a solution for all the examples.

And I need to make an other documentation...



Greetings Alain Matthes
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the MacOSX-TeX mailing list