我正在尝试使用 创建海报beamerposter
,我希望两个框的高度固定,以便它们均匀对齐。到目前为止,我通过使用minipage
具有固定高度的环境实现了这一点。但是,我最近意识到,itemize
内部的环境minipage
具有明显不同的布局,即结构悬挂在边距内(leftskip
,正常行为)或不悬挂(在 之后开始leftskip
,在新的 内的行为minipage
)。
如何才能保证a的高度beamercolorbox
而不破坏环境的正常布局itemize
?
\begin{filecontents}{beamerthememorikyoto-slide.sty}
\ProvidesPackage{beamerthememorikyoto-slide}
% this style is derived from I6pd2 created by Thomas Deselaers an Philippe Dreuw
\mode<presentation>
\setbeamercolor{headline}{fg=blue,bg=white}
\setbeamercolor{footline}{bg=blue,fg=white}
\setbeamerfont {footline}{size=\large,series=\tt}
\setbeamercolor{author in head/foot}{bg=blue,fg=white}
\setbeamercolor{title in head/foot}{bg=blue,fg=white}
\setbeamercolor{separation line}{bg=blue}
\setbeamercolor{title in headline}{fg=blue}
\setbeamercolor{author in headline}{fg=blue!90}
\setbeamercolor{institute in headline}{fg=blue!80}
\setbeamercolor*{normal text}{fg=blue ,bg=blue!30!white!50!black}
\setbeamercolor*{block body} {fg=blue!70!black,bg=white}
\setbeamercolor*{block title}{bg=blue ,fg=white}
\setbeamerfont{block title}{size=\large,series=\bf}
\setbeamercolor{upper separation line head}{bg=blue}
\setbeamercolor{lower separation line head}{bg=blue}
\setbeamercolor{upper separation line foot}{bg=red}
\setbeamercolor{lower separation line foot}{bg=red}
\setbeamercolor{lower separation line}{bg=red}
\setbeamercolor{structure}{fg=red}
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{navigation symbols}{} % no navigation on a poster
\setbeamertemplate{caption}[numbered] % enumerated figures, tables
% Controls heading of the block
\newlength{\boxwidth}
\setbeamertemplate{block begin}{%
\begin{minipage}{\linewidth}
\begin{beamercolorbox}[ht=4.5ex,
dp=0.5ex,
leftskip=0.5em,
colsep=1.0ex,
]{block title}%
\usebeamerfont*{block title}%
{\insertblocktitle\phantom{Gg}}% phantom because of baseline problem
\end{beamercolorbox}
\begin{beamercolorbox}[leftskip=1em,
rightskip=1em,
colsep=1.0ex,
sep=0.5ex,
vmode
]{block body}%
\usebeamerfont{block body}%
\setlength{\boxwidth}{\linewidth}
\addtolength{\boxwidth}{-\leftskip}
\addtolength{\boxwidth}{-\rightskip}
}
% Controls how the block is terminated
\setbeamertemplate{block end}{
\end{beamercolorbox}%
\nointerlineskip
\begin{beamercolorbox}[ht=2pt]{lower separation line}
\end{beamercolorbox}
\end{minipage}\par
}
\setbeamertemplate{headline}{
\leavevmode
\begin{beamercolorbox}[wd=\paperwidth]{headline}
\parbox[c]%options
{0.69\paperwidth}{%
\vskip6ex
\raggedleft
\usebeamercolor{title in headline}{\color{fg}\textbf{\huge{\inserttitle}}\\[2ex]}
\usebeamercolor{author in headline}{\color{fg}\large{\insertauthor}\\[1ex]}
\usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
\vskip2ex
}\hfill%
\parbox[c]%options
{0.30\paperwidth}{%
\centering
\rule{0.8\linewidth}{10ex}
}
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth,ht=2pt]{lower separation line head}
\end{beamercolorbox}\par
}
\setbeamertemplate{footline}{
\begin{beamercolorbox}[wd=\paperwidth,ht=2pt]{upper separation line foot}
\end{beamercolorbox}
\leavevmode%
\begin{beamercolorbox}[ht=5ex,dp=0.5ex,center]{author in head/foot}%
credentials\hfill\LaTeX
\vskip1ex
\end{beamercolorbox}
\vskip0pt%
\begin{beamercolorbox}[wd=\paperwidth,ht=2pt]{lower separation line foot}
\end{beamercolorbox}
}
\mode<all>
% adapt height of imtemize rectangles
\setbeamertemplate{itemize items}[triangle]
\setbeamertemplate{itemize item}{\raisebox{0.12ex}{$\blacktriangleright$}\hskip0.1em}
\setbeamertemplate{itemize subitem}{\raisebox{0.12ex}{$\triangleright$}\hskip0.1em}
% equal font sizes for all levels
\setbeamerfont{itemize/enumerate body}{size=\normalsize}
\setbeamerfont{itemize/enumerate subbody}{size=\normalsize}
\setbeamerfont{itemize/enumerate subsubbody}{size=\normalsize}
\end{filecontents}
\documentclass[final]{beamer}
\mode<presentation>{\usetheme{morikyoto-slide}}
\usepackage[orientation=landscape,size=a3,scale=2,debug]{beamerposter}
\usepackage{multicol}
\title{\texorpdfstring{%
complicated title}{% with some markup
complicated title} % without the markup
}
\author[short author%
]{\texorpdfstring{%
Author 1,* Author 2,+}{% with indicators
Author 1, Author 2, } % without indicators
}
\institute[univ.%
]{\texorpdfstring{%
*University, +University}{% with ind
University, University} % without ind
}
\date{somewhere, sometime}
\begin{document}
% The contents of the whole poster must fit into one frame
% The header (and footer) of the poster is defined in the style template
\begin{frame}[t]{}
\setlength{\columnsep}{0.02\textwidth}
\begin{multicols}{2}
\begin{block}{Foo}
\begin{itemize}
\item test
\begin{itemize}
\item test
\end{itemize}
\end{itemize}
\begin{minipage}[t][0.1\paperheight][c]{\boxwidth}
\begin{itemize}
\item test
\begin{itemize}
\item test
\end{itemize}
\end{itemize}
\end{minipage}
\end{block}
\columnbreak
\begin{block}{Bar}
\begin{itemize}
\item test
\end{itemize}
\begin{minipage}[t][0.1\paperheight][c]{\boxwidth}
\begin{itemize}
\item test
\end{itemize}
\end{minipage}
\end{block}
\end{multicols}
\end{frame}
\end{document}
答案1
这个问题可以通过以下方式解决:
不使用你的
\boxwidth
,但只是\textwidth
删除
minipage
整个块周围不必要的层并且不会影响默认长度
beamercolorbox
\documentclass{beamer}
\setbeamercolor*{normal text}{fg=blue ,bg=blue!30!white!50!black}
\setbeamercolor*{block body} {fg=blue!70!black,bg=white}
\setbeamercolor*{block title}{bg=blue ,fg=white}
\setbeamercolor{lower separation line}{bg=red}
\setbeamertemplate{block begin}{%
\begin{beamercolorbox}[ht=4.5ex,
dp=0.5ex,
leftskip=0.5em,
colsep=1.0ex,
]{block title}%
\usebeamerfont*{block title}%
{\insertblocktitle\phantom{Gg}}% phantom because of baseline problem
\end{beamercolorbox}
\begin{beamercolorbox}[%
% leftskip=1em,
% rightskip=1em,
% colsep=1.0ex,
% sep=0.5ex,
% vmode,
]{block body}%
\usebeamerfont{block body}%
}
% Controls how the block is terminated
\setbeamertemplate{block end}{
\end{beamercolorbox}%
\nointerlineskip
\begin{beamercolorbox}[ht=2pt]{lower separation line}
\end{beamercolorbox}
}
\begin{document}
\begin{frame}[t]
\begin{columns}[onlytextwidth]
\begin{column}{.45\textwidth}
\begin{block}{Foo}
\begin{itemize}
\item test
\begin{itemize}
\item test
\end{itemize}
\end{itemize}
\end{block}
\end{column}
\begin{column}{.45\textwidth}
\begin{block}{Bar}
\begin{itemize}
\item test
\end{itemize}
\end{block}
\end{column}
\end{columns}
\vfill
\begin{columns}[onlytextwidth]
\begin{column}{.45\textwidth}
\begin{block}{Foo}
\begin{minipage}[t][0.2\paperheight][c]{\textwidth}
\vskip-\baselineskip
\begin{itemize}
\item test
\begin{itemize}
\item test
\end{itemize}
\end{itemize}
\end{minipage}
\end{block}
\end{column}
\begin{column}{.45\textwidth}
\begin{block}{Bar}
\begin{minipage}[t][0.2\paperheight][c]{\textwidth}
\vskip-\baselineskip
\begin{itemize}
\item test
\end{itemize}
\end{minipage}
\end{block}
\end{column}
\end{columns}
\end{frame}
\end{document}