\section{FAQ}

\subsection{Most common errors}
These are the mistakes I make most often myself, since the syntax has changed several times. This section will be expanded.

\begin{itemize}\setlength{\itemsep}{10pt}
  \item Forgetting the ``s'' of the macros that draw several objects, such as \tkzcname{tkzDrawSegments} or \tkzcname{tkzDrawCircles}: \tkzcname{tkzDrawPoint(A,B)} is wrong, you need \tkzcname{tkzDrawPoints(A,B)}.

  \item Since version 4, the unit is always the cm, so you must not write a unit: \tkzcname{tkzDrawCircle[R](O,3cm)} becomes \tkzcname{tkzDrawCircle[R](O,3)}. The usual \tkzname{TikZ} options keep their units, for example \tkzname{below right = 12pt}; on the other hand, you write \tkzname{size=1.2} to set the radius of the arc in \tkzcname{tkzMarkAngle}.

  \item Parentheses instead of braces. A point that is created has its name between braces, while a point that is used, as an option or as an argument, has its name between parentheses: write \tkzcname{tkzGetPoint\{A\}}, not \tkzcname{tkzGetPoint(A)}.

  \item \tkzcname{tkzGetPoint\{A\}} instead of \tkzcname{tkzGetFirstPoint\{A\}}. When a macro gives two points, either retrieve both with \tkzcname{tkzGetPoints\{A\}\{B\}}, or only one of them with \tkzcname{tkzGetFirstPoint\{A\}} or \tkzcname{tkzGetSecondPoint\{A\}}. These points can also be used with the references \tkzname{tkzFirstPointResult} and \tkzname{tkzSecondPointResult}. Some macros also give a third point, \tkzname{tkzPointResult}.

  \item Retrieve a result immediately: \tkzcname{tkzGetPoint}, \tkzcname{tkzGetPoints} or \tkzcname{tkzGetLength} must follow the macro that computes the result, because the next calculation replaces it.

  \item The order of the intersection points of a line and a circle, or of two circles, has sometimes changed between versions; this leads either to a wrong figure or to an error. The options \tkzname{common} and \tkzname{near} let you choose the point you want.

  \item Mixing options and arguments: all the macros that use a circle need to know its radius. If the radius is given by a measure, the option includes \tkzname{R}.

  \item Angles are given in degrees, more rarely in radians.

  \item A list of points must not be cut by a \code{\%} at the end of a line: |\tkzDrawSegments(A,B%| followed by |C,D)| gives the point |BC,D|, because \code{\%} also removes the space between the two points. Simply go to the next line without \code{\%}.

  \item The syntax of version 3 for special circles, for example |\tkzDrawCircle[euler](A,B,C)|, no longer exists: define the circle with \tkzcname{tkzDefCircle[euler](A,B,C)}, retrieve its center and a point with \tkzcname{tkzGetPoints\{N\}\{P\}}, then draw it with \tkzcname{tkzDrawCircle(N,P)}. Since version 5.14, the old syntax gives an error message.

  \item If an error occurs in a calculation when passing arguments, it is better to do the calculation before calling the macro.

  \item Do not mix the syntaxes of \tkzNamePack{pgfmath} and \tkzNamePack{xfp}. I have often chosen \tkzNamePack{xfp}; if you prefer \tkzNamePack{pgfmath}, do your calculations before passing the arguments.

  \item The error ``dimension too large'' occurs in some cases, for example with \tkzcname{tkzDrawArc} or \tkzcname{tkzMarkAngle} and a very small angle: it comes from the library \NameLib{decorations} when a mark is placed on the arc, even when the mark is absent. One way to avoid it is the option \tkzname{veclen} (see section \ref{opt-veclen}): in the scope where it is used, the function \code{veclen} is computed with \tkzNamePack{xfp}. Do not use intersection macros in this scope.

  \item Since version 5.14, \tkzcname{tkzSetUpCompass}\code{[delta=...]} no longer extends the arcs drawn with \tkzcname{tkzDrawArc}: use \tkzcname{tkzSetUpArc}\code{[delta=...]} for them.
\end{itemize}
\endinput
