summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2013-03-20 21:37:48 +0000
committerKarl Berry <karl@freefriends.org>2013-03-20 21:37:48 +0000
commit88545e1fcea794d19f086a314890a8fe1b4dc891 (patch)
tree0c191164f845d6fe0ce803dcabd9a39db2ecd7a2
parentc12e1348d0914fb7b830a01270caab9a64392f83 (diff)
media9 (20mar13)
git-svn-id: svn://tug.org/texlive/trunk@29445 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/media9/ChangeLog6
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.pdfbin1964579 -> 1965301 bytes
-rw-r--r--Master/texmf-dist/doc/latex/media9/media9.tex5
-rw-r--r--Master/texmf-dist/tex/latex/media9/media9.sty76
4 files changed, 62 insertions, 25 deletions
diff --git a/Master/texmf-dist/doc/latex/media9/ChangeLog b/Master/texmf-dist/doc/latex/media9/ChangeLog
index db94e8430e9..fc82d03a38d 100644
--- a/Master/texmf-dist/doc/latex/media9/ChangeLog
+++ b/Master/texmf-dist/doc/latex/media9/ChangeLog
@@ -1,3 +1,9 @@
+2013-03-20
+ * v0.26
+ * new: specifier for floating window position on screen, default is centred
+ * v0.27
+ * fix: package option `windowed' did not work
+
2013-03-08
* v0.25
* change: VPlayer.swf with transparent background; floating media window
diff --git a/Master/texmf-dist/doc/latex/media9/media9.pdf b/Master/texmf-dist/doc/latex/media9/media9.pdf
index 2e931574a95..ef51a94cb1b 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 4dd7c9e310d..af7e936e45a 100644
--- a/Master/texmf-dist/doc/latex/media9/media9.tex
+++ b/Master/texmf-dist/doc/latex/media9/media9.tex
@@ -250,9 +250,10 @@ final
\end{verbatim}
With `\verb+draft+' the media is not embedded. Instead, a box is inserted that has the dimensions of \verb+<poster text>+, subject to the resizing options `\verb+width+', `\verb+height+', `\verb+depth+' and `\verb+scale+'. Option `\verb+final+' does the opposite as it forces the media to be embedded. Both options can be used to reduce compilation time during authoring of a document. To get the most out of them it is recommended to set `\verb+draft+' globally as a package or class option and to set `\verb+final+' locally as a command option of the media annotation that is currently worked on. After the document has been finished, the global `\verb+draft+' option can be removed.
\begin{verbatim}
-windowed[=false | <width>x<height>]
+windowed[= false | [<width>x<height>][@<position>] ]
\end{verbatim}
-The media is played in a floating window, instead of being played in an embedded fashion. The floating window size is specified via the optional argument \verb+<width>x<height>+, where the \verb+<width>+ and \verb+<height>+ values are given in pixels (numbers without unit). If the size is not given, a default size is guessed from the annotation size. `\verb+false+' can be set to override a global setting via package options.
+The media is played in a floating window, instead of being played in an embedded fashion. The floating window size is specified via the optional argument \verb+<width>x<height>+, where \verb+<width>+ and \verb+<height>+ are given in pixels (integer numbers without unit). If the size is not given, a default size is guessed from the annotation size. Optionally, the position of the floating window on the screen can be specified through \verb+@<position>+, where \verb+<position>+ may assume one of `\verb+tl+', `\verb+cl+', `\verb+bl+', `\verb+bc+', `\verb+br+', `\verb+cr+', `\verb+tr+', `\verb+tc+' or `\verb+cc+'. The position specifiers have the following meaning:\quad{\fboxsep=1pt\fbox{\vtop{\hbox{\ttfamily\fbox{\rule{0pt}{1.5ex}tl} \fbox{\rule{0pt}{1.5ex}tc} \fbox{\rule{0pt}{1.5ex}tr}} \hbox{\ttfamily\fbox{\rule{0pt}{1.5ex}cl} \fbox{\rule{0pt}{1.5ex}cc} \fbox{\rule{0pt}{1.5ex}cr}} \hbox{\ttfamily\fbox{\rule{0pt}{1.5ex}bl} \fbox{\rule{0pt}{1.5ex}bc} \fbox{\rule{0pt}{1.5ex}br}}}}}\\[0.5ex]
+Default window position is `\verb+cc+', that is, centred on the screen. `\verb+false+' can be set to override a global setting via package options.
\begin{verbatim}
transparent
\end{verbatim}
diff --git a/Master/texmf-dist/tex/latex/media9/media9.sty b/Master/texmf-dist/tex/latex/media9/media9.sty
index 04f15a8f28d..fbddb205561 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/03/08}
-\def\g@mix@version@tl{0.25}
+\def\g@mix@date@tl{2013/03/20}
+\def\g@mix@version@tl{0.27}
\def\g@mix@liiikerneldate{2012/07/16}
\def\g@mix@liiipkgdate{2012/07/16}
@@ -104,7 +104,8 @@
\bool_new:N\g_mix_dvipdfmx_bool
\bool_new:N\g_mix_pkgdraft_bool
\bool_new:N\g_mix_opt_pkgwindowed_bool
-\tl_gset:Nx\g_mix_pkgwindowed_tl{defaultxdefault}
+\tl_gset:Nx\g_mix_pkgwinsize_tl{defaultxdefault}
+\tl_gset:Nx\g_mix_pkgwinpos_tl{cc}
\tl_gset:Nn\g_mix_pkgact_tl{/XA}
\tl_gset:Nn\g_mix_pkgdeact_tl{/PC}
\tl_gset:Nn\g_mix_pkgtransp_tl{false}
@@ -119,6 +120,32 @@
\tl_gclear:N\g_mix_pkgopt_ls_tl
\tl_gclear:N\g_mix_pkgopt_rm_tl
\bool_new:N\g_mix_pkgiiidcalc_bool
+
+%floating window settings
+\group_begin:
+\char_set_lccode:nn{`\+}{`\@}
+\tl_to_lowercase:n{
+ \group_end:
+ \cs_new:Npn\mix_parse_windowedarg:w#1+#2+#3\q_stop{
+ \tl_if_blank:nF{#1}{\tl_gset:Nn\g_mix_winsize_tl{#1}}
+ \tl_if_blank:nF{#2}{\tl_gset:Nn\g_mix_winpos_tl{#2}}
+ }
+ \cs_new:Nn\mix_parse_windowedarg:N{
+ \exp_after:wN\mix_parse_windowedarg:w#1++\q_stop
+ }
+}
+\cs_new:Npn\mix_parse_winsizearg:w#1x#2\q_stop{
+ \str_if_eq:nnTF{#1}{default}{
+ \tl_gset:Nx\tl_mix_fltwd{
+ \fp_to_int:n{1.522*\__dim_strip_bp:n{\l_mix_wd_tl}}}
+ \tl_gset:Nx\tl_mix_fltht{
+ \fp_to_int:n{1.522*\__dim_strip_bp:n{\l_mix_tt_tl}}}
+ }{
+ \tl_gset:Nn\tl_mix_fltwd{#1}
+ \tl_gset:Nn\tl_mix_fltht{#2}
+ }
+}
+
\keys_define:nn{media9}{
dvipdfmx .bool_gset:N = \g_mix_dvipdfmx_bool,
xetex .bool_gset:N = \g_mix_dvipdfmx_bool,
@@ -161,14 +188,17 @@
passcontext .default:n = {true},
windowed .code:n = {
- \str_if_eq_p:nnTF{#1}{false}{
+ \str_if_eq:nnTF{#1}{false}{
\bool_gset_false:N\g_mix_opt_pkgwindowed_bool
}{
\bool_gset_true:N\g_mix_opt_pkgwindowed_bool
- \tl_gset:Nx\g_mix_pkgwindowed_tl{#1}
+ \tl_set:Nx\l_tmpa_tl{#1}
+ \tl_remove_all:Nn\l_tmpa_tl{~}
+ \mix_parse_windowedarg:N\l_tmpa_tl
+ \tl_gset_eq:NN\g_mix_pkgwinsize_tl\g_mix_winsize_tl
+ \tl_gset_eq:NN\g_mix_pkgwinpos_tl\g_mix_winpos_tl
}
},
- windowed .default:n = {defaultxdefault},
%3D specific options
3Dplaytype .choice:,
@@ -338,7 +368,8 @@
\tl_gset_eq:NN\g_mix_transp_tl\g_mix_pkgtransp_tl
\tl_gset_eq:NN\g_mix_contextclick_tl\g_mix_pkgcontextclick_tl
\bool_gset_eq:NN\g_mix_opt_windowed_bool\g_mix_opt_pkgwindowed_bool
- \tl_gset_eq:NN\g_mix_windowed_tl\g_mix_pkgwindowed_tl
+ \tl_gset_eq:NN\g_mix_winsize_tl\g_mix_pkgwinsize_tl
+ \tl_gset_eq:NN\g_mix_winpos_tl\g_mix_pkgwinpos_tl
%3D specific settings
\bool_gset_false:N\g_mix_iiid_bool
@@ -1207,7 +1238,7 @@
}
%determine floating window size
\bool_if:NT\g_mix_opt_windowed_bool{
- \exp_after:wN\mix_parse_windowedarg:w\g_mix_windowed_tl\q_stop
+ \exp_after:wN\mix_parse_winsizearg:w\g_mix_winsize_tl\q_stop
}
\mix_pdfobj:nnn{}{dict}{
/Activation~<<
@@ -1235,7 +1266,17 @@
/Width~<</Default~\tl_mix_fltwd>>
/Height~<</Default~\tl_mix_fltht>>
/Position~<<
- /HAlign/Center/VAlign/Center/HOffset~0/VOffset~0
+ /HOffset~0/VOffset~0
+ \str_case_x:nnn{\g_mix_winpos_tl}{
+ {tl}{/VAlign/Near/HAlign/Near}
+ {cl}{/VAlign/Center/HAlign/Near}
+ {bl}{/VAlign/Far/HAlign/Near}
+ {bc}{/VAlign/Far/HAlign/Center}
+ {br}{/VAlign/Far/HAlign/Far}
+ {cr}{/VAlign/Center/HAlign/Far}
+ {tr}{/VAlign/Near/HAlign/Far}
+ {tc}{/VAlign/Near/HAlign/Center}
+ }{/HAlign/Center/VAlign/Center}
>>
>>
}{
@@ -1456,18 +1497,6 @@
}
}
-\cs_new:Npn\mix_parse_windowedarg:w#1x#2\q_stop{
- \str_if_eq:nnTF{#1}{default}{
- \tl_gset:Nx\tl_mix_fltwd{
- \fp_to_int:n{1.522*\__dim_strip_bp:n{\l_mix_wd_tl}}}
- \tl_gset:Nx\tl_mix_fltht{
- \fp_to_int:n{1.522*\__dim_strip_bp:n{\l_mix_tt_tl}}}
- }{
- \tl_gset:Nn\tl_mix_fltwd{#1}
- \tl_gset:Nn\tl_mix_fltht{#2}
- }
-}
-
%document command options
\msg_set:nnnn{media9}{unknown~option}{
@@ -1584,10 +1613,11 @@
\bool_gset_false:N\g_mix_opt_windowed_bool
}{
\bool_gset_true:N\g_mix_opt_windowed_bool
- \tl_gset:Nx\g_mix_windowed_tl{#1}
+ \tl_set:Nx\l_tmpa_tl{#1}
+ \tl_remove_all:Nn\l_tmpa_tl{~}
+ \mix_parse_windowedarg:N\l_tmpa_tl
}
},
- windowed .default:n = {defaultxdefault},
%3D specific options
3Dplaytype .choice:,