浮動小頁中的縮排

浮動小頁中的縮排

我正在編寫一個兩列的文檔,我想添加一些浮動文字方塊。我可以使用minipage嵌套在figure*環境中的環境來執行此操作。但是,這會破壞縮排:

\documentclass{article}
\usepackage{mwe}
\usepackage{multicol}
\usepackage{framed}

\begin{document}

\begin{figure*}
    \begin{framed}
      \begin{center}
        \Large \textbf{Callout Title}
      \end{center}

      \begin{multicols}{2}
        One paragraph of text in the callout.

        \indent A second paragraph of text in the callout. This should be indented!

        \includegraphics[width=\linewidth]{example-image-a}
      \end{multicols}

    \end{framed}

\end{figure*}

\begin{multicols}{2}
\noindent \blindtext

\end{multicols}

\end{document}

無論我是否包含該\indent命令,文字方塊中的第二段都保持齊平,而不是縮排:

在此輸入影像描述

如何在浮動迷你頁中獲得正常的段落縮排?

答案1

Latex\@arrayparboxrestore以浮點數(以及 minipages 和 parboxes 以及陣列 p 列)運行,這會重置一些內容,包括縮排:

\def\@arrayparboxrestore{%
  \let\if@nobreak\iffalse
  \let\if@noskipsec\iffalse
  \let\par\@@par
  \let\-\@dischyph
  \let\'\@acci\let\`\@accii\let\=\@acciii
  \parindent\z@ \parskip\z@skip
  \everypar{}%
  \linewidth\hsize
  \@totalleftmargin\z@
  \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip
  \parfillskip\@flushglue \lineskip\normallineskip
  \baselineskip\normalbaselineskip
  \sloppy}

所以你可能想要

\setlength\parindent{15pt}\fussy

在文字方塊的開頭,重置縮排和正常(挑剔)空白控制項。

相關內容