
Estou tentando criar um novo ambiente no meu preâmbulo que colocará um espaço acima e abaixo do centro de cada diagrama e
\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}
Acho que estou fazendo tudo da maneira errada, pois sem o ambiente tudo fica bem, alguma dica? Não consigo encontrar nenhum exemplo por aí. Eu escondi os bits que atrapalham o código.
Responder1
Experimente este código para centralizar tikzpicture
e adicionar espaço antes e depois.
\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}