summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty')
-rw-r--r--Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty66
1 files changed, 35 insertions, 31 deletions
diff --git a/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty b/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty
index b2f6f9a27c4..3b8703fc231 100644
--- a/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty
+++ b/Master/texmf-dist/tex/latex/flashmovie/flashmovie.sty
@@ -1,7 +1,7 @@
%%%%%%%%%%%%% flashmovie.sty
-%%%%%%%%%%%%% Copyright 2009 Timo Hartmann
+%%%%%%%%%%%%% Copyright 2010 Timo Hartmann
%
-% Version 0.0
+% Version 0.1
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
@@ -15,6 +15,12 @@
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
+% special thanks to following people for providing tips and improvements:
+% - Elie Roux
+% - Marco Aurélio Graciotto Silva
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
% This package allows direct embedding of flash movies into PDF files. It is
% designed for use with pdflatex.
%
@@ -34,33 +40,33 @@
% http://heasarc.gsfc.nasa.gov/Videos/historical/saturn5.avi
% - transform this video into the flash format with ffmpeg:
% ffmpeg -i saturn5.avi saturn5.swf
-% (or use any other program captable of this, for example mencoder)
+% (or use any other program capable of this, for example mencoder)
% - put following line into your tex-file:
-% \flashmovie[width=10cm,heigth=10cm]{saturn5.swf}
+% \flashmovie[width=10cm,height=10cm]{saturn5.swf}
% (both width and height are needed!)
% - translate with pdflatex
% - advantages:
% - easy
-% - does not reley on external compontents
+% - does not rely on external components
% - disadvantages:
-% - ffmpeg is incaptable of embedding h.264 into swf-files, so one can only
+% - ffmpeg is incapable of embedding h.264 into swf-files, so one can only
% use inferior video codecs (sorenson h.263 aka flv,...).
% - no controls (play,pause,stop,seek,...) possible
%
% example (2)
-% - warning: The following example assumes that you have obainted VideoPlayer.swf
+% - warning: The following example assumes that you have obtained VideoPlayer.swf
% and SkinOverPlaySeekStop.swf from Acrobat 9 Pro and put it into the working
% directory.
% - download a video file to use, for example
% http://heasarc.gsfc.nasa.gov/Videos/historical/saturn5.avi
% - transform this video into the mp4 format with ffmpeg:
% ffmpeg -i saturn5.avi -vcodec libx264 -vpre hq -crf 22 -acodec libfaac -ab 128k -ac 2 saturn5.mp4
-% (or use any other program captable of this, for example mencoder)
+% (or use any other program capable of this, for example mencoder)
% - alternatively the flv-format with video-codec sorenson h.263 (aka flv) and audio-codec mp3 is also possible:
% mencoder saturn5.avi -o saturn5.flv -of lavf -ovc lavc -lavcopts vcodec=flv:vbitrate=300:mbd=2:mv0:trell:v4mv:cbp:last_pred=3 -srate 22050 -ofps 24 -vf harddup -oac mp3lame -lameopts abr:br=56 )
% (or use ffmpeg to do the same thing...)
% - put following line into your tex-file:
-% \flashmoviex[width=10cm,heigth=10cm]{saturn5.mp4}
+% \flashmoviex[width=10cm,height=10cm]{saturn5.mp4}
% (both width and height are needed! instead of saturn5.mp4 one can also use saturn5.flv but not saturn5.swf)
% - translate with pdflatex
% - advantages:
@@ -73,9 +79,9 @@
% todo:
% - replace VideoPlayer.swf and SkinOverPlaySeekStop.swf by some freely available software.
% it should be possible to program a simple video player with flexsdk and activescript.
-% the videoplayer should play mp4 and flv files and should and be captable of play,pause,seek,stop.
-% controls should be hidable.
-% - make more options of richmedia annotations usable, for example activation by clicking, playcount,...
+% the video-player should play mp4 and flv files and should and be capable of play,pause,seek,stop.
+% controls should be hide-able.
+% - make more options of rich-media annotations usable, for example activation by clicking, play-count,...
% - display a picture when the player is deactivated.
% - efficient multiple inclusion of video files.
%
@@ -86,13 +92,15 @@
\RequirePackage{keyval}
+\ifnum\pdfminorversion<7 \pdfminorversion=7\fi
+
\def\flashmovieparamsclear{
\def\flashmoviewidth {4cm}
\def\flashmovieheight{4cm}
}
\define@key{flashmovieparams}{width} {\def\flashmoviewidth {#1}}
-\define@key{flashmovieparams}{heigth} {\def\flashmovieheight {#1}}
+\define@key{flashmovieparams}{height} {\def\flashmovieheight {#1}}
\def\flashmovieembedfile#1{
\immediate
@@ -108,6 +116,10 @@
>>}
}
+\newlength{\flashmovie@width}
+\newlength{\flashmovie@height}
+\newsavebox{\flashmovie@content}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\flashmovie{\@ifnextchar[\@flashmovie{\@flashmovie[]}}
@@ -180,17 +192,13 @@
>>}
\settingsnum=\pdflastobj
- \newlength{\xxwidth}
- \newlength{\xxheight}
- \newsavebox{\xxcontent}
-
- \sbox{\xxcontent} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
+ \sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
- \settowidth {\xxwidth} {\usebox{\xxcontent}}%
- \settoheight{\xxheight}{\usebox{\xxcontent}}%
- \usebox{\xxcontent}%
+ \settowidth {\flashmovie@width} {\usebox{\flashmovie@content}}
+ \settoheight{\flashmovie@height}{\usebox{\flashmovie@content}}
+ \usebox{\flashmovie@content}
- \pdfannot width \xxwidth height \xxheight depth 0pt {%
+ \pdfannot width \flashmovie@width height \flashmovie@height depth 0pt {
/Subtype /RichMedia
/RichMediaContent \the\contentnum\space 0 R
/RichMediaSettings \the\settingsnum\space 0 R
@@ -280,17 +288,13 @@
>>}
\settingsnum=\pdflastobj
- \newlength{\xxwidth}
- \newlength{\xxheight}
- \newsavebox{\xxcontent}
-
- \sbox{\xxcontent} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
+ \sbox{\flashmovie@content} {{\hbox to \flashmoviewidth {\vbox to \flashmovieheight { }}}}
- \settowidth {\xxwidth} {\usebox{\xxcontent}}%
- \settoheight{\xxheight}{\usebox{\xxcontent}}%
- \usebox{\xxcontent}%
+ \settowidth {\flashmovie@width} {\usebox{\flashmovie@content}}
+ \settoheight{\flashmovie@height}{\usebox{\flashmovie@content}}
+ \usebox{\flashmovie@content}
- \pdfannot width \xxwidth height \xxheight depth 0pt {%
+ \pdfannot width \flashmovie@width height \flashmovie@height depth 0pt {
/Subtype /RichMedia
/RichMediaContent \the\contentnum\space 0 R
/RichMediaSettings \the\settingsnum\space 0 R