Las figuras no están bien centradas entre párrafos.

Las figuras no están bien centradas entre párrafos.

Utilizo mis flotadores con [h]. Cuando uso este comando:

\setlength{\intextsep}{0pt plus 0pt minus 0pt}

establece la separación entre el texto anterior y la figura en 0, pero no entre la figura y el párrafo posterior. También intenté no cambiar nada y cargar el parskippaquete. No funcionó. He visto muchas preguntas sobre este tema pero no hay una respuesta real... Mis figuras no están bien centradas entre el texto...

\documentclass[11pt,a4paper,addpoints]{exam}
\unframedsolutions
%\printanswers
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{geometry}
\usepackage{calc}
\usepackage{blindtext}
\newgeometry{left=2cm,top=2cm,right=2cm,bottom=2cm}

\begin{document}
\begin{questions}

This is the upper paragraph which has less space between this text and lower figure.

\begin{figure*}[h]
\begin{tikzpicture}[rounded corners=5mm]
\path node[rectangle,draw=green,fill=green!8,inner sep=.70cm] {\parbox{\textwidth-1.4cm-\fboxrule}{

\question[2] What is the first question?
\begin{solutionorlines}[4cm]
This box is smaller than when the solutions are not printed. How do I make this the same dimension as when answers are not printed?
\end{solutionorlines}
}};
\end{tikzpicture}
\end{figure*}

This is the lower paragraph which has more space between this text and above figure.

\end{questions}
\end{document}

Respuesta1

Especulando sin MWE, pero allá vamos...

Si lo establece \intextsepen cero, aún obtendrá un espacio entre líneas después de su figura. Puede suprimir esto configurándolo \prevdepthen -1000pt(consulte el capítulo 15 deTeX por tema).

\documentclass{article}
\usepackage{lipsum}
\setlength\intextsep{0pt plus 0pt minus 0pt}
\begin{document}
\lipsum[1]
\begin{figure}[h]
\rule{4cm}{4cm}
\end{figure}
\prevdepth=-1000pt
\lipsum[2]
\end{document}

sin espacio

Es difícil pensar en una buena razón para hacer esto.

información relacionada