回忆录类的环境marginfigure
似乎与常规环境的行为不同,figure
因为它在放置在文本块中时会引入一个新段落。
这是理想的功能吗?
有没有办法让marginfigure
命令保留在原处而不让它创建新的段落?
梅威瑟:
\documentclass{memoir}
\begin{document}
My first paragraph begins here.
\begin{figure}
\end{figure}
This should be in the same paragraph.
\vspace{1em}
My second paragraph begins here.
\begin{marginfigure}
\end{marginfigure}
This should be in the same paragraph.
\end{document}
答案1
我不能保证在所有情况下这都是安全的,并注意额外添加的%
,但是......
\documentclass{memoir}
\begin{document}
My first paragraph begins here.
\begin{figure}
\end{figure}
This should be in the same paragraph.
\vspace{1em}
My second paragraph begins here.
{\def\par{\let\par\endgraf}\begin{marginfigure}
weee!
\end{marginfigure}}%
This should be in the same paragraph.
\end{document}