我正在使用beamerposter
包,我已经调整了 beamerblock,使列对齐并具有正确的间距。但是 itemize 现在从左侧块的边缘延伸到右侧的边缘。我可以使用以下方法解决左边距问题:
\addtolength{\leftmargini}{2.5em}
但似乎无法对右边距做任何事情。有什么建议吗?我的块设置为:
\setbeamertemplate{block begin}{
\vskip.75ex
\begin{beamercolorbox}[leftskip=1cm,sep=.75ex]{block title}%
\usebeamerfont*{block title}\insertblocktitle
\end{beamercolorbox}%
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[sep=.75ex,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\setbeamertemplate{block end}{
\end{beamercolorbox}
}
答案1
您可以使用-s 或填充来minipage
实现这一点。minipage
hspace
\documentclass{beamer}
\setbeamertemplate{block begin}{
\vskip.75ex
\begin{beamercolorbox}[leftskip=1cm,sep=.75ex]{block title}%
\usebeamerfont*{block title}\insertblocktitle
\end{beamercolorbox}%
{\ifbeamercolorempty[bg]{block body}{}{\nointerlineskip\vskip-0.5pt}}%
\usebeamerfont{block body}%
\begin{beamercolorbox}[sep=.75ex,vmode]{block body}%
\ifbeamercolorempty[bg]{block body}{\vskip-.25ex}{\vskip-.75ex}\vbox{}%
}
\setbeamertemplate{block end}{
\end{beamercolorbox}
}
\usepackage{beamerposter}
\usepackage{lipsum}
\begin{document}
\begin{frame}
\begin{itemize}
\item \lipsum[1]
\item \lipsum[2]
\end{itemize}
\addtolength{\leftmargini}{2.5cm}
\begin{itemize}
\item \lipsum[1]
\item \lipsum[2]
\end{itemize}
\addtolength{\leftmargini}{-2.5cm}
\newlength{\mylength}
\setlength{\mylength}{\hsize}
\addtolength{\mylength}{-5cm}
\begin{minipage}{2.5cm}\hfill\end{minipage}
\begin{minipage}{\mylength}
\begin{itemize}
\item \lipsum[1]
\item \lipsum[2]
\end{itemize}
\end{minipage}
\begin{minipage}{2.5cm}\hfill\end{minipage}
\hspace{2.5cm}
\begin{minipage}{\mylength}
\begin{itemize}
\item \lipsum[1]
\item \lipsum[2]
\end{itemize}
\end{minipage}
\end{frame}
\end{document}