我正在使用该pgfpages
软件包发布我的讲义。但我认为页面之间的空间太大,而外边框的空间太小。我该如何改变这种情况?目前我使用以下代码:
\documentclass[compress,handout]{beamer}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfpages}
\mode<presentation>
{
% Präsentationsthema auswählen
\usetheme{Boadilla}
% äußeres Thema anpassen
\useoutertheme[subsection=false]{miniframes}
\setbeamercovered{transparent}
}
\pgfpagesuselayout{4 on 1}[a4paper, border shrink=5mm, landscape]
\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke}}
\begin{document}
\begin{frame}
\frametitle{Seite 1}
\end{frame}
\begin{frame}
\frametitle{Seite 2}
\end{frame}
\begin{frame}
\frametitle{Seite 3}
\end{frame}
\begin{frame}
\frametitle{Seite 4}
\end{frame}
\end{document}
答案1
您可以使用\pgfpageslogicalpageoptions{<number>}{<options>}
宏(正如您已经做的那样)
<number>
是框架的逻辑编号(1 表示左上方,2 表示右上方,...)以及<options>
是选项,例如resized width = <length>
结果框架的宽度,<length>
可以以百分比表示\pgfphysicalwidth
。resized height = <length>
center = \pgfpoint{<x>}{<y>}
逻辑页面的中心,<x>
可以分别以和<y>
的百分比给出。\pgfphysicalwidth
\pgfphysicalheight
scale
,xscale
和yscale = <factor>
pgfmanual
此选项和更多选项在“定义布局”一节(当前为 58.3)中进行了解释。请注意,我在以下示例中
未使用这些选项。resized …
代码
\documentclass[compress, handout]{beamer}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfpages}
\mode<presentation>{
\usetheme{Boadilla}
\useoutertheme[subsection=false]{miniframes}
\setbeamercovered{transparent}
}
\pgfpagesuselayout{4 on 1}[a4paper, border shrink=10mm, landscape]
\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
center = \pgfpoint{.3\pgfphysicalwidth}{.72\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
center = \pgfpoint{.7\pgfphysicalwidth}{.72\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
center = \pgfpoint{.3\pgfphysicalwidth}{.28\pgfphysicalheight}
}
\pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke},
% resized height=.65\pgfphysicalheight,
% resized width=.65\pgfphysicalwidth,
center = \pgfpoint{.7\pgfphysicalwidth}{.28\pgfphysicalheight}
}
\begin{document}
\begin{frame}
\frametitle{Seite 1}
\end{frame}
\begin{frame}
\frametitle{Seite 2}
\end{frame}
\begin{frame}
\frametitle{Seite 3}
\end{frame}
\begin{frame}
\frametitle{Seite 4}
\end{frame}
\end{document}
输出
答案2
谢谢你的回答!我稍微扩展了你的答案,这样就可以输入不同的长度,而不必考虑比例。现在可以输入页面边框和顶部的 BCOR 长度。边框收缩现在正常工作了。
\documentclass[compress, handout]{beamer}
\usepackage[ngerman]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{pgfpages}
\mode<presentation>
{
\usetheme{Boadilla}
\useoutertheme[subsection=false]{miniframes}
\setbeamercovered{transparent}
}
\pgfpagesuselayout{4 on 1}[
a4paper
, border shrink=2mm
, landscape
, physical height=\paperheight%
, physical width=\paperwidth%
]
\newlength{\pageborder}
\setlength{\pageborder}{5mm}
\newlength{\pageborderBCOR}
\setlength{\pageborderBCOR}{10mm}
\pgfpageslogicalpageoptions{1}{
border code=\pgfusepath{stroke}
, resized height=\dimexpr.5\pgfphysicalheight-\pageborder-.5\pageborderBCOR
, resized width=\dimexpr.5\pgfphysicalwidth-\pageborder-.5\pageborderBCOR
, center = \pgfpoint{.25\pgfphysicalwidth+.5\pageborder}%
{.75\pgfphysicalheight-.5\pageborder-.75\pageborderBCOR}
}
\pgfpageslogicalpageoptions{2}{
border code=\pgfusepath{stroke}
, resized height=\dimexpr.5\pgfphysicalheight-\pageborder-.5\pageborderBCOR
, resized width=\dimexpr.5\pgfphysicalwidth-\pageborder-.5\pageborderBCOR
, center = \pgfpoint{.75\pgfphysicalwidth-.5\pageborder}%
{.75\pgfphysicalheight-.5\pageborder-.75\pageborderBCOR}
}
\pgfpageslogicalpageoptions{3}{
border code=\pgfusepath{stroke}
, resized height=\dimexpr.5\pgfphysicalheight-\pageborder-.5\pageborderBCOR
, resized width=\dimexpr.5\pgfphysicalwidth-\pageborder-.5\pageborderBCOR
, center = \pgfpoint{.25\pgfphysicalwidth+.5\pageborder}%
{.25\pgfphysicalheight+.5\pageborder-.25\pageborderBCOR}
}
\pgfpageslogicalpageoptions{4}{
border code=\pgfusepath{stroke}
, resized height=\dimexpr.5\pgfphysicalheight-\pageborder-.5\pageborderBCOR
, resized width=\dimexpr.5\pgfphysicalwidth-\pageborder-.5\pageborderBCOR
, center = \pgfpoint{.75\pgfphysicalwidth-.5\pageborder}%
{.25\pgfphysicalheight+.5\pageborder-.25\pageborderBCOR}
}
\begin{document}
\begin{frame}
\frametitle{Seite 1}
\end{frame}
\begin{frame}
\frametitle{Seite 2}
\end{frame}
\begin{frame}
\frametitle{Seite 3}
\end{frame}
\begin{frame}
\frametitle{Seite 4}
\end{frame}
\end{document}
祝好 Dirk