题
我的演示文稿中有一些框架,我想摆脱标准标题/脚线,因为我需要数字的空间,其中包括使用 \includegraphics
. 。这些数字占据了整个空间。现在我想 插入右下角的帧号.
笔记。我将标准主题带有自定义标题/脚步。可以在此处找到一个工作最小示例:http://rapidshare.com/files/429008846/beamer.zip
这是代码:
\documentclass{beamer}
\usepackage{german}
\usepackage{graphicx}
\usepackage{color}
\usepackage{colortbl}
\usepackage{pgf}
%----------------------------------------------------------------------
%----------------------------------------------------------------------
%new color
\definecolor{Gray}{gray}{0.9}
\def\textboxcolor{Gray}
%----------------------------------------------------------------------
%----------------------------------------------------------------------
\setbeamertemplate{headline}{%
\hspace{0.01\textwidth}\begin{minipage}[t]{0.88\textwidth}
\vspace{0.1cm}
\begin{tabular}{p{0.5\textwidth}p{0.4\textwidth}p{0.1\textwidth}}
Organisation - Institution&%
&%
\includegraphics[width=1cm]{pictures/logos/logo_ohne_text.jpg}\\
\hline\\
\end{tabular}
\end{minipage}}
%----------------------------------------------------------------------
\setbeamertemplate{footline}{%
\hspace{0.01\textwidth}\begin{minipage}[t]{0.88\textwidth}%
\begin{tabular}{p{0.3\textwidth}p{0.35\textwidth}p{0.2\textwidth}p{0.1\textwidth}}%
\rowcolor[rgb]{0.8,0.8,0.8}\hline%
\raggedright\begin{minipage}{0.3cm}\includegraphics[width=0.30cm]{pictures/logos/quadrat.jpg}\end{minipage}\ \insertauthor &%
\centering \ \usebeamerfont{date in head/foot}\insertshortdate{}& &%
Seite \insertframenumber{}/\inserttotalframenumber\\
\hline\\
\end{tabular}
\end{minipage}}
%----------------------------------------------------------------------
%----------------------------------------------------------------------
\begin{document}
%----------------------------------------------------------------------
\begin{frame}{Normal Frame}
\begin{block}{Blocktitle}
Text
\end{block}
\end{frame}
%----------------------------------------------------------------------
\begin{frame}[plain]{Frame with Images}
\begin{center}
\includegraphics[height=0.5\textheight]{pictures/cf.png}
\includegraphics[height=0.5\textheight]{pictures/cf.png}\\
\includegraphics[height=0.5\textheight]{pictures/cf.png}
\includegraphics[height=0.5\textheight]{pictures/cf.png}
\end{center}
\begin{pgfpicture}{0}{0}{12.8cm}{9.6cm}
\pgfputat{\pgfxy(10.62,1.05)}{\pgfbox[left,base]{ %
\tiny{\insertframenumber{}/\inserttotalframenumber}}}
\end{pgfpicture}
\end{frame}
%----------------------------------------------------------------------
\end{document}
%----------------------------------------------------------------------
%----------------------------------------------------------------------
解决方案
在我的原始答案中,我要求您发布一些图片。非常感谢;这些非常有帮助。
您的幻灯片看起来像是使用Graz主题[1]。我下载了,并提出了这个解决方案。尝试此(用您所谓的版本替换我的 usetheme {graz},因为您已经对其进行了一些修改):
\documentclass{beamer}
\usepackage{pgf} % make sure you use this!
\setbeamertemplate{navigation symbols}{}
\usetheme{Graz}
\pgfdeclareimage[height=0.5cm]{university-logo}{images/uni_logo}
\logo{\pgfuseimage{university-logo}}
\begin{document}
\begin{frame}[plain]{Test slide}
\begin{pgfpicture}{0}{0}{12.8cm}{9.6cm} % see Note 1
\pgfputat{\pgfxy(10.62,1.05)}{\pgfbox[left,base]{ % see Note 2
\tiny{\insertframenumber{}/\inserttotalframenumber}}}
\pgfputat{\pgfxy(0.4,1.1)}{\pgfimage[width=0.95\textwidth]{figure}} % see Note 3
\end{pgfpicture}
\end{frame}
\end{document}
注1: 如果您不熟悉PGF [2],则语法为:
\begin{pgfpicture}{start x}{start y}{end x}{end y}
因此,您可能只能使用{0} {0} {0} {12.8} {1.05}的PGF图片,它将填充整个宽度(0-> 12.8厘米x宽度) (0-> 1.05cm y高)。
但是,如果离开它,则可以使用PGF放置图像。由你决定。它不会影响整个框架的大小。
笔记2: 随心所欲地更改这些坐标。您可以在默认幻灯片和该索引之间来回翻转,以调整这些坐标,直到两者之间的页面#/TOT页面上没有明显的差异为止。
一个注意事项是,如果您开始添加文本以及您的框架有什么,则有一个 轻微 PGFBox的放置可能会被敲打。如果这样做,只需获取您的框架如何使用数字,然后重做 pfgputat的坐标即可将其获取所需的位置。
注3: 我从您上面的链接中拍摄了数字的屏幕截图,并使用PGF将其放在框架中。您的标题是对齐的,而我的标题则处于默认位置,但总的来说,这看起来像您想要的(上面生成的乳胶命令): 图片.
就像我说的那样,只需调整各种坐标即可将所有内容都置于您想要的位置。
更新11/5:
正如我在注释2中建议的那样,将东西添加到框架中可能会弄乱位置。我已经查看了您的更新代码,并使PGF效果很好。它可能应该被视为“黑客”,因为它所做的只是克服 includegraphics命令引起的降档。从本质上讲,看起来PGFBox无法驻留在使用此方法的图形的位置,因此您必须在幻灯片上“人为地”创建一个盒子以强迫它出现...但是这可行!我实际上对它进行了调整,以便如果您进入全屏模式,则在第一台幻灯片上的“ seite 1/2”和第二个幻灯片的“ 2/2”之间没有任何偏移。这里是:
\begin{pgfpicture}{0}{0}{12.8cm}{9.6cm}
\pgfputat{\pgfxy(10.585,9.74)}{\pgfbox[left,base]{ %
\tiny{\insertframenumber{}/\inserttotalframenumber}}}
\end{pgfpicture}
让我知道这是怎么回事!
1] www。 IST。图格拉兹。 at/affers/weiglhofer/misc/tugbeamer/
2] CTAN上的PGF手册:www。 ctan。 base/doc中的org/tex-Archive/graphics/pgf
其他提示
另一种方法可能是临时使用另一层显示Framenumbers,例如导航符号。这具有另一个优势,即该层在框架内容的顶部渲染,因此即使全屏图像也可以看到。
\documentclass[xcolor={table}]{beamer}
\usepackage{pgf}
%new color
\definecolor{Gray}{gray}{0.9}
\def\textboxcolor{Gray}
%----------------------------------------------------------------------
%----------------------------------------------------------------------
\setbeamertemplate{headline}{%
\hspace{0.01\textwidth}\begin{minipage}[t]{0.88\textwidth}
\vspace{0.1cm}
\begin{tabular}{p{0.5\textwidth}p{0.4\textwidth}p{0.1\textwidth}}
Organisation - Institution&%
&%
\includegraphics[width=1cm]{example-image-duck}\\
\hline\\
\end{tabular}
\end{minipage}}
%%----------------------------------------------------------------------
\setbeamertemplate{footline}{%
\hspace{0.01\textwidth}\begin{minipage}[t]{0.88\textwidth}%
\begin{tabular}{p{0.3\textwidth}p{0.35\textwidth}p{0.2\textwidth}p{0.1\textwidth}}%
\rowcolor[rgb]{0.8,0.8,0.8}\hline%
\raggedright\begin{minipage}{0.3cm}\includegraphics[width=0.30cm]{example-image}\end{minipage}\ \insertauthor &%
\centering \ \usebeamerfont{date in head/foot}\insertshortdate{}& &%
Seite \insertframenumber{}/\inserttotalframenumber\\
\hline\\
\end{tabular}
\end{minipage}}
\begin{document}
\begin{frame}{Normal Frame}
\begin{block}{Blocktitle}
Text
\end{block}
\end{frame}
\begingroup
\setbeamertemplate{navigation symbols}{%
\color{black}%
\tiny%
\setbeamertemplate{page number in head/foot}[totalpagenumber]%
\usebeamertemplate{page number in head/foot}%
}
\begin{frame}[plain]{Frame with Images}
\centering
\includegraphics[height=0.5\textheight]{example-image}%
\includegraphics[height=0.5\textheight]{example-image}
\includegraphics[height=0.5\textheight]{example-image}%
\includegraphics[height=0.5\textheight]{example-image}
\end{frame}
\endgroup
\end{document}