2010-11-03 124 views
2

我在演示文稿中有一些框架,我想摆脱标准标题/标底,因为我需要数字空间,其中包括使用\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} 
%---------------------------------------------------------------------- 
%---------------------------------------------------------------------- 
+0

这是标准帧 http://img5.imageshack.us/img5/2246/unbenanntzv.png – Roland 2010-11-04 10:54:21

+0

这是带有图像的普通帧,其中框架号应该被添加在右下角http://img178.imageshack.us/img178/6476/unbenannt2tu.png – Roland 2010-11-05 09:59:48

回答

2

在我原来的答复,我要求一些照片,你贴。非常感谢;那些非常有帮助。


您的幻灯片看起来像是使用格拉茨主题[1]。我下载了这个解决方案。试试这个(更换我的\ {usetheme格拉茨}与任何你叫你的版本,也许你已经修改了一点):

\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} 

那么你很可能逃脱只是一个PGF图片{0} {0} {12.8} {1.05},这将填补整个宽度(0 - > 12.8厘米×宽度),并给你足够的页脚页码(0 - > 1.05厘米高)。

但是,如果您离开它,也可以使用pgf来放置图像。随你便。它不会影响任何东西以使其保持整个框架的大小。

注2:改变这些坐标,然而你想。您可以在默认幻灯片和这个之间来回翻转以调整这些坐标,直到页面#/ tot页面在两者之间没有明显的差异。

需要注意的是,如果你开始添加文本,你有什么框架,有一个轻微的 pgfbox的位置可能会被打倒。如果是这样的话,只需让你的框架对数字很喜欢,然后重做\ pfgputat的坐标以获得它想要的位置。

注意3:我从上面的链接中截取了数字并使用了pgf将它放在我的框架中。您的标题左对齐,而我的默认居中位置,但总体上希望这看起来像你想要的(上面的LaTeX命令产生这个):IMAGE

就像我说的,只是调整各种坐标,以获得你想要的一切。


更新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/staff/weiglhofer/misc/tugbeamer/

[2] PGF manual on ctan:www。 ctan。 org/tex-archive/graphics/pgf in base/doc

+0

我添加了一些链接到我的问题,我希望现在更清楚,我想要什么。基本上,我想在右下角的幻灯片中添加帧号。 我在找的是一个带框号的文本框,我可以放在右下角。 – Roland 2010-11-04 10:58:48

+0

现在下载这个主题(我很熟悉它),所以我可以使用相同的主题,并尽快为您提供解决方案。 – Hendy 2010-11-04 18:03:27

+0

重新阅读我的解决方案 - 我将其编辑为我认为对您有用的内容。 – Hendy 2010-11-04 18:20:56