在 `cutout` 环境中使用 `equation` 环境

在 `cutout` 环境中使用 `equation` 环境

这是我第一次询问有关 Latex 的问题,所以我不确定何时包含图片以及如何最好地创建 MWE 的惯例。请告诉我是否应该提供更多/更少的详细信息以使我的问题更清楚。

核心问题

cutout我想使用包的环境将包含公式的文本环绕在图形周围cutwin。没有公式时排版工作正常,但只要我插入环境,equation排版就会变得混乱。确切地说,注释掉公式的以下代码工作正常(抱歉没有\lipsum直接使用,但出于某种原因这造成了不同的问题)

\documentclass{article}
\usepackage{amsmath}
\usepackage{cutwin}
\usepackage[utf8]{inputenc}

\begin{document}
    \opencutleft
    \begin{cutout}{5}{0pt}{0.5\textwidth}{10}
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
       vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et ne-
       tus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metu
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
       %\begin{equation*}
       %   a+b=c
       %\end{equation*}
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
       vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et ne-
       tus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metu
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
    \end{cutout}
\end{document}

但方程式却带来了灾难(如图所示)。我尝试过的所有其他数学环境(除了内联数学)中也出现了类似的问题(例如align,,,等等)。由于我不知道这些环境中的放置实际上是如何工作的,所以我不知道该如何解决这个问题。如果能提供任何解决这个问题$$gather想法,我将不胜感激!

更多背景信息

由于这种行为可以在任何其他环境之外看到article,所以我相信问题出在cutout和 的组合上equation。但是,我的实际示例仍然有点复杂,因为我使用了baposter文档类(可以下载这里) 替换为。这也是我使用而不是 的headerbox原因,因为后者似乎与其他环境完全不兼容。所以我的实际 MWE 看起来更像是:cutoutwrapfig

\documentclass[a0paper,portrait]{baposter}

% \usepackage{lmodern}
\usepackage{amsmath}
\usepackage{cutwin}
\usepackage[utf8]{inputenc}

\begin{document}

\begin{poster}
{
grid=false,
headerborder=open, % Adds a border around the header of content boxes
colspacing=1em, % Column spacing
bgColorOne=white, % Background color for the gradient on the left side of the poster
bgColorTwo=white, % Background color for the gradient on the right side of the poster
borderColor=green, % Border color
headerColorOne=green, % Background color for the header in the content boxes (left side)
headerColorTwo=green, % Background color for the header in the content boxes (right side)
headerFontColor=white, % Text color for the header text in the content boxes
boxColorOne=white, % Background color of the content boxes
textborder=rounded, %rectangle, % Format of the border around content boxes, can be: none, bars, coils, triangles, rectangle, rounded, roundedsmall, roundedright or faded
eyecatcher=true, % Set to false for ignoring the left logo in the title and move the title left
headerheight=0.15\textheight, % Height of the header
headershape=rounded, % Specify the rounded corner in the content box headers, can be: rectangle, small-rounded, roundedright, roundedleft or rounded
headershade=plain,
headerfont=\Large\textsf, % Large, bold and sans serif font in the headers of content boxes
%textfont={\setlength{\parindent}{1.5em}}, % Uncomment for paragraph indentation
linewidth=2pt, % Width of the border lines around content boxes
}{}{}{}{}
\headerbox{Test}{name=test, column=0, row=0, span=2}{
    \opencutleft
    \begin{cutout}{5}{0pt}{0.5\textwidth}{10}
        Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
    bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
    Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
    vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et ne-
    tus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metu
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
    bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
    Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec%
    \begin{equation*}
         a+b=c
    \end{equation*}
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
    bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
    Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
    vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et ne-
    tus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metu
    Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
    bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
    Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
    \end{cutout}
}
\end{poster}
\end{document}

我知道这可能没有必要,但我保留了我的海报设置,因为我不知道哪种设置可能与问题相关。

总而言之,我正在寻找一种方法将环境headerbox与可以将文本和方程式环绕图形的东西结合起来,如果有人能给我提供一些想法,我将不胜感激,因为我真的超出了我的深度。

答案1

您可以通过将方程式隐藏在合适宽度的迷你页面中来为 cutwin 提供一些帮助

在此处输入图片描述

\documentclass{article}
\usepackage{amsmath}
\usepackage{cutwin}
\usepackage[utf8]{inputenc}

\begin{document}
    \opencutleft
    \begin{cutout}{5}{0pt}{0.5\textwidth}{10}
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
       vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et ne-
       tus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metu
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec\\
       \begin{minipage}{.5\linewidth}
       \begin{equation*}
          a+b=c
       \end{equation*}         
       \end{minipage}\\
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
       vehicula augue eu neque. Pellentesque habitant morbi tristique senectus et ne-
       tus et malesuada fames ac turpis egestas. Mauris ut leo. Cras viverra metu
       Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut purus elit, vesti-
       bulum ut, placerat ac, adipiscing vitae, felis. Curabitur dictum gravida mauris.
       Nam arcu libero, nonummy eget, consectetuer id, vulputate a, magna. Donec
    \end{cutout}
\end{document}

相关内容