
我正在編寫一個兩列的文檔,我想添加一些浮動文字方塊。我可以使用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
在文字方塊的開頭,重置縮排和正常(挑剔)空白控制項。