使用 Metropolis Beamer 主题时,我缺少正确的内部块填充。它似乎与块内的列表特别相关。示例来源:
\documentclass{beamer}
\usetheme{metropolis}
\metroset{block=fill}
\begin{document}
\begin{frame}{Frame title}
\begin{block}{Block title}
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet posuere enim, a feugiat risus. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Quisque fringilla faucibus leo, quis aliquam augue porta vel. Nullam sit amet mauris aliquam, sodales eros a, pharetra neque. Aenean in quam eu metus fringilla porta. Ut at dolor massa.
\end{itemize}
\end{block}
\end{frame}
\end{document}
该来源产生以下结果,其中单词“In”几乎触及右块边缘:
现场演示:https://www.overleaf.com/7135396712dmpdvdwdbbtk#dcc769
有没有办法增加右侧块填充以避免这种情况?我甚至不介意将整个列表稍微向左移动,因为对于第一级项目来说,项目符号前的水平空间似乎没有必要那么大。
答案1
你可以改用 moloch 主题。它是 metropolis 主题的现代化分支,可以自动避免此问题:
% !TeX TS-program = lualatex
\documentclass{beamer}
\usetheme{moloch}% modern fork of the metropolis theme
\molochset{block=fill}
\usepackage{fontspec}
\setsansfont{Fira Sans Light}
\begin{document}
\begin{frame}
\frametitle{Frame title}
\begin{block}{Block title}
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet posuere enim, a feugiat risus. In hac habitasse platea dictumst. In hac habitasse platea dictumst. Quisque fringilla faucibus leo, quis aliquam augue porta vel. Nullam sit amet mauris aliquam, sodales eros a, pharetra neque. Aenean in quam eu metus fringilla porta. Ut at dolor massa.
\end{itemize}
\end{block}
\end{frame}
\end{document}
如果您确实必须使用过时的 Metropolis 主题,则可以将其与tcolorbox
内部主题结合使用。这将用 tcolorboxes 替换 Metropolis 中的块。这可以避免该问题,此外还允许您轻松修改填充:
% !TeX TS-program = lualatex
\documentclass{beamer}
\usetheme{metropolis}
\metroset{block=fill}
\useinnertheme{tcolorbox}
\begin{document}
\begin{frame}
\frametitle{Frame title}
\begin{block}{Block title}
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet posuere enim, a feugiat risus. In hac habitasse platea \end{itemize}
\end{block}
\tcbsetforeverylayer{
right=0.3cm
}
\begin{block}{Block title}
\begin{itemize}
\item Lorem ipsum dolor sit amet, consectetur adipiscing elit. In sit amet posuere enim, a feugiat risus. In hac habitasse platea \end{itemize}
\end{block}
\end{frame}
\end{document}