当将包裹图(由系统放置,而不是我自己放置)放置在 ExSheets 问题旁边时,就会发生这种情况。
这是一个最小的工作示例:
\documentclass[a4paper,10pt]{book}
\usepackage{fontspec}
\usepackage{mdframed}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{wrapfig}
\usepackage{exsheets}
\usepackage{lipsum}
\mdfdefinestyle{noteSty}{backgroundcolor=gray!10, linewidth=0pt, innerleftmargin=1ex, innerrightmargin=1ex, innertopmargin=1ex, innerbottommargin=1ex, innermargin = 0.1cm, outermargin = 0.1cm}
\newcounter{noteCounter}[chapter]
\numberwithin{noteCounter}{chapter}
\newmdtheoremenv[style=noteSty]{note}[noteCounter]{Note}
\SetupExSheets{
headings = block-subtitle ,
subtitle-format = \sc ,
counter-within = {chapter} ,
counter-format = ch.qu[1] ,
label-format = ch.qu[1] ,
headings-format = \bfseries ,
question/pre-hook = \vspace{1ex} ,
question/post-hook = \vspace{1ex} ,
question/pre-body-hook = {\vspace{1ex} \mdframed[innermargin=+1cm,outermargin=+1cm]},
question/post-body-hook = \endmdframed
}
\begin{document}
\lipsum[1-2]
\begin{wrapfigure}{r}{0.6\linewidth}
\begin{note}{Lorem ipsum}
\lipsum[3]
\end{note}
\end{wrapfigure}
\begin{figure}
\includegraphics[width=0.9\linewidth]{lipsum.jpg}
\caption{dolor sit amet}
\label{fig:lipsum}
\end{figure}
\begin{question}
\lipsum[66]
\end{question}
\lipsum[6-7]
\end{document}
这是我在其中使用的虚拟图像(如果您想按原样编译它):
第二页在我看来是这样的:
我正在将 Overleaf 与 LuaLaTex 一起使用。
下面的问题与此类似,但我无法以有效的方式将它们联系起来。
答案1
没什么figure
关联,但能证明这一点就好了。你可以把 和 都exercise
放在snote
里面minipage
。我把minipage
s放在\fbox
es 里面,以说明实际大小。然后,我将下一段与未使用的空间重叠。
\documentclass[a4paper,10pt]{book}
%\usepackage{fontspec}
\usepackage{mdframed}
\usepackage{amsmath}
\usepackage{xcolor}
\usepackage{wrapfig}
\usepackage{exsheets}
\usepackage{lipsum}
\usepackage{showframe}
\mdfdefinestyle{noteSty}{backgroundcolor=gray!10, linewidth=0pt, innerleftmargin=1ex, innerrightmargin=1ex, innertopmargin=1ex, innerbottommargin=1ex, innermargin = 0.1cm, outermargin = 0.1cm}
\newcounter{noteCounter}[chapter]
\numberwithin{noteCounter}{chapter}
\newmdtheoremenv[style=noteSty]{note}[noteCounter]{Note}
\SetupExSheets{
headings = block-subtitle ,
subtitle-format = \sc ,
counter-within = {chapter} ,
counter-format = ch.qu[1] ,
label-format = ch.qu[1] ,
headings-format = \bfseries ,
question/pre-hook = \vspace{1ex} ,
question/post-hook = \vspace{1ex} ,
question/pre-body-hook = {\vspace{1ex} \mdframed[innermargin=+1cm,outermargin=+1cm]},
question/post-body-hook = \endmdframed
}
\begin{document}
\lipsum[1-2]
\begin{figure}
\includegraphics[width=0.9\linewidth]{example-image}
\caption{dolor sit amet}
\label{fig:lipsum}
\end{figure}
\fboxsep=0pt
\noindent\fbox{\begin{minipage}[t]{0.5\textwidth}
\begin{question}
\lipsum[66]
\end{question}
\end{minipage}}\hfill\fbox{\begin{minipage}[t]{0.5\textwidth}
\begin{note}{Lorem ipsum}
\lipsum[3]
\end{note}
\end{minipage}}
\vspace{-2\baselineskip}% overlap minipages
\hangindent=-0.55\textwidth
\hangafter=-2
\lipsum[6-7]
\end{document}