3

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.

1 Answer 1

4

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$} Commented Dec 18, 2019 at 10:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .