中心环境旁边的 Wrapfigure

中心环境旁边的 Wrapfigure

我有这个MWE:

\documentclass{beamer}
\usepackage{wrapfig}
\usepackage[orientation=portrait,size=a0,scale=1.5]{beamerposter}

\begin{document}
    \begin{center}
    \makebox[0.95\linewidth][c]{
            \begin{minipage}{0.3\textwidth}
                \begin{center}
                    1
                \end{center}
                \begin{center}
                    2
                \end{center}
                \begin{center}
                    3
                \end{center}
                AAA
                \begin{center}
                    Nanophysics
                \end{center}
                BBB
                \begin{wrapfigure}{r}{0.3\textwidth}
                    \includegraphics[width=0.28\textwidth]{./images/graphen}
                \end{wrapfigure}
                \textbf{Graphene and carbon nanotubes} are materials with extraordinary mechanical and electronic properties. High electron conductivity, linear energy dispersion and relatively long spin relaxation time make them good candidates for replacing silicon in low power electronics and spintronics.
                Our research focuses on spin-orbit interaction in carbon-based systems induced by adatoms, substrate or external fields. Starting from first principle calculations we develop realistic theoretical models describing the underlying physics.
            \end{minipage}
        }
    \end{center}
\end{document}

我想让文本环绕graphen。上面的代码没有产生良好的效果。但是,如果你center像这样注释掉 inner :

%\begin{center}
    Nanophysics
%\end{center}

它开始按预期工作。

知道发生什么事了吗?

编辑:

samcarter 提供了一个有效的解决方法。尽管如此,如果有更多\begin{center}...\end{center}块(比如我在纳米物理部分上方添加的块),重写所有块就会成为一个问题。

另外,出于纯粹的好奇心,也许有人知道到底是什么原因有这样的行为吗?

答案1

解决方法:

\documentclass{beamer}
\usepackage{wrapfig}
\usepackage[orientation=portrait,size=a0,scale=1.5]{beamerposter}

\begin{document}
    \begin{center}
    \makebox[0.95\linewidth][c]{
            \begin{minipage}{0.3\textwidth}
                AAA

                \makebox[\textwidth][c]{Nanophysics}

                BBB

                \begin{wrapfigure}{r}{0.3\textwidth}
                    \includegraphics[width=0.28\textwidth]{example-image}
                \end{wrapfigure}
                \textbf{Graphene and carbon nanotubes} are materials with extraordinary mechanical and electronic properties. High electron conductivity, linear energy dispersion and relatively long spin relaxation time make them good candidates for replacing silicon in low power electronics and spintronics.
                Our research focuses on spin-orbit interaction in carbon-based systems induced by adatoms, substrate or external fields. Starting from first principle calculations we develop realistic theoretical models describing the underlying physics.
            \end{minipage}
        }
    \end{center}
\end{document}

在此处输入图片描述

答案2

有记录显示wrapfig它不应该在列表附近使用(并且center它是一个列表。在这种情况下,您只需要在后面加上一个空行BBB就可以了,但我会将标记简化一点:

在此处输入图片描述

\documentclass{beamer}
\usepackage{wrapfig}
\usepackage[orientation=portrait,size=a0,scale=1.5]{beamerposter}

\begin{document}
\centering
\begin{minipage}{.3\linewidth}
                \begin{center}

                    1

                    2

                    3
                \end{center}
                AAA
                \begin{center}
                    Nanophysics
                \end{center}
                BBB

                \begin{wrapfigure}{r}{0.3\textwidth}
                    \includegraphics[width=0.28\textwidth]{example-image}
                \end{wrapfigure}
                \textbf{Graphene and carbon nanotubes} are materials with extraordinary mechanical and electronic properties. High electron conductivity, linear energy dispersion and relatively long spin relaxation time make them good candidates for replacing silicon in low power electronics and spintronics.
                Our research focuses on spin-orbit interaction in carbon-based systems induced by adatoms, substrate or external fields. Starting from first principle calculations we develop realistic theoretical models describing the underlying physics.
\end{minipage}
\end{document}

相关内容