# Tkz Euclide problem

\documentclass[a4paper,11pt,openany]{book}
\usepackage{float}  % figure wont float anymore
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{xcolor}
\usepackage{geometry}
\geometry{paperwidth=21cm,paperheight=29.7cm, body={18cm,25.7cm}, top=2.5cm, left=1.5cm}
\usepackage{hyperref}
\usepackage{caption}
\captionsetup[figure]{labelsep=space}

\begin{document}
\chapter{Angles}

\begin{figure}[H]\centering
\begin{tikzpicture}[scale=0.35]
\tkzDefPoint(0,0){O}
\tkzDefPoint(-4.2,2.71293199){C}
\tkzDefPoint(4,3){E}
\tkzDefPoint(3,-4){D}
\tkzDefPoint(0,-5){B}
\tkzInterLL(B,C)(E,D) \tkzGetPoint{A}
\draw[thick] (O)node[above]{$O$} circle[radius=5];
\tkzInterLL(A,B)(C,D) \tkzGetPoint{I};
\tkzDrawPoints[color=black](A,B,C,D,E,O)
%\tkzMarkAngle[color=red](D,A,B);
\tkzDrawLine(A,C)
\tkzDrawLine(A,E)
\tkzLabelPoints[right](A,D,E)
\tkzLabelPoints[left](C)
\tkzLabelPoints[below left](B)
\end{tikzpicture}
\caption{}\label{banana}
\end{figure}
\end{document}


In the above code, if we remove the % symbol we obtain a huge vertical space between the figure and the caption. How to remove this space and why does it behave like this?

The issue is that the bounding box also includes auxiliary points that are not drawn, but used to construct the arc. You can cure this by adding overlay.

\documentclass[a4paper,11pt,openany]{book}
\usepackage{float}  % figure wont float anymore
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetkzobj{all}
\usepackage{xcolor}
\usepackage{geometry}
\geometry{paperwidth=21cm,paperheight=29.7cm, body={18cm,25.7cm}, top=2.5cm, left=1.5cm}
\usepackage{hyperref}
\usepackage{caption}
\captionsetup[figure]{labelsep=space}

\begin{document}
\chapter{Angles}

\begin{figure}[H]\centering
\begin{tikzpicture}[scale=0.35]
\tkzDefPoint(0,0){O}
\tkzDefPoint(-4.2,2.71293199){C}
\tkzDefPoint(4,3){E}
\tkzDefPoint(3,-4){D}
\tkzDefPoint(0,-5){B}
\tkzInterLL(B,C)(E,D) \tkzGetPoint{A}
\draw[thick] (O)node[above]{$O$} circle[radius=5];
\tkzInterLL(A,B)(C,D) \tkzGetPoint{I};
\tkzDrawPoints[color=black](A,B,C,D,E,O)
\tkzMarkAngle[color=red,overlay](D,A,B);
\tkzDrawLine(A,C)
\tkzDrawLine(A,E)
\tkzLabelPoints[right](A,D,E)
\tkzLabelPoints[left](C)
\tkzLabelPoints[below left](B)
\end{tikzpicture}
\caption{}\label{banana}
\end{figure}
\end{document}