Рисунки не центрированы между абзацами.

Рисунки не центрированы между абзацами.

Я использую свои float с [h]. Когда я использую эту команду:

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

он устанавливает разделение между текстом выше и рисунком на 0, но не между рисунком и абзацем послесловия. Я также пробовал ничего не менять и загрузить пакет parskip. Не сработало. Я видел много вопросов по этой теме, но ни одного реального ответа... Мои рисунки не очень хорошо центрированы между текстом...

\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}

решение1

Спекулировать без MWE, но вот так...

Если вы установите \intextsepзначение ноль, вы все равно получите межстрочный интервал после вашей цифры. Вы можете отключить это, установив \prevdepthзначение -1000pt(см. главу 15TeX по теме).

\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}

нет места

Трудно придумать вескую причину для этого.

Связанный контент