summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-02-22 00:17:54 +0000
committerKarl Berry <karl@freefriends.org>2013-02-22 00:17:54 +0000
commit12c8d908e852185e085905e150e8b16fcfcc5074 (patch)
tree3ef50c6338af2a424ee3d33abbc727a8edf7bdb6 /Master
parent62f69243c4e9c8c098040e43607a312a5923cb83 (diff)
media9 (21feb13)
git-svn-id: svn://tug.org/texlive/trunk@29192 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog8
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin1973738 -> 1973292 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex34
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty65
4 files changed, 56 insertions, 51 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index e2ba678420d..6735e905662 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,6 +1,10 @@
+2013-02-21
+ * v0.24
+ * change: option `url' now deprecated
+
2013-02-12
* v0.23
- * fix: minor usability improvements
+ * change: minor usability improvements
2013-01-31
* v0.22
@@ -26,7 +30,7 @@
2012-11-26
* v0.17
- * updated APlayer.swf with transparent background; poster is now inserted
+ * change: updated APlayer.swf with transparent background; poster is now inserted
into the page content stream, not in the appearance dictionary
2012-11-20
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index 1f4c15fdaca..fc59627b51d 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.pdf
+++ b/Master/texmf-dist/doc/latex/media9/media9.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/media9/media9.tex b/Master/texmf-dist/doc/latex/media9/media9.tex
index 275b6c1954b..71f8bdaed89 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -165,7 +165,7 @@ passcontext
\end{verbatim}
Except for `\verb+dvipdfmx+', `\verb+xetex+' and `\verb+bigfiles+', the options above are also available (among others) as command options and will be explained shortly. However, if used as package options they have global scope, taking effect on all embedded media in the document. In turn, command options locally override global settings. Options without an argument are boolean options and can be negated by appending `\verb+=false+'.
-\XeLaTeX{} will be auto-detected. Therefore package option `\verb+xetex+' is optional. However, in case of \verb+dvipdfmx+, package option `\verb+dvipdfmx+' is mandatory because it cannot be auto-detected.
+\XeLaTeX{} will be auto-detected. Therefore package option `\verb+xetex+' is optional. However, in the case of \verb+dvipdfmx+, package option `\verb+dvipdfmx+' is mandatory because it cannot be auto-detected.
\begin{animateinline}[autoplay,loop]{1.5}\strut\emph{Important:}\newframe\newframe[5]\end{animateinline} If PDF is generated via DVI and Postscript by the command sequence \verb+latex+ $\rightarrow$ \verb+dvips+ $\rightarrow$ \verb+ps2pdf+, \verb+dvips+ option `\verb+-Ppdf+' should \emph{not} be set when converting the intermediate DVI into Postscript. If you cannot do without, put `\verb+-D 1200+' \emph{after} `\verb+-Ppdf+' on the command line. Users of \LaTeX-aware text editors with menu-driven toolchain invocation, such as \TeX{}nicCenter, should check the configuration of the \verb+dvips+ call.
@@ -180,7 +180,7 @@ Package `media9' provides commands for media inclusion (\verb+\includemedia+) an
<main Flash (SWF) file or URL | 3D (PRC, U3D) file>}
\end{verbatim}
-The last, \verb+<main Flash (SWF) file or URL | 3D (PRC, U3D) file>+, is the main interactive application to be inserted into the PDF. In case of Flash, this can be a local SWF file, or a URL, such as a YouTube video. A local file will become part of the final PDF file, while Flash content from a URL requires an internet connection when the user activates it in Adobe Reader. As for 3D content, Adobe Reader only supports U3D or PRC files embedded in the PDF; they cannot be loaded or streamed during runtime. The most frequent use of \verb+\includemedia+ will likely be embedding video or sound files for playback in Adobe Reader. For this we need some media player, which is an SWF file we embed as our main application. It will be configured to load, upon activation, a particular video or sound file that was embedded as a resource into the PDF or is to be streamed from the internet. This will be shown later. Note that a local file (main application or resource) will only once be physically embedded in order to keep final PDF file size small. If the same file (identified by MD5 checksum) appears in other \verb+\includemedia+ commands, only a reference will be inserted that points to the same storage location in the PDF.
+The last argument, \verb+<main Flash (SWF) file or URL | 3D (PRC, U3D) file>+, is the main interactive application to be inserted into the PDF. In the case of Flash, this can be a local SWF file, or a URL, such as a YouTube video player. A local file will become part of the final PDF file, while Flash content from a URL requires an internet connection when the user activates it in Adobe Reader. A URL must be fully qualified, i.\,e., starting with either `\verb+http[s]://+' or `\verb+ftp://+'. As for 3D content, Adobe Reader only supports U3D or PRC files embedded in the PDF; they cannot be loaded or streamed during runtime. The most frequent use of \verb+\includemedia+ will likely be embedding video or sound files for playback in Adobe Reader. For this we need some media player, which is an SWF file we embed as our main application. It will be configured to load, upon activation, a particular video or sound file that was embedded as a resource into the PDF or is to be streamed from the internet. This will be shown later. Note that a local file (main application or resource) will only once be physically embedded in order to keep the final PDF file size small. If the same file (identified by MD5 checksum) appears in other \verb+\includemedia+ commands, only a reference will be inserted that points to the same storage location in the PDF.
Argument \verb+<poster text>+ defines the size of the rectangular region of the document page in which the media will be displayed. Moreover, \verb+<poster text>+ will be shown in case the media has not been activated.
%(Internally, \verb+<poster text>+ is put into a \LaTeX{} box, which is used as the appearance of the PDF annotation, i.\,e. the interactive region created by \verb+\includemedia+, in PDF specification parlance.)
@@ -215,10 +215,6 @@ scale=<factor>
Scales the playback area by \verb+<factor>+.
\begin{verbatim}
-url
-\end{verbatim}
-(Flash only) The \emph{last argument} of \verb+\includemedia+ is interpreted as a URL from which the Flash content is to be downloaded on activation of the playback area. Does \emph{not} refer to online resources configured via `\verb+flashvars+' option.
-\begin{verbatim}
addresource=<local file>,
addresource=<another local file>,
...
@@ -292,7 +288,7 @@ This option directly sets the camera-to-world transformation matrix according to
\begin{verbatim}
3Dpsob=Min | Max | W | H
\end{verbatim}
-Expert option which directly sets either the \verb+/PS+ entry in case of perspective projection or the \verb+/OB+ entry in case of orthographic projection to one of the four possible values. Default value is \verb+Min+.
+Expert option which directly sets either the \verb+/PS+ entry in the case of perspective projection or the \verb+/OB+ entry in the case of orthographic projection to one of the four possible values. Default value is \verb+Min+.
\begin{verbatim}
3Droo=<r>
\end{verbatim}
@@ -311,11 +307,11 @@ Switches from the default perspective to orthographic view mode. In orthographic
\end{verbatim}
Mainly used during document authoring. Adds three entries, `\emph{\sffamily Generate Default View}', `\emph{\sffamily Get Current View}' and `\emph{\sffamily Cross Section}' to the context (right-click) menu of an activated 3D annotation. Moreover, it allows individual parts of the scene to be scaled, translated and rotated against the remaining scene objects using the keyboard. Their new position can be saved in the current view. Parts to be modified should be highlighted with the mouse first (the part's bounding box becomes visible). Then, arrow keys \keys{\arrowkeyleft}, \keys{\arrowkeyright} let the part spin around its vertical axis, and \keys{\arrowkeyup}, \keys{\arrowkeydown} tilt against the vertical position. \keys{X}, \keys{\shift+X}, \keys{Y}, \keys{\shift+Y}, \keys{Z}, \keys{\shift+Z} translate the selected part along the World axes and \keys{S}, \keys{\shift+S} scale the part.
-`\emph{\sffamily Generate Default View}' computes optimal camera settings such that the visual parts of the object fit tightly into the viewing area. The result is printed, formatted as a list of \verb+\includemedia+ options, into the JavaScript console. The calculation is based on the 3D object size and its position in the World coordinate system as well as the current viewing mode (perspective or orthographic).
+`\emph{\sffamily Generate Default View}' computes optimal camera settings such that the visible parts of the 3D scene fit tightly into the viewing area. The result is printed, formatted as a list of \verb+\includemedia+ options, into the JavaScript console. The calculation is based on the 3D object size and its position in the World coordinate system as well as the current viewing mode (perspective or orthographic).
`\emph{\sffamily Cross Section}' is a toggle switch to add or remove a cross section to or from the current view. If a part of the 3D scene was previously selected, the central rotating point of the section plane is put into the part's centre, otherwise into the target point of the camera. The section plane can be rotated around the vertical axis and tilted against its upright position using the arrow keys \keys{\arrowkeyleft}, \keys{\arrowkeyright}, \keys{\arrowkeyup} and \keys{\arrowkeydown}. Keys \keys{X}, \keys{\shift+X}, \keys{Y}, \keys{\shift+Y}, \keys{Z}, \keys{\shift+Z} move the section plane along the World axes.
-`\emph{\sffamily Get Current View}' from the context menu writes camera settings, any part alterations, an optional cross section as well as part and scene rendering attributes of the current view into the JavaScript console. The output is a readily formatted \verb+VIEW+ section to be inserted into or appended to a file of predefined views. See option `\verb+3Dviews+'. All settings reachable via the `\emph{\sffamily Part Options}' and `\emph{\sffamily Viewing Options}' context menu items are written to the \verb+VIEW+ section.
+`\emph{\sffamily Get Current View}' writes camera settings, any part alterations, an optional cross section as well as part and scene rendering attributes of the current view into the JavaScript console. The output is a readily formatted \verb+VIEW+ section to be inserted into or appended to a file of predefined views. See option `\verb+3Dviews+'. All settings reachable via the `\emph{\sffamily Part Options}' and `\emph{\sffamily Viewing Options}' context menu items are written to the \verb+VIEW+ section.
\begin{verbatim}
3Dbg=<r> <g> <b>
@@ -514,8 +510,7 @@ A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example
&autohide=1 % controlbar autohide
&showinfo=0 % no title and other info before start
&rel=0 % no related videos after end
- },
- url % Flash loaded from URL
+ }
]{}{http://www.youtube.com/v/Mdc3o7wOwNA?rel=0}
\end{Verbatim}
\vspace{1ex}
@@ -527,8 +522,7 @@ A YouTube video clip, as shown in Fig.~\ref{alien}, may serve as a basic example
&autohide=1 % controlbar autohide
&showinfo=0 % no title and other info before start
&rel=0 % no related videos after end
- },
- url % Flash loaded from URL
+ }
]{}{http://www.youtube.com/v/Mdc3o7wOwNA?rel=0}
\caption{A YouTube video as an example of a Flash application loaded from a URL.}\label{alien}
\end{figure}
@@ -640,15 +634,15 @@ parameter & description\\\hline\hline
]{}{VPlayer.swf}
\mediabutton[
- mediacommand={some_dice:playPause},
+ mediacommand=some_dice:playPause,
overface=\color{blue}{\fbox{\strut Play/Pause}},
downface=\color{red}{\fbox{\strut Play/Pause}}
]{\fbox{\strut Play/Pause}}
\mediabutton[
- mediacommand={some_dice:setSource [(random.mp4)]}
+ mediacommand=some_dice:setSource [(random.mp4)]
]{\fbox{\strut random.mp4}}
\mediabutton[
- mediacommand={some_dice:setSource [(cube.mp4)]}
+ mediacommand=some_dice:setSource [(cube.mp4)]
]{\fbox{\strut cube.mp4}}
\end{Verbatim}
\vspace{1ex}
@@ -715,8 +709,7 @@ parameter & description\\\hline\hline
/all/franceculturehautdebit.mp3
&autoPlay=true
},
- transparent,
- url % refers to APlayer.swf, not to `source' flashvar!
+ transparent
]{\color{blue}\fbox{Listen live to Radio France Culture}}{%
http://mirrors.ibiblio.org/pub/mirrors/CTAN/macros/latex/%
contrib/media9/players/APlayer.swf%
@@ -727,8 +720,7 @@ parameter & description\\\hline\hline
source=http://mp3.live.tv-radio.com/franceculture/all/franceculturehautdebit.mp3
&autoPlay=true
},
- transparent,
- url
+ transparent
]{\color{blue}\fbox{Listen live to Radio France Culture}}{%
%APlayer.swf%
%http://www.ctan.org/tex-archive/macros/latex/contrib/media9/players/APlayer.swf%
@@ -1005,7 +997,7 @@ Large media files may cause \TeX{} to interrupt with error
\begin{verbatim}
! TeX capacity exceeded, sorry [main memory size=3000000].
\end{verbatim}
-when using \verb+latex+ in \verb+dvips+ mode. While writing the DVI file, media files in the current page that are about to be embedded are kept in \TeX's memory until shipping out of the readily typeset page. In case of large or many files, this may be more than \TeX{} can cope with by default.
+when using \verb+latex+ in \verb+dvips+ mode. While writing the DVI file, media files in the current page that are about to be embedded are kept in \TeX's memory until shipping out of the readily typeset page. In the case of large or many files, this may be more than \TeX{} can cope with by default.
There are two options to handle such situations:
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index 9053ac41e5b..7b50acd2442 100644
--- a/Master/texmf-dist/tex/latex/media9/media9.sty
+++ b/Master/texmf-dist/tex/latex/media9/media9.sty
@@ -41,8 +41,8 @@
\RequirePackage{ifpdf}
\RequirePackage{atbegshi}
-\def\g@mix@date@tl{2013/02/12}
-\def\g@mix@version@tl{0.23}
+\def\g@mix@date@tl{2013/02/21}
+\def\g@mix@version@tl{0.24}
\def\g@mix@liiikerneldate{2012/07/16}
\def\g@mix@liiipkgdate{2012/07/16}
@@ -241,7 +241,6 @@
\int_gset:Nn\g@mix@page@int{\c_minus_one}
\AtBeginShipout{\int_gincr:N\g@mix@page@int}
-\bool_new:N\g_mix_url_bool
\bool_new:N\l_mix_url_bool
\bool_new:N\g_mix_iiidcalc_bool
@@ -326,7 +325,6 @@
\tl_gclear:N\g_mix_configurations_tl
\tl_gset_eq:NN\g_mix_act_tl\g_mix_pkgact_tl
\tl_gset_eq:NN\g_mix_deact_tl\g_mix_pkgdeact_tl
- \bool_gset_false:N\g_mix_url_bool
\box_clear:N\l_mix_poster_box
\tl_clear:N\l_mix_scripts_tl
\bool_gset_eq:NN\g_mix_usrdraft_bool\g_mix_pkgdraft_bool
@@ -818,6 +816,11 @@
}
\cs_new:Nn\mix_embedasset:n{ %#1 file name or url
+ %check if #1 is online resource
+ \bool_set_false:N\l_mix_url_bool
+ \regex_match:nnT{(^[Hh][Tt][Tt][Pp][Ss]?|^[Ff][Tt][Pp]):\/\/}{#1}{
+ \bool_set_true:N\l_mix_url_bool
+ }
\filename@parse{#1}
\tl_set:Nx\l_mix_base_tl{\filename@base}
\tl_set:Nx\l_mix_ext_tl{\filename@ext}
@@ -1076,27 +1079,24 @@
\mix_draftbox:n{\tl_to_str:n{#3}}
}{
%embed main asset
- \group_begin:
- \bool_set_eq:NN\l_mix_url_bool\g_mix_url_bool
- \mix_uribegin:
- \mix_embedasset:n{#3}
- \bool_if:nTF{
- \str_if_eq_p:Vn\l_mix_ext_tl{prc}||\str_if_eq_p:Vn\l_mix_ext_tl{u3d}
- }{
- \bool_gset_true:N\g_mix_iiid_bool
- \tl_gset:Nn\g_mix_mainassetsub_tl{3D}
- }{
- \str_case_x:nnn{\l_mix_base_tl}{
- {APlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Sound}}
- {AudioPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Sound}}
- {VPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
- {VideoPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
- {StrobeMediaPlayback}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
- }{\tl_gset:Nn\g_mix_mainassetsub_tl{Flash}}
- }
- \tl_gset:Nx\g_mix_mainasset_tl{~\g_mix_lastasset_tl}
- \mix_uriend:
- \group_end:
+ \mix_uribegin:
+ \mix_embedasset:n{#3}
+ \bool_if:nTF{
+ \str_if_eq_p:Vn\l_mix_ext_tl{prc}||\str_if_eq_p:Vn\l_mix_ext_tl{u3d}
+ }{
+ \bool_gset_true:N\g_mix_iiid_bool
+ \tl_gset:Nn\g_mix_mainassetsub_tl{3D}
+ }{
+ \str_case_x:nnn{\l_mix_base_tl}{
+ {APlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Sound}}
+ {AudioPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Sound}}
+ {VPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
+ {VideoPlayer}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
+ {StrobeMediaPlayback}{\tl_gset:Nn\g_mix_mainassetsub_tl{Video}}
+ }{\tl_gset:Nn\g_mix_mainassetsub_tl{Flash}}
+ }
+ \tl_gset:Nx\g_mix_mainasset_tl{~\g_mix_lastasset_tl}
+ \mix_uriend:
%secondary assets (added by addresource)
\seq_map_function:NN\g_mix_res_seq\mix_embedasset:n
\seq_map_inline:Nn\g_mix_script_seq{
@@ -1473,6 +1473,11 @@
perhaps~it~is~spelled~incorrectly.
}
+\msg_set:nnn{media9}{deprecated~option}{
+ Line~\msg_line_number: :~Option~`#1'~deprecated.\\
+ #2
+}
+
\bool_new:N\g_mix_usrdraft_bool
\bool_new:N\g_mix_opt_iiidview_bool
\bool_new:N\l_mix_roo_bool
@@ -1524,7 +1529,11 @@
scale .code:n = {\tl_gset:Nx\g_mix_scalearg_tl{#1}},
scale .value_required:,
- url .bool_gset:N = \g_mix_url_bool,
+ url .code:n = {
+ \msg_warning:nnnn{media9}{deprecated~option}{url}{
+ Instead,~use~a~fully~qualified~URL~starting~with~`http://'~or~`ftp://'.
+ }
+ },
addresource .code:n = {\seq_gput_right:Nn\g_mix_res_seq{#1}},
addresource .value_required:,
@@ -2215,7 +2224,7 @@
\tl_set:Nx\l_tmpb_tl{#1}
\regex_replace_once:nnN{[^:]+\:?}{}\l_tmpb_tl
\tl_trim_spaces:N\l_tmpb_tl
- \regex_replace_all:nnN{^\{|\}$}{}\l_tmpb_tl
+ \regex_replace_all:nnN{^\{|\}$}{}\l_tmpb_tl
\tl_set:Nx\l_mix_cmd_tl{
\exp_after:wN\mix_separate_cmd_from_actn:w\l_tmpb_tl[]\q_stop}
\tl_trim_spaces:N\l_mix_cmd_tl
@@ -2279,7 +2288,7 @@
\tl_if_blank:VF\l_tmpb_tl{
\mix_pdfobj:nnn{}{dict}{
/S/JavaScript/JS~(
- try{\l_tmpb_tl}catch(e){console.show();console.println(e)})}}
+ try{\l_tmpb_tl}catch(e){console.show();console.println(e)})}}
\bool_if:nT{
\tl_if_exist_p:c{ann@\l_tmpa_tl}&&
!\str_if_eq_x_p:nn{\tl_use:c{ann@\l_tmpa_tl}}{draft}