I am doing this paper with the tikz picture tools to draw some diagrams and the wrapfigure enviroment to situate them in the text.
The problem is that when I run the code, the picture is placed below what I would like, leaving a space between the first line of text and the picture. It seems to me that this space has the same width as a text line.
My code and my document is here:
\documentclass[final, 12pt,oneside]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[spanish]{babel}
\usepackage{amsmath} % American Mathematics Society standards
\usepackage{graphicx} % Extended graphics package.
\usepackage{amsxtra}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{ dsfont }
\usepackage{latexsym}
\usepackage{spverbatim}
\usepackage{enumitem}
\usepackage{hyperref}
\usepackage{biblatex}
\usepackage{csquotes}
%BIBLIOGRAFÍA
\addbibresource{bibliografia.bib}
\topmargin = -0.56in
\textheight = 8.60in
\textwidth = 6.46in
\oddsidemargin = 0.02in
%TEOREMAS
\newtheorem{theorem}{Theorem}[section]
\newtheorem{prop}{Proposición}
\newtheorem{corollary}{Corollary}[theorem]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem*{remark}{Observación}
\newtheorem{exmp}{Ejemplo}[section]
\def\proof{\paragraph{Demostraci\'on:\\}}
\def\endproof{\hfill$\square$}
\theoremstyle{definition}
\newtheorem{definition}{Definición}[chapter]
%WRAPFIGURE
\usepackage{wrapfig}
\usepackage{adjustbox}
%TIKZ
\usepackage{tikz}
\usepackage{tkz-euclide}
\usetikzlibrary{shapes.geometric, arrows, angles, intersections, calc, math, quotes}
\usetikzlibrary{babel}
%COLORES
\usepackage{xcolor}
\definecolor{gualda}{RGB}{250,194,43}
\definecolor{rred}{RGB}{212,42,32}
\definecolor{bblue}{RGB}{14,99,142}
%ESPACIOS
\setlength{\parskip}{0.5 em}
\setlength{\baselineskip}{1.5 em}
\begin{document}
\noindent \textsc{Axiomas de Ordenación:}\par
\noindent \textbf{B1.} Si $B$ está entre $A$ y $C$, (escrito como $A*B*C$), entonces $A$, $B$, $C$ son tres puntos distintos que pertenecen a la misma recta, y también $C*B*A$.\par
\noindent \textbf{B2.} Para cualquiera dos puntos distintos $A$, $B$, existe un punto $C$ tal que $A*B*C$.\par
\noindent \textbf{B3.} Dados $A$, $B$, $C$, tres puntos distintos en una recta, uno y sólo uno de ellos está entre los otros dos. Es decir: $A*B*C$, o bien $A*C*B$, o bien $B*A*C$.\par
\begin{wrapfigure}[5]{r}{0pt}
\begin{tikzpicture}[>=stealth]
\coordinate (A) at (-1.2,0);
\coordinate (B) at (0,2.4);
\coordinate (C) at (3.6,0);
\draw[rred, line width=2.5pt, name path=AC] (A) -- (C);
\draw[bblue, line width=2.5pt, name path=AB] (A) -- (B);
\draw[black, line width=2.5pt, name path=CB] (C) -- (B);
\filldraw[black] (A) circle (2pt) node[anchor=north east]{$A$};
\filldraw[black] (B) circle (2pt) node[anchor=south west]{$B$};
\filldraw[black] (C) circle (2pt) node[anchor= west]{$C$};
\draw[->, gualda, line width=2.5pt, name path=l] (-1.25,2.25) -- node [black, above, near start]{$l$} (0.75,0.25);
\path[name intersections={of=AB and l, by=D}];
\filldraw[black] (D) circle (2pt) node[below=3pt,left=3pt]{$D$};
\end{tikzpicture}
\end{wrapfigure}
\noindent \textbf{B4.} (Axioma de Pasch). Dados $A$,$B$, $C$ tres puntos no alineados, y una recta $l$ que no contiene a ninguno de ellos. Si $l$ contiene a un punto $D$ tal que $A*D*B$, entonces debe contener también un punto entre $A$ y $C$, o bien, un punto entre $B$ y $C$, pero no ambos.
\newpage
\end{document}
However, I have faced this problem before, although not with a tikz picture. Previously I had managed to fix it with a \raisebox before inserting the figure like one user said at this post:
Moving a wrapfig vertically to encroach partially on a subsection title
But the problem is that, apart from all the errors overleaf detects, the arrow of my diagram disappear. I have tried the other solutions in the answer of that post, but it doesn't work it out (\vspace, etc).
Someone knows how to adjust vertically a tikz picture in a wrapfigure enviroment without eliminating the arrows of the diagram? Thanks
chapter
counter inarticle
class.class_diss.cls
but the problem is not there