
Estoy intentando crear un nuevo entorno en mi preámbulo que colocará un espacio encima y debajo de cada centro del diagrama y
\documentclass{book}
\usepackage{blindtext}
\usepackage{tikz}
\usepackage{tkz-euclide}
\newenvironment{proposition}
{\begin{center}\em}
{\end{center}}
%\newenvironment{diagram}
%\vspace*{\fill}
%{\begin{center}\em}
%{\end{center}}
%\vspace*{\fill}
\begin{document}
\begin{proposition}
On a given finite right line (AB) to construct an equilateral triangle.
\end{proposition}
%\begin{diagram}
\begin{tikzpicture}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.25,0){B}
\tkzDrawSegment(A,B)
\tkzLabelPoint[left](A){$A$}
\tkzLabelPoint[right](B){$B$}
\end{tikzpicture}
%\end{diagram]
\end{document}
Creo que estoy haciendo todo de manera incorrecta ya que sin el entorno funciona bien, ¿alguna pista? No puedo encontrar ningún ejemplo por ahí. He escondido los bits que estropean el código.
Respuesta1
Pruebe este código para centrar tikzpicture
y agregar espacio antes y después.
\documentclass{book}
\usepackage{blindtext}
\usepackage{tikz}
\usepackage{tkz-euclide}
\newenvironment{proposition}
{\begin{center}\em}
{\end{center}}
\newenvironment{diagram}
{\begin{center}\vspace*{10pt}\begin{tikzpicture}}
{\end{tikzpicture}\vspace*{-5pt}\end{center}}
\begin{document}
\begin{proposition}
On a given finite right line (AB) to construct an equilateral triangle.
\end{proposition}
\begin{diagram}
\tkzDefPoint(0,0){A}
\tkzDefPoint(1.25,0){B}
\tkzDrawSegment(A,B)
\tkzLabelPoint[left](A){$A$}
\tkzLabelPoint[right](B){$B$}
\end{diagram}
Some text.
\end{document}