Beamer制作演示文档

您所在的位置:网站首页 页眉调整高度 Beamer制作演示文档

Beamer制作演示文档

2024-06-29 22:39| 来源: 网络整理| 查看: 265

latexBeamer页眉

到目前为止,我们的页眉是下面这个页面中的页眉样式。 enter description here 我想做一些修改,把页眉设置为导航栏加上一个自己的Logo,导航栏信息只在除了标题页之外的其它页面显示。 使用的是如下的代码。

\defbeamertemplate{headline}{NGEGHeadlineTemplate} {% \leavevmode%离开垂直模式 \settoheight{\@tempdimb}{\usebeamerfont*{headline}{页眉}}%把页眉字体的高度赋值给了变量\@tempdimb \@tempdimb=2\@tempdimb \pgfdeclareimage[height=1.\@tempdimb]{title_logo}{New-Tikzfile-white.eps}%定义了一个叫做title_logo的pgfimage,并指明了图片的高度,它具体使用的是自己准备的一个叫做New-Tikzfile-white.eps图片 \ifdim\@tempdimb>0pt%ifdim,比较两个尺寸。这里的意思是,如果\@tempdimb大于0pt(也就等于是有页眉),就执行下面的代码 \begin{beamercolorbox}[wd=.9\paperwidth,ht=\@tempdimb]{section in head/foot}%开始一个beamercolorbox盒子,指定了盒子的长度和宽度,并且颜色指定为section in head/foot,也就是“顶边或底边导航条中的节标题”所使用的颜色。这个盒子里面放置导航条 \ifnum \the\value{page}>1%页面大于1,也就是说不是标题页 \vbox to\@tempdimb{\vfil \centerline{\insertsectionnavigationhorizontal{.5\textwidth}{\hskip0pt plus1filll}{\hskip0pt plus1filll}}\vfil}%构建一个高度为@tempdimb的垂直盒子,插入水平排列的导航条,导航条的水平宽度为0.5\textwidth,导航条左边和右边插入的空白为\hskip0pt plus1filll,导航条的上面和下面用空白来填充(通过\vfil命令来实现) \fi \end{beamercolorbox}% \begin{beamercolorbox}[wd=.1\paperwidth,ht=\@tempdimb,center]{subsection in head/foot}%开始一个beamercolorbox盒子,指定了盒子的宽度和高度,内容居中,颜色指定为subsection in head/foot,也就是“顶边或底边导航条中的小节标题”所使用的颜色。这个盒子里面放置自己的Logo \vbox to\@tempdimb{\vfil\pgfuseimage{title_logo}\vfil}%构建一个高度为@tempdimb的垂直盒子,在里面使用已经定义的图片title_logo,图片的上下用空白来填充 \end{beamercolorbox}% \fi%结束if条件判断 } \setbeamertemplate{headline}[NGEGHeadlineTemplate]

最后出来的效果如下。 enter description here



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3