我发现这DJ Bernstein 的演示文档。是否可以在 中创建它latex
?
截屏
答案1
一个animate
基于 AR 的解决方案(参见第二个代码框以获取animate
无解决方案,如 OP 中所要求的):
幻灯片是根据现有 PDF 制作的(此处是随附的示例文件之一beamer
被使用;它应该不是通过主源文件(如下所示)和 pdfLaTeX 制作包含覆盖的 PDF 文件。
幻灯片放映在每张完整的幻灯片上暂停,但可以在任何位置暂停并在两个方向上恢复。
主文件(animate
版本):
\documentclass{standalone}
%%%%%%%%%%%%%%%%%%% adjust this %%%%%%%%%%%%%%%%%%%%%%%%
\def\myslides{beamerexample-conference-talk.pdf}
\def\TransSteps{50} % number of transition steps
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{animate}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{multido}
\usepackage{intcalc} %modulo computation with \intcalcMod
\usepackage{media9} %for buttons
\def\PdfXimage#1#2{\pdfximage page #1 {#2}} %PDF page into XObject
% store all slides in XObjects and reference these pairwise in parent boxes
\savebox{0}{\PdfXimage{1}{\myslides}\pdfrefximage\pdflastximage}
\edef\XObj{\the\pdflastximage}
\edef\slidewd{\number\wd0 sp}\edef\slideht{\number\ht0 sp}
\edef\numSlides{\the\pdflastximagepages}
\multido{\i=2+1,\iPair=1+1}{\numexpr\numSlides-1\relax}{
\PdfXimage{\i}{\myslides}
\savebox{0}{\rule{0pt}{\slideht}\makebox[\slidewd][l]{\pdfrefximage\XObj}%
\makebox[\slidewd][l]{\pdfrefximage\pdflastximage}}
\edef\XObj{\the\pdflastximage}
\pdfxform 0
\expandafter\xdef\csname pair\iPair\endcsname{\the\pdflastxform}
}
% write timeline file
\newwrite\TimeLineFile
\immediate\openout\TimeLineFile=slideshow.txt
\multido{\i=0+1}{\numexpr(\numSlides-1)*\TransSteps+1\relax}{
\ifthenelse{\intcalcMod{\i}{\TransSteps}=0}{
\immediate\write\TimeLineFile{*::\i} %pause on every full slide
}{
\immediate\write\TimeLineFile{::\i}
}
}
\immediate\closeout\TimeLineFile
% button
\def\buttonface#1{% width
\tikz[x=#1,y=#1,transparency group]{%
\useasboundingbox (-0.5,-0.5) rectangle (0.5,0.5);
\shade [ball color=gray,opacity=0.6] (0,0) circle (0.4);
\fill [color=white,opacity=0.6] %triangle
(-0.152,0.224)--(-0.152,-0.224)--+(30:0.4844)--cycle;
}%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\def\iPair{1}%
\makebox[0pt][l]{\raisebox{-0.5\height}{%
\begin{animateinline}[label=slideshow, timeline=slideshow.txt, nomouse]{25}
\whiledo{\iPair<\numSlides}{%
\multiframe{\numexpr\TransSteps\relax}{%
dOffset=0pt+\dimexpr\slidewd/\TransSteps\relax%
}{%
\makebox[\slidewd][l]{%
\hspace{-\dOffset}\rule{0pt}{\slideht}%
\expandafter\pdfrefxform\csname pair\iPair\endcsname}%
}%
\xdef\iPair{\the\numexpr\iPair+1\relax}%
\newframe%
\ifnum\iPair=\numSlides% last slide
\makebox[\slidewd][l]{%
\hspace{-\slidewd}\rule{0pt}{\slideht}%
\expandafter\pdfrefxform\csname pair\the\numexpr\iPair-1\endcsname}%
\fi%
}
\end{animateinline}%
}}%
\raisebox{-0.5\height}{\makebox[\slidewd][l]{%
\mediabutton[
jsaction={
if(anim.slideshow.isPlaying)anim.slideshow.pause();
else anim.slideshow.playBwd();
}
]{\reflectbox{\buttonface{0.8cm}}}%
\hfill%
\mediabutton[
jsaction={
if(anim.slideshow.isPlaying)anim.slideshow.pause();
else anim.slideshow.playFwd();
}
]{\buttonface{0.8cm}}%
}}
\end{document}
主文件(animate
免费版本):
\documentclass{scrartcl}
%%%%%%%%%%%%%%%%%%% adjust this %%%%%%%%%%%%%%%%%%%%%%%%
\def\myslides{beamerexample-conference-talk.pdf}
\def\TransSteps{50} % number of transition steps
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[tightpage,active]{preview}
\usepackage[pdfstartview=Fit]{hyperref}
\usepackage{multido}
\usepackage{ifthen}
\usepackage{intcalc} %modulo computation with \intcalcMod
\def\PdfXimage#1#2{\pdfximage page #1 {#2}} %PDF page into XObject
% store all slides in XObjects and reference these pairwise in parent boxes
\savebox{0}{\PdfXimage{1}{\myslides}\pdfrefximage\pdflastximage}
\edef\XObj{\the\pdflastximage}
\edef\slidewd{\number\wd0 sp}\edef\slideht{\number\ht0 sp}
\edef\numSlides{\the\pdflastximagepages}
\multido{\i=2+1,\iPair=1+1}{\numexpr\numSlides-1\relax}{
\PdfXimage{\i}{\myslides}
\savebox{0}{\rule{0pt}{\slideht}\makebox[\slidewd][l]{\pdfrefximage\XObj}%
\makebox[\slidewd][l]{\pdfrefximage\pdflastximage}}
\edef\XObj{\the\pdflastximage}
\pdfxform 0
\expandafter\xdef\csname pair\iPair\endcsname{\the\pdflastxform}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}
\def\iPair{1}%
\whiledo{\iPair<\numSlides}{%
\def\iStep{0}%
\whiledo{\iStep<\TransSteps}{
\xdef\dOffset{\the\dimexpr\slidewd*\iStep/\TransSteps\relax}%
\begin{preview}%
\makebox[\slidewd][l]{%
\hspace{-\dOffset}\rule{0pt}{\slideht}%
\expandafter\pdfrefxform\csname pair\iPair\endcsname}%
\end{preview}%
\edef\iStep{\the\numexpr\iStep+1\relax}
}%
\xdef\iPair{\the\numexpr\iPair+1\relax}%
\newpage%
\ifnum\iPair=\numSlides%
\begin{preview}%
\makebox[\slidewd][l]{%
\hspace{-\slidewd}\rule{0pt}{\slideht}%
\expandafter\pdfrefxform\csname pair\the\numexpr\iPair-1\endcsname}%
\end{preview}%
\fi%
}
\end{document}
答案2
我将使用 Inkscape 和 Sozi 插件来创建滑动效果。TexText 或默认的 Inkscape LaTeX 渲染插件可以为您提供数学/文本。
稍后我将尝试用一个例子来更新我的回复。