使用 pgfpages 时剪辑到页面内的内容

使用 pgfpages 时剪辑到页面内的内容

创建包含内容的讲义时pgfpages不符合页面边界。

以下示例中的幻灯片仅显示图像的顶部

在此处输入图片描述

然而整个图像都包含在讲义中:

在此处输入图片描述

梅威瑟:

\documentclass{beamer}

\usepackage{pgfpages}
\pgfpagesuselayout{4 on 1}[a4paper,border shrink=5mm]

\begin{document}

\begin{frame}
\includegraphics[width=\textwidth]{example-image-10x16}
\end{frame}

\end{document}

答案1

要修复此问题,可以为包含的页面设置corner width。即使角宽度为 0,这仍可确保仅显示页面内的内容:

\documentclass{beamer}

\usepackage{pgfpages}
\pgfpagesdeclarelayout{6 on 1}
{
    \edef\pgfpageoptionheight{\the\paperwidth} % landscaped by default
    \edef\pgfpageoptionwidth{\the\paperheight}
    \def\pgfpageoptionborder{0pt}
}
{
    \pgfpagesphysicalpageoptions
    {%
        logical pages=6,%
        physical height=\pgfpageoptionheight,%
        physical width=\pgfpageoptionwidth,%
    }
    \pgfpageslogicalpageoptions{1}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.29\pgfphysicalwidth}{.8333\pgfphysicalheight},
        %
        corner width=0pt
    }%
    \pgfpageslogicalpageoptions{2}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.75\pgfphysicalwidth}{.8333\pgfphysicalheight},%
        corner width=0pt
    }%
    \pgfpageslogicalpageoptions{3}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.29\pgfphysicalwidth}{.5\pgfphysicalheight},%
        corner width=0pt
    }%
    \pgfpageslogicalpageoptions{4}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.75\pgfphysicalwidth}{.5\pgfphysicalheight},%
        corner width=0pt
    }%
    \pgfpageslogicalpageoptions{5}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.29\pgfphysicalwidth}{.1667\pgfphysicalheight},%
        corner width=0pt
    }%
    \pgfpageslogicalpageoptions{6}
    {%
        border shrink=\pgfpageoptionborder,%
        resized width=.5\pgfphysicalwidth,%
        resized height=.25\pgfphysicalheight,%
        center=\pgfpoint{.75\pgfphysicalwidth}{.1667\pgfphysicalheight},%
        corner width=0pt
    }%   
}
\pgfpagesuselayout{6 on 1}[a4paper,border shrink=5mm]

\begin{document}

\section{Introduction}

\begin{frame}
\includegraphics[width=\textwidth]{example-image-10x16}
\end{frame}

\end{document}

在此处输入图片描述

相关内容