1

Sometimes one would like to work with both tikz and tkz-euclide since some of them is more suitable for a specific purpose and vice-versa.

For example, consider the following simple example.

\documentclass{article}

\usepackage{tikz}
\usepackage{tkz-euclide}

\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0, 0){A}
\tkzDefPoint(1,1){B}
    \draw [black] (0,0) to (1,1) ;
\tkzDrawPoints(A,B)
\end{tikzpicture}
\end{document}

Ideally, I would like to use

\draw [black] A to B; 

instead of

\draw [black] (0,0) to (1,1) ;

but it produces error. Is it achievable at all?

1 Answer 1

2

These points are called simply A and B, and therefore you can say \draw (A) -- (B);.

\documentclass{article}

\usepackage{tikz}
\usepackage{tkz-euclide}

\begin{document}
\begin{tikzpicture}
\tkzDefPoint(0, 0){A}
\tkzDefPoint(1,1){B}
    \draw [black] (0,0) to (1,1) ;
\draw[red] (A) -- (B);  
%\tkzDrawPoints(A,B)
\end{tikzpicture}
\end{document}

You must log in to answer this question.

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