diff options
author | Karl Berry <karl@freefriends.org> | 2013-02-22 00:17:54 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-02-22 00:17:54 +0000 |
commit | 12c8d908e852185e085905e150e8b16fcfcc5074 (patch) | |
tree | 3ef50c6338af2a424ee3d33abbc727a8edf7bdb6 /Master/texmf-dist/tex/latex/media9/media9.sty | |
parent | 62f69243c4e9c8c098040e43607a312a5923cb83 (diff) |
media9 (21feb13)
git-svn-id: svn://tug.org/texlive/trunk@29192 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/media9/media9.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/media9/media9.sty | 65 |
1 files changed, 37 insertions, 28 deletions
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} |