![Beamer tcolorbox 框从上到下呈现,而不是从侧到边呈现](https://linux22.com/image/414177/Beamer%20tcolorbox%20%E6%A1%86%E4%BB%8E%E4%B8%8A%E5%88%B0%E4%B8%8B%E5%91%88%E7%8E%B0%EF%BC%8C%E8%80%8C%E4%B8%8D%E6%98%AF%E4%BB%8E%E4%BE%A7%E5%88%B0%E8%BE%B9%E5%91%88%E7%8E%B0.png)
我正在尝试让两个tcolorbox
元素并排显示在等高框中。昨天这个功能还可以,但由于某种原因,在我可能对演示文稿的其他部分进行了更改后,它不再起作用了。现在的情况是,无论我在其中放入多少文本,框都会一个在另一个之上显示。我该如何解决这个问题?
\documentclass{beamer}
\mode<presentation>
{
% \usetheme{default} % or try Darmstadt, Madrid, Warsaw, ...
% \usecolortheme{default} % or try albatross, beaver, crane, ...
% \usefonttheme{default} % or try serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{verbatim}
\usepackage{tikz}
\usetikzlibrary{arrows, arrows.meta,
backgrounds,
calc,
decorations.pathmorphing,
patterns, positioning,
quotes,
shapes,
tikzmark
}
\usetikzlibrary{overlay-beamer-styles}
\usepackage{tcolorbox}
\tcbuselibrary{raster}
\tcbuselibrary{theorems}
\usepackage{makecell} %for the thead command to break up header
%\usepackage{fourier,erewhon}
%\usepackage{amssymb, amsbsy}
\usepackage{array, booktabs, longtable}
\usepackage{graphicx}
%\usepackage[x11names, table]{xcolor}
\usepackage{caption}
\begin{document}
\section{Problem Setup, History, \& Our Result: A Snapshot}
\begin{frame}[t]{Applications: A Partial List}
\tcbset{width=(\linewidth-1mm)/2,before=,after=\hfill,arc=0mm,
colframe=blue!30,colback=yellow!25,fonttitle=\bfseries}
\begin{tcolorbox}[equal height group=A, adjusted title = {title 1}]
\begin{itemize}
\item first
\item second
\end{itemize}
\end{tcolorbox} \begin{tcolorbox}[equal height group=A, rounded corners, adjusted title = {Title}]
\begin{itemize}
\item first
\item second
\end{itemize}
\end{tcolorbox}
\end{frame}
\end{document}
答案1
以下是我在 leandriis 的评论帮助下修复此问题的方法。
\documentclass{beamer}
\mode<presentation>
{
% \usetheme{default} % or try Darmstadt, Madrid, Warsaw, ...
% \usecolortheme{default} % or try albatross, beaver, crane, ...
% \usefonttheme{default} % or try serif, structurebold, ...
\setbeamertemplate{navigation symbols}{}
\setbeamertemplate{caption}[numbered]
}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{verbatim}
\usepackage{tikz}
\usetikzlibrary{arrows, arrows.meta,
backgrounds,
calc,
decorations.pathmorphing,
patterns, positioning,
quotes,
shapes,
tikzmark
}
\usetikzlibrary{overlay-beamer-styles}
\usepackage{tcolorbox}
\tcbuselibrary{raster}
\tcbuselibrary{theorems}
\usepackage{makecell} %for the thead command to break up header
%\usepackage{fourier,erewhon}
%\usepackage{amssymb, amsbsy}
\usepackage{array, booktabs, longtable}
\usepackage{graphicx}
%\usepackage[x11names, table]{xcolor}
\usepackage{caption}
\begin{document}
\section{Problem Setup, History, \& Our Result: A Snapshot}
\begin{frame}[t]{Applications: A Partial List}
\tcbset{width=(\linewidth-1mm)/2,before=,after=\hfill,arc=0mm,
colframe=blue!30,colback=yellow!25,fonttitle=\bfseries}
\begin{tcolorbox}[equal height group=A, adjusted title = {title}]
\begin{itemize}
\item first
\item second
\end{itemize}
\end{tcolorbox}%
%\end{column}
%\begin{column}{.48\textwidth}
\begin{tcolorbox}[equal height group=A, adjusted title = {title}]
\begin{itemize}
\item first
\item second
\end{itemize}
\end{tcolorbox}
\end{frame}
\end{document}