我想產生一個在同一頁上有 6 個框架的 PDF 文件。我的意思是我有一個Beamer演示文稿,每張幻燈片上都有一個框架,我想要得到這樣的東西:http://alumni.media.mit.edu/~maov/classes/vision09/lect/09_Image_Filtering_Edge_Detection_09.pdf
是否可以 ?知道從哪裡開始嗎?
答案1
您可以先定義「6 on 1」pgf 頁面佈局,然後在該handout
模式下啟動它。我使用下面的程式碼——我可能在某個地方修改過它,但我不記得了。也許您可以根據自己的需求進一步對其進行微調:
\documentclass[handout]{beamer}
\usetheme{Dresden}
\usepackage{pgfpages}
\pgfpagesdeclarelayout{6 on 1}
{
\edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
\edef\pgfpageoptionwidth{\the\paperheight}
\def\pgfpageoptionborder{0pt}
\def\pgfpageoptionfirstshipout{1}
}
{
\pgfpagesphysicalpageoptions
{%
logical pages=6,%
physical height=\pgfpageoptionheight,%
physical width=\pgfpageoptionwidth,%
current logical shipout=\pgfpageoptionfirstshipout%
}
\ifdim\paperheight>\paperwidth\relax
% put side-by-side
\pgfpageslogicalpageoptions{1}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.1667\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{3}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{5}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.8333\pgfphysicalwidth}{.25\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.1667\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{4}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.5\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{6}
{%
border shrink=\pgfpageoptionborder,%
resized width=.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.8333\pgfphysicalwidth}{.75\pgfphysicalheight}%
}%
\else
% stack on top of one another
\pgfpageslogicalpageoptions{1}
{%
border shrink=\pgfpageoptionborder,%
resized width=0.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.8333\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{3}
{%
border shrink=\pgfpageoptionborder,%
resized width=0.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.5\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{5}
{%
border shrink=\pgfpageoptionborder,%
resized width=0.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.25\pgfphysicalwidth}{.1667\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{2}
{%
border shrink=\pgfpageoptionborder,%
resized width=0.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.8333\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{4}
{%
border shrink=\pgfpageoptionborder,%
resized width=0.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight}%
}%
\pgfpageslogicalpageoptions{6}
{%
border shrink=\pgfpageoptionborder,%
resized width=0.5\pgfphysicalwidth,%
resized height=\pgfphysicalheight,%
center=\pgfpoint{.75\pgfphysicalwidth}{.1667\pgfphysicalheight}%
}%
\fi
}
\mode<handout>{
\pgfpagesuselayout{6 on 1}[a4paper, border shrink=8mm]
\pgfpageslogicalpageoptions{1}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{2}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{3}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{4}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{5}{border code=\pgfusepath{stroke}}
\pgfpageslogicalpageoptions{6}{border code=\pgfusepath{stroke}}
}
\begin{document}
\begin{frame}{First}
lala
\end{frame}
\begin{frame}{Second}
lala
\end{frame}
\begin{frame}{Third}
lala
\end{frame}
\begin{frame}{Fourth}
lala
\end{frame}
\begin{frame}{Fifth}
lala
\end{frame}
\begin{frame}{Sixth}
lala
\end{frame}
\end{document}
答案2
如果您不介意使用第二個文件來建立文檔,則可以使用類似以下內容的文件。這假設mypresentation-h.pdf
您的投影機簡報是在handout
模式下建立的。
\documentclass[a4paper]{article}
\usepackage{pdfpages}
\includepdfset{pages=-,nup=2x3,frame,noautoscale=false,delta=5mm 5mm,pagecommand={\thispagestyle{plain}}}% adjust the pagestyle etc. as desired
\geometry{vscale=.75,hscale=.925}% if you are not using A4, you might need to adjust this to get things looking right
\usepackage{parskip}
\begin{document}
\includepdf[scale=.9]{mypresentation-h.pdf}% beamer presentation created in handout mode (to flatten slides). Also consider using a black and white theme if printing or copying greyscale
\end{document}
答案3
佈局6 on 1
現已包含在 pgf 的 3.1 或更高版本中(可從https://sourceforge.net/p/pgf/git/ci/master/tree/)
有了這個,LianTze Lim 的好答案可以簡化為:
\documentclass[handout]{beamer}
\usetheme{Dresden}
\usepackage{pgfpages}
\mode<handout>{
\pgfpagesuselayout{6 on 1}[a4paper, border shrink=8mm]
}
\begin{document}
\begin{frame}{First}
lala
\end{frame}
\begin{frame}{Second}
lala
\end{frame}
\begin{frame}{Third}
lala
\end{frame}
\begin{frame}{Fourth}
lala
\end{frame}
\begin{frame}{Fifth}
lala
\end{frame}
\begin{frame}{Sixth}
lala
\end{frame}
\end{document}