2

How can I place a point label exactly over the top of a node using tkz-euclide? I know it can be done with tikz using something like \node (A) at (1,1) {A};.

Is there any equivalent using tkz-euclide, like eg, \tkzLabelPoint[center](1,1){A}?

The \tkzLabelPoint options include above, below, above left, below right, etc, but if I leave the position option blank it defaults to below right. I can do something like \tkzLabelPoint[above, yshift=-12](1,1){A}, but this seems like an unsatisfactory work-around.

3

You can use anchor=center (\tkzLabelPoint is just a node with predefined style).

\documentclass[border=5pt]{standalone}
\usepackage{tkz-euclide}

\begin{document}

\begin{tikzpicture}
%\draw[gray](0,0)grid(2,2);
\tkzInit[xmin=0,ymin=0,xmax=2,ymax=2]
\tkzGrid[gray]
\tkzDefPoint(1,1){A}
\tkzLabelPoint[red,anchor=center](A){$A$}
\end{tikzpicture}

\end{document}

enter image description here

1
  • you can use a shorthand for anchor=center: \tkzLabelPoint[red,centered](A){$A$} – Alain Matthes Dec 18 '19 at 10:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.