有人可以帮我将这个图居中吗?代码在图中有效,但在子图中无效。
\documentclass[
12pt, %Font size
a4paper, %Paper size
twoside, %Two-sided document
openright, %Chapters start on odd pages
fleqn, %Left-align displayed equations
leqno, %Place equation numbers on the left
]{book}
\usepackage{mathrsfs}
\usepackage{setspace}
\usepackage{float}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{tkz-euclide}
\makeatletter%%%%%%centers figures
\g@addto@macro\@floatboxreset\centering
\makeatother
\begin{document}
\begin{figure}[H]
\begin{subfigure}{0.3\textwidth}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.5,0){B}
\tkzDrawCircle[blue](A,B)
\tkzDrawPoints(A,B)
\tkzLabelPoints(A,B)
\tkzDrawSegment[red](A,B)
\end{tikzpicture}
\caption{}
\end{subfigure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{subfigure}{0.3\textwidth}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.5,0){B}
\tkzDrawCircle[green](B,A)
\tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{D}
\tkzCompass[color=blue, thick](A,C)
\tkzDrawPoints(A,B)
\tkzLabelPoints(A,B)
\tkzDrawSegment[red](A,B)
\end{tikzpicture}
\caption{}
\end{subfigure}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{subfigure}{0.3\textwidth}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.5,0){B}
\tkzInterCC(A,B)(B,A) \tkzGetPoints{C}{D}
\tkzCompass[color=blue, thick](A,C)
\tkzCompass[color=green, thick](B,C)
\tkzDrawPoints(A,B,C)
\tkzLabelPoints(A,B)
\tkzLabelPoints[above](C)
\tkzDrawSegments[red](A,B A,C B,C)
\end{tikzpicture}
\caption{}
\end{subfigure}
\caption{}
\end{figure}
\end{document}