I'd like to reduce the blank space between a figure that I generate via tikz
and enumaration
environment.
\documentclass{article}
\usepackage{tikz}
\usepackage{enumitem}[nosep]
\newcommand{\zerodisplayskips}{%
\setlength{\abovedisplayskip}{0pt}%
\setlength{\belowdisplayskip}{0pt}%
\setlength{\abovedisplayshortskip}{0pt}%
\setlength{\belowdisplayshortskip}{0pt}}
\setlength\parindent{0pt}
\begin{document}
\begin{figure}[!h]
\begin{tikzpicture}[
thick,acteur/.style={ circle,fill=black,thick,inner sep=1pt,minimum size=0.3cm
},font = \scriptsize
]
\node (0) at (0,0) [acteur]{};
\node (1) at (1,-2) [acteur]{};
\node (2) at (2,0) [acteur]{};
\foreach \from/\to in {0/1, 0/2, 1/2} \draw[thick](\from) -- (\to);
\end{tikzpicture}
\end{figure}
\begin{enumerate}
\item A
\item B
\end{enumerate}
\end{document}
I have updated all displayskip
s, however, there seems like a redundant space. In the original document, it looks quite bizarre.
\label
without a\caption
does not really make sense. Did you remove the\caption
for the MWE or is there no caption in your actual document?\label
.\zerodisplayskips
command (which this example does not do). the enumerate is in the main document flow but you have specified that the tikz is in a float so is taken out of the flow and is an insert that may be inserted to help with page breaking, so there isn't really a define space between these things, but perhaps you are looking for\intextsep
which is the space added if the float is positioned usingh
figure
environment.\setlength{\intextsep}{0mm}
actually has solved my problem. If you share this as an answer, I can go ahead and accept it.