beamerposter 中侧边栏的跨度,标题位于标题中

beamerposter 中侧边栏的跨度,标题位于标题中

我正在使用 beamerposter 制作海报,并尝试创建自己的主题。但我在侧边栏方面遇到了麻烦。我希望侧边栏位于海报整个高度的左侧。但是,当我将标题放在标题中时,侧边栏会从标题中消失。它看起来像这样:

在此处输入图片描述

示例代码:

\documentclass{beamer}

\usepackage[orientation=landscape,width=46in, height=42in,scale=1.4,debug]{beamerposter}
\usepackage{graphicx}
\usepackage{color}
\usepackage{xcolor}


\definecolor{Light}{gray}{.80}
\definecolor{dgreen}{rgb}{0.,0.6,0.}


\makeatletter

% sidebar
\setbeamersize{sidebar width left=0.075\paperwidth}
\setbeamertemplate{sidebar canvas left}[vertical shading][top=green!23!blue!49, bottom=green!15!blue!42]

% headline
\setbeamertemplate{headline}{  
  \leavevmode
  \hbox{
  \begin{beamercolorbox}[wd=.075\paperwidth,ht=0ex,dp=0ex,center]{}
    \end{beamercolorbox}%
    \begin{beamercolorbox}[wd=.92\paperwidth,ht=4ex,dp=0ex,center]{}

    \end{beamercolorbox}%
  }

\hbox{
\begin{beamercolorbox}[wd=.08\paperwidth,ht=0ex,dp=1ex,center]{}

  \end{beamercolorbox}
  \begin{beamercolorbox}[wd=0.92\paperwidth]{headline}
                \centering
        \usebeamercolor{title in headline}{\color{fg}\textbf{\veryHuge{\inserttitle}}\\[1ex]}
        \usebeamercolor{author in headline}{\color{fg}\Large{\insertauthor}\\[1ex]}
        \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
  \end{beamercolorbox}
}
}

\def\beamer@andinst{\\[0.15em]}


\makeatother



\title{Title of the poster}
\author{\textcolor{dgreen}{author 1}\inst{1} \and author 2\inst{1} \and author 3\inst{2} }
\institute{\inst{1} Institution 1  \and %
            \inst{2} Institution 2 }
\date{}


\begin{document}
\begin{frame}{} 

contents

\end{frame}
\end{document}

我还尝试将所有内容放在单独的 .sty 文件中。当我这样做时,出于某种原因,侧边栏仅跨越海报的一部分。但是当我在主 .tex 文件中定义侧边栏时,在我将标题放入页眉之前,它确实跨越了整个页面的高度。当我将标题/作者放入页眉时,结果看起来就像上面的图片。但我希望侧边栏跨越整个页面。我很感激有人能帮助我。

谢谢。

答案1

您可以使用\raisebox将栏向上移动:

\documentclass{beamer}

\usepackage[orientation=landscape,width=46in, height=42in,scale=1.4,debug]{beamerposter}

\definecolor{Light}{gray}{.80}
\definecolor{dgreen}{rgb}{0.,0.6,0.}

% sidebar
\setbeamersize{sidebar width left=0.075\paperwidth}
\setbeamertemplate{sidebar canvas left}[vertical shading][top=green!23!blue!49, bottom=green!15!blue!42]

% headline
\setbeamertemplate{headline}{%
  \leavevmode%
  \raisebox{\dimexpr-\headheight\relax}{%
      \begin{beamercolorbox}[wd=0.92\paperwidth]{headline}
              \vskip2cm
        \centering
        \usebeamercolor{title in headline}{\color{fg}\textbf{\veryHuge{\inserttitle}}\\[1ex]}
        \usebeamercolor{author in headline}{\color{fg}\Large{\insertauthor}\\[1ex]}
        \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
      \end{beamercolorbox}
    }
}

\makeatletter
\def\beamer@andinst{\\[0.15em]}
\makeatother

\title{Title of the poster}
\author{\textcolor{dgreen}{author 1}\inst{1} \and author 2\inst{1} \and author 3\inst{2} }
\institute{\inst{1} Institution 1  \and %
            \inst{2} Institution 2 }
\date{}


\begin{document}
\begin{frame}

contents

\end{frame}
\end{document}

在此处输入图片描述

相关内容