工作示例

工作示例

我正在尝试制作一张 Beamer 海报。我正在为“块”环境定制标题。到目前为止,我遇到的问题是标题文本和块标题栏边缘之间没有足够的垂直填充。

在此处输入图片描述

我正在自定义块标题字体,但当我尝试获取圆角框时出现问题。如果我删除以下行,框将具有足够的填充:

% Use rounded blocks
\setbeamertemplate{blocks}[rounded]

如果我可以手动指定投影仪框标题栏的高度就更好了。除了这个垂直填充问题之外,这些栏并排摆放时看起来很奇怪,因为它们的高度都不一样。

工作示例

文档

\documentclass[]{beamer}
\usepackage[orientation=landscape,size=custom,width=165,height=105,scale=1.47,debug]{beamerposter}
\usetheme{Modified}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\title{Title}
\author[]{Authors}
\institute[]{Institute}
\begin{document}

% beamer has a problem filling vertical space in columns
% have to manually specify column heights 
% 
\newlength{\colheightb}
\setlength{\colheightb}{0.85\paperheight}

\begin{frame}{}
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{.225\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section}
    \end{block} 
    \vfill
}
\end{column}

\begin{column}{.225\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section p}
    \end{block}
    \vfill
}
\end{column}

\begin{column}{.265\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section y}
    \end{block}
    \vfill
}
\end{column}

\begin{column}{.275\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section 4}
    \end{block}
    \vfill
}
\end{column}

\end{columns}
\end{frame}
\end{document}

风格

\usepackage{grffile}
\usepackage{calc}
\usepackage{tcolorbox}  
\usepackage{lmodern}

\DeclareOptionBeamer{compress}{\beamer@compresstrue}
\ProcessOptionsBeamer
\mode<presentation>
\setbeamercolor{section in head/foot}{use=structure,bg=structure.fg!25!bg}
\useoutertheme[subsection=false]{miniframes}
\setbeamertemplate{frametitle}[default][center]
\AtBeginDocument{%
  {
    \usebeamercolor{section in head/foot}
  } 
  \pgfdeclareverticalshading{beamer@headfade}{\paperwidth}
  {%
    color(0cm)=(bg);
    color(1.25cm)=(section in head/foot.bg)%
  }
  \setbeamercolor{section in head/foot}{bg=}
}
\beamertemplatedotitem
\mode
<all>

\setbeamercolor{headline}{bg=black,fg=white}
\setbeamercolor{title in headline}{bg=black,fg=white}
\setbeamercolor{author in headline}{bg=black,fg=white}
\setbeamercolor{institute in headline}{bg=black,fg=white}
\setbeamercolor{date in headline}{bg=black,fg=white}
\setbeamercolor{block body}{bg=white,fg=black}
\setbeamercolor{block title}{bg=black,fg=white}

\setbeamertemplate{headline}{  
\leavevmode
\begin{beamercolorbox}[wd=\paperwidth]{headline}
\vskip1cm
\raggedright
\usebeamercolor{title in headline}{
\color{fg}{\fontsize{110}{110}\selectfont {\inserttitle}}\\[3ex]}
\usebeamercolor{author in headline}{
\color{fg}\LARGE{\insertauthor}\\[1ex]}
\usebeamercolor{institute in headline}{
\color{fg}\large{\insertinstitute}\\[1ex]}  
\vskip2ex
\end{beamercolorbox}
\begin{beamercolorbox}[wd=\paperwidth]{lower separation line head}
\rule{0pt}{3pt}
\end{beamercolorbox}
}
% no navigation on a poster
\setbeamertemplate{navigation symbols}{}  


% Use rounded blocks
\setbeamertemplate{blocks}[rounded]

% Larger titles for the block
\makeatletter 
\newcommand\semiHuge{\@setfontsize\semiHuge{48}{45}}
\makeatother
\setbeamerfont*{block title}{family=\sffamily,series=\bfseries,size=\semiHuge}

答案1

在此处输入图片描述

\documentclass[]{beamer}
\usepackage[orientation=landscape,size=custom,width=165,height=105,scale=1.47,debug]{beamerposter}
\usetheme{Modified}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\title{Title}
\author[]{Authors}
\institute[]{Institute}
\begin{document}

% beamer has a problem filling vertical space in columns
% have to manually specify column heights 
% 
\newlength{\colheightb}
\setlength{\colheightb}{.85\paperheight}
\newcommand{\addheight}{\parbox{0pt}{\rule{0pt}{2cm}}}

\begin{frame}{}
\begin{columns}[T, totalwidth=\textwidth]
\begin{column}{.225\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section\addheight}
    \end{block} 
    \vfill
}
\end{column}

\begin{column}{.225\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section p\addheight}
    \end{block}
    \vfill
}
\end{column}

\begin{column}{.265\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section y\addheight}
    \end{block}
    \vfill
}
\end{column}

\begin{column}{.275\linewidth}
\vbox to \colheightb{%
    \begin{block}{Section 4\addheight}
    \end{block}
    \vfill
}
\end{column}

\end{columns}
\end{frame}
\end{document}

您可以通过这样的宏添加所需的高度:

\newcommand{\addheight}{\parbox{0pt}{\rule{0pt}{2cm}}}

然后,在每个块标题中,只需添加命令即可\addheight。或者,您可以按照@GonzaloMedina的建议,将以下两行添加到序言中,以自动执行此操作:

\newcommand{\addheight}{\parbox{0pt}{\rule{0pt}{2cm}}}
\setbeamerfont*{block title}{family=\sffamily,series=\bfseries\addheight,size=\semiHuge} 

这样,就不需要在每个块标题中重复了。您也可以根据需要\addheight更改的值。2cm

相关内容