我想将两个tcolorbox
es 并排放在 beamer 文档中。我习惯tcbraster
将页面分成两部分。但是,这两个tcolorbox
es 一个在另一个之下,而不是并排。奇怪的是,我设法对“简介”和“意义”框执行了我想要的操作,但对附图中的“单元格”和“Demes”框却无法执行。
我究竟做错了什么?
\documentclass{beamer}
\usepackage[size=a2,orientation=portrait,scale=1.3]{beamerposter}
\setbeamersize{text margin left=5mm,text margin right=5mm}
\RequirePackage{enumitem}
\RequirePackage[normalem]{ulem}
\RequirePackage{etoolbox}
\usepackage[skins,most]{tcolorbox}
\tcbuselibrary{skins,raster}
\usepackage{adjustbox}
\newtcolorbox{mybox}[1]{colback=white,colframe=ICOrange, coltext=ICDeepBlue, arc=3mm, title=#1}
\newtcolorbox{ghostbox}[1][]{%
colback=white,
colframe=white,
coltext=ICDeepBlue,
#1%
}
\usepackage{graphicx}
\usepackage{caption}
\graphicspath{ {./images/} }
\begin{document}
\begin{frame}[fragile=singleslide,t]\centering
\maketitle
\begin{mybox}{Introduction}
\begin{tcbraster}[raster columns=2]
\begin{ghostbox}
\begin{itemize}
\item For the principle of competitive-exclusion...
\item Plankton ...
\item Biophysical models have been recently...
\item Spatial heterogeneity...
\end{itemize}
\end{ghostbox}
\begin{mybox}{Significance: Modelling Plankton Biodiversity}
\begin{figure}
\includegraphics[width=\hsize]{significance.pdf}
\end{figure}
\end{mybox}
\end{tcbraster}
\begin{mybox}{Research Questions:}
\begin{itemize}
\item \textbf{How can microbial coexistence emerge in a resource-limited ecosystem ?}
\item \textbf{Can spatial heterogeneity in the plankton structure account for emergence of coexistence ?}
\end{itemize}
\end{mybox}
\end{mybox}
\begin{mybox}{Methods}
\begin{itemize}
\item Investigate a biophysical model and implement a computer simulation in MATLAB.
\item Assume ...
\end{itemize}
\begin{tcbraster}[raster column skip=0.1\columnwidth]
\begin{mybox}{Cells}
\begin{itemize}
\item Every species occupies point in the space of resource consumption
\end{itemize}
\begin{figure}
\includegraphics[width=\hsize]{respace.pdf}
\end{figure}
\begin{itemize}
\item Every species, $\sigma$ ...
\item To account for trade-offs...
\item Monod function: $r_i(c_i) = \frac{c_i}{k_i + c_i}$
\end{itemize}
\end{mybox}
\begin{mybox}{Demes}
\begin{figure}
\includegraphics[width=\hsize]{demes.pdf}
\end{figure}
\begin{itemize}
\item The ecosystem...
\item Nutrients...
\item Nutrients...
\end{itemize}
\end{mybox}
\end{tcbraster}
\end{mybox}
\end{frame}
\end{document}
答案1
您的两个并排 tcolorbox 问题可以简化为以下 MWE。第一帧包含简化的 MWE。在第二帧中,我删除了两个框之间的空白行。如果您希望框顶部对齐而不是垂直居中,您可以添加raster valign=top
第三帧中所示的选项:
\documentclass{beamer}
\usepackage[size=a2,orientation=portrait,scale=1.3]{beamerposter}
\setbeamersize{text margin left=5mm,text margin right=5mm}
\usepackage[skins,most]{tcolorbox}
\tcbuselibrary{skins,raster}
\newtcolorbox{mybox}[1]{colback=white,colframe=orange, coltext=blue, arc=3mm, title=#1}
\usepackage{lipsum}
\begin{document}
\begin{frame}[fragile=singleslide,t]\centering
\begin{tcbraster}[raster column skip=0.1\columnwidth]
\begin{mybox}{Cells}
\lipsum[1]
\end{mybox}
\begin{mybox}{Demes}
\lipsum[4]
\end{mybox}
\end{tcbraster}
\end{frame}
\begin{frame}[fragile=singleslide,t]\centering
\begin{tcbraster}[raster column skip=0.1\columnwidth]
\begin{mybox}{Cells}
\lipsum[1]
\end{mybox}
%
\begin{mybox}{Demes}
\lipsum[4]
\end{mybox}
\end{tcbraster}
\end{frame}
\begin{frame}[fragile=singleslide,t]\centering
\begin{tcbraster}[raster column skip=0.1\columnwidth,raster valign=top]
\begin{mybox}{Cells}
\lipsum[1]
\end{mybox}
%
\begin{mybox}{Demes}
\lipsum[4]
\end{mybox}
\end{tcbraster}
\end{frame}
\end{document}
与对齐问题无关:但我已删除该enumitem
包,因为它与文档类不兼容beamer
。