如何在没有全显示模式的情况下在投影仪中自动前进幻灯片?

如何在没有全显示模式的情况下在投影仪中自动前进幻灯片?

要在这么多秒后自动前进幻灯片,似乎您需要在使用时使用全屏显示模式(PC 上的Ctrl+ ) 。当 PDF 文件不占据整个屏幕而只是众多窗口之一时,我如何才能获得相同的效果?Lbeamer

(原因:我想在播放幻灯片的同时展示其他内容。)

答案1

比默内置仅在全屏模式下有效。但您也可以使用一些文档级 JavaScript( ,AdobeReader)\transduration在非全屏模式下实现自动前进:pdflatex

\documentclass{beamer}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% doc-level JavaScript functions
\immediate\pdfobj{<<
  /S/JavaScript/JS (
    setPageTimeOut=function(d){
      return app.setTimeOut("turnPage()", d*1000.);
    }
  )
>>}
\edef\setPageTimeOut{\the\pdflastobj\space 0 R}

\immediate\pdfobj{<<
  /S/JavaScript/JS (
    turnPage=function(){
      if(this.pageNum==this.numPages-1){
        this.pageNum=0;
      }else{
        this.pageNum++;
      }
    }
  )
>>}
\edef\turnPage{\the\pdflastobj\space 0 R}

\pdfnames{
  /JavaScript <<
    %name tree mapping doc. level JavaScript functions to object numbers
    /Names [(setPageTimeOut) \setPageTimeOut (turnPage) \turnPage ]
    /Limits [(setPageTimeOut) (turnPage)] %first and last in alphab. order
  >>
}

%macro to set per-page timeout
\def\turnPageAfter#1{%
  \pdfpageattr{
    /AA <<%
      %additional page-open/close actions
      /O <</S/JavaScript/JS (var to=setPageTimeOut(#1);)>>
      /C <</S/JavaScript/JS (app.clearTimeOut(to);)>>
    >>
  }%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
   \turnPageAfter{2}
   \frame{
     This page times out after 2 s.
   }

   \turnPageAfter{4}
   \frame{
     This page times out after 4 s.
   }

   \turnPageAfter{1}
   \frame{
     This page times out after 1 s.
   }

   \turnPageAfter{5}
   \frame{
     This page times out after 5 s.
   }
\end{document}

答案2

您可以使用视图 -> 页面视图 -> 单页并使用 PgUp 继续 acroread 还有一整页按钮即可直接使用。

相关内容