summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-24 23:48:12 +0000
committerKarl Berry <karl@freefriends.org>2015-11-24 23:48:12 +0000
commit390df2a30cd73b8a6a7cfe217eb7f12e29df9a27 (patch)
treeeaab2dead176fac0f420d26aee9a589aa807118e /Master/texmf-dist/source
parentf93faaa13d53d6bb5b69098ba27a1a1252bfb81b (diff)
bidi (24nov15)
git-svn-id: svn://tug.org/texlive/trunk@38941 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.dtx684
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.ins2
2 files changed, 678 insertions, 8 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index b3fb5f3c869..0b1878963b8 100644
--- a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
+++ b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
@@ -5,7 +5,7 @@
%<*readme>
___________________
The bidi package
-v18.8
+v18.9
This package provides a convenient interface for typesetting
bidirectional texts in Plain TeX and LaTeX, using XeTeX engine.
@@ -25,7 +25,7 @@ a minimal working example showing the issue, and always choose the appropriate
label for your query (i.e. if you are reporting any bugs, choose `Bug' label).
-Current version release date: 2015/11/23
+Current version release date: 2015/11/24
___________________
Vafa Khalighi
@@ -68,6 +68,7 @@ by Vafa Khalighi.
\generate{\file{amsmath-xetex-bidi.def}{\from{\jobname.dtx}{table,amsmath-xetex-bidi.def}}}
\generate{\file{amstext-xetex-bidi.def}{\from{\jobname.dtx}{table,amstext-xetex-bidi.def}}}
\generate{\file{amsthm-xetex-bidi.def}{\from{\jobname.dtx}{table,amsthm-xetex-bidi.def}}}
+\generate{\file{animate-xetex-bidi.def}{\from{\jobname.dtx}{table,animate-xetex-bidi.def}}}
\generate{\file{array-xetex-bidi.def}{\from{\jobname.dtx}{table,array-xetex-bidi.def}}}
\generate{\file{article-xetex-bidi.def}{\from{\jobname.dtx}{table,article-xetex-bidi.def}}}
\generate{\file{artikel1-xetex-bidi.def}{\from{\jobname.dtx}{table,artikel1-xetex-bidi.def}}}
@@ -137,6 +138,7 @@ by Vafa Khalighi.
\generate{\file{loadingorder-xetex-bidi.def}{\from{\jobname.dtx}{table,loadingorder-xetex-bidi.def}}}
\generate{\file{longtable-xetex-bidi.def}{\from{\jobname.dtx}{table,longtable-xetex-bidi.def}}}
\generate{\file{mdframed-xetex-bidi.def}{\from{\jobname.dtx}{table,mdframed-xetex-bidi.def}}}
+\generate{\file{bidi-media9.sty}{\from{\jobname.dtx}{table,bidi-media9.sty}}}
\generate{\file{memoir-xetex-bidi.def}{\from{\jobname.dtx}{table,memoir-xetex-bidi.def}}}
\generate{\file{midfloat-xetex-bidi.def}{\from{\jobname.dtx}{table,midfloat-xetex-bidi.def}}}
\generate{\file{minitoc-xetex-bidi.def}{\from{\jobname.dtx}{table,minitoc-xetex-bidi.def}}}
@@ -319,7 +321,7 @@ by Vafa Khalighi.
%\changes{v13.9}{2013/09/23}{Added implementaion of the package.}
% \title{\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}\\
%\LARGE Bidirectional typesetting in plain \TeX{} and \LaTeX, using \XeTeX{} engine\\[5pt]
-%\large Documentation for \textcolor{blue!65!black}{version 18.8}}
+%\large Documentation for \textcolor{blue!65!black}{version 18.9}}
% \author{Vafa Khalighi\\
% \url{persian-tex@tug.org}}
%\setcounter{page}{0}
@@ -330,7 +332,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Documentation for \textcolor{blue!65!black}{version 18.8}}
+%Documentation for \textcolor{blue!65!black}{version 18.9}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -381,7 +383,7 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2009--2015 Vafa Khalighi
%*
-%* 2015/11/23, v18.8
+%* 2015/11/24, v18.9
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -1138,7 +1140,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{45036}
+%% \CheckSum{45985}
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -1556,6 +1558,230 @@ by Vafa Khalighi.
% \end{macrocode}
% \iffalse
%</amsthm-xetex-bidi.def>
+%<*animate-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{animate-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{animate-xetex-bidi.def}[2015/11/24 v0.1 bidi adaptations for animate package for XeTeX engine]
+
+
+%user command for embedding animation sequence
+% #1: options
+% #2: frame rate (fps)
+% #3: basename of graphics file sequence (without frame number and extension)
+% #4: first frame (integer)
+% #5: last frame (integer)
+\renewcommand{\animategraphics}[5][]{%
+ \@anim@endsanitize%
+ \leavevmode%
+ \ifpdf\else%
+ \if@anim@grxloaded%
+ \if@anim@xetex%
+ \DeclareGraphicsRule{.mps}{eps}{*}{}%
+ \fi%
+ \else%
+ \if@anim@xetex%
+ \@anim@missing[xetex]{graphicx}%
+ \else%
+ \if@anim@dvipdfmx%
+ \@anim@missing[dvipdfmx]{graphicx}%
+ \else%
+ \@anim@missing{graphicx}%
+ \fi%
+ \fi%
+ \fi%
+ \fi%
+ \@anim@reset% to default settings
+ \begingroup% make use of graphic[xs] search path
+ \beginL%
+ \ifcsname Ginput@path\endcsname%
+ \let\input@path\Ginput@path%
+ \fi%
+ %
+ \setkeys{anim@user}{#1}%
+ \ifthenelse{\boolean{@anim@autoplay}\OR\boolean{@anim@autoresume}}{%
+ \setboolean{@anim@autoplayorresume}{true}%
+ }{}%
+ \ifthenelse{\boolean{@anim@controls}\OR\boolean{@anim@palindrome}}{%
+ \setboolean{@anim@morejs}{true}%
+ }{}%
+ \ifx\empty\@anim@label\empty\else%
+ \setboolean{@anim@morejs}{true}%
+ \fi%
+ \ifthenelse{\NOT\boolean{@anim@controls}\AND\boolean{@anim@step}}{%
+ \setboolean{@anim@loop}{true}%
+ }{}%
+ \def\@anim@base{#3}%
+ \def\@anim@first{#4}%
+ \def\@anim@last{#5}%
+ %
+ \@anim@checkmultipage{\@anim@base}{\@anim@ftype}%test for multipage file
+ \if@anim@multipage\else% cope with wrong user input
+ \ifthenelse{\equal{#4}{}\OR\equal{#5}{}}{%
+ \PackageError{animate}{%
+ Missing frame number in \protect\animategraphics\space command%
+ }{}%
+ }{}%
+ \ifthenelse{\@anim@first<\z@\OR\@anim@last<\z@}{%
+ \PackageError{animate}{%
+ Negative frame numbers not allowed%
+ }{}%
+ }{}%
+ \fi%
+ \def\@anim@relop{>}%
+ \edef\@anim@numtemplate{\@anim@first}%
+ \ifnum\@anim@first>\@anim@last%
+ \edef\@anim@every{-\@anim@every}%
+ \def\@anim@relop{<}%
+ \edef\@anim@numtemplate{\@anim@last}%
+ \fi%
+ \global\@anim@curframe=\@anim@first%
+ \global\@anim@curframe@zb=\z@%
+ %
+ \if@anim@draft%
+ \if@anim@multipage%
+ %store file in a box
+ \@anim@filebox{\@anim@pathtofile}{\@anim@first}%
+ \else%
+ %get file name extension
+ \@anim@getpath{\@anim@base\@anim@first}{\@anim@ftype}%
+ \@anim@filebox{\@anim@pathtofile}{1}%
+ \fi%
+ \@anim@scale{\@anim@box}%
+ %draw draftbox according to dimensions of the first frame
+ \@anim@draftbox%
+ \else%
+ \if@anim@controls%
+ %create button faces only once in the current colour combination
+ \ifcsname
+ btncol:\@anim@bgcolour:\@anim@fgcolour\endcsname\else%
+ \@anim@makebuttons{\the\@anim@num}%
+ \@anim@newkey{btncol:\@anim@bgcolour:\@anim@fgcolour}{\the\@anim@num}%
+ \fi%
+ \fi%
+ \xdef\@anim@nfps{#2\space}% current frame rate
+ \xdef\@anim@nfps{\expandafter\zap@space\@anim@nfps\@empty}%
+ \ifdim\@anim@nfps\p@<\z@%
+ \PackageError{animate}{%
+ Negative frame rate `\@anim@nfps' is not allowed%
+ }{}%
+ \fi%
+ \xdef\@anim@fps{\@anim@nfps}%
+ %
+ %read all frames of the sequence
+ \loop\ifnum\@anim@curframe\@anim@relop\@anim@last\else%
+ \if@anim@multipage%
+ %embed graphics
+ \@anim@ximage{\the\@anim@num}{\the\@anim@curframe@zb}{%
+ \@anim@pathtofile}{\the\@anim@curframe}%
+ \else%
+ %get path to current file end its extension
+ \@anim@getpath{%
+ \@anim@base\@anim@pad{\@anim@numtemplate}{\the\@anim@curframe}%
+ }{\@anim@ftype}%
+ %embed graphics
+ \@anim@ximage{\the\@anim@num}{\the\@anim@curframe@zb}{%
+ \@anim@pathtofile}{1}%
+ \fi%
+ \global\advance\@anim@curframe by \@anim@every%
+ \global\advance\@anim@curframe@zb by \@ne%
+ \repeat%
+ \xdef\@anim@frames{\the\@anim@curframe@zb}% total number
+ \global\@anim@tmpcnt=\@anim@frames%
+ \global\advance\@anim@tmpcnt by -\@ne%
+ \xdef\@anim@maxframe{\the\@anim@tmpcnt}% highest frame index
+ %build timeline from optional timeline file
+ \@anim@sanitizeJS%
+ \if@anim@timeline\@anim@buildtmln{\the\@anim@num}\fi%
+ %insert animation widget & controls
+ \@anim@insertwidgets{\the\@anim@num}{%
+ \@anim@getkeyval{btncol:\@anim@bgcolour:\@anim@fgcolour}}%
+ \@anim@endsanitize%
+ \fi%
+ \endL%
+ \endgroup%
+ \global\advance\@anim@num by \@ne%
+}%
+%adjust catcode of `:' character within \animategraphics
+\let\@anim@animategraphics\animategraphics
+\def\animategraphics{\@anim@sanitizeColon\@anim@animategraphics}
+
+
+
+%user environment for animating inline graphics
+% #1: options
+% #2: frame rate (fps)
+\renewenvironment{animateinline}[2][]{%
+ \@anim@endsanitize%
+ \leavevmode%
+ \setboolean{@anim@inside}{true}%
+ \@anim@reset% to default settings
+ \begingroup%
+ \beginL%
+ % make use of graphic[xs] search path
+ \ifcsname Ginput@path\endcsname%
+ \let\input@path\Ginput@path%
+ \fi%
+ \setkeys{anim@user}{#1}%
+ \ifthenelse{\boolean{@anim@autoplay}\OR\boolean{@anim@autoresume}}{%
+ \setboolean{@anim@autoplayorresume}{true}%
+ }{}%
+ \ifthenelse{\boolean{@anim@controls}\OR\boolean{@anim@palindrome}}{%
+ \setboolean{@anim@morejs}{true}%
+ }{}%
+ \ifx\empty\@anim@label\empty\else%
+ \setboolean{@anim@morejs}{true}%
+ \fi%
+ \ifthenelse{\NOT\boolean{@anim@controls}\AND\boolean{@anim@step}}{%
+ \setboolean{@anim@loop}{true}%
+ }{}%
+ \global\@anim@curframe@zb=\z@%
+ \global\@anim@skipfram=\z@%
+ \if@anim@draft\else%
+ %create button faces if necessary
+ \if@anim@controls%
+ \ifcsname
+ btncol:\@anim@bgcolour:\@anim@fgcolour\endcsname\else%
+ \@anim@makebuttons{\the\@anim@num}%
+ \@anim@newkey{btncol:\@anim@bgcolour:\@anim@fgcolour}{\the\@anim@num}%
+ \fi%
+ \fi%
+ \if@anim@step\else%
+ \xdef\@anim@nfps{-1}%
+ \@anim@processfpsarg{#2}%
+ \fi%
+ \fi%
+ \ifdefined\NoHyper\NoHyper\fi% silently suppress any hyperref specials
+ \@anim@beginframe%
+ \ignorespaces%
+}{%
+ \unskip%
+ \@anim@endframe{\the\@anim@num}{\the\@anim@curframe@zb}%
+ \ifdefined\endNoHyper\endNoHyper\fi%
+ \global\advance\@anim@curframe@zb by \@ne%
+ \if@anim@draft\else%
+ \xdef\@anim@frames{\the\@anim@curframe@zb}% total number
+ \global\@anim@tmpcnt=\@anim@frames%
+ \global\advance\@anim@tmpcnt by -\@ne%
+ \xdef\@anim@maxframe{\the\@anim@tmpcnt}% highest frame index
+ %build timeline from optional timeline file
+ \@anim@sanitizeJS%
+ \if@anim@timeline\@anim@buildtmln{\the\@anim@num}\fi%
+ %insert animation widget & controls
+ \@anim@insertwidgets{\the\@anim@num}{%
+ \@anim@getkeyval{btncol:\@anim@bgcolour:\@anim@fgcolour}}%
+ \@anim@endsanitize%
+ \fi%
+ \endL%
+ \endgroup%
+ \global\advance\@anim@num by \@ne%
+ \setboolean{@anim@inside}{false}%
+}
+\let\@anim@animateinline\animateinline
+\def\animateinline{\@anim@sanitizeColon\@anim@animateinline}
+% \end{macrocode}
+% \iffalse
+%</animate-xetex-bidi.def>
%<*array-xetex-bidi.def>
%\fi
% \subsection{\textsf{array-xetex-bidi.def}}
@@ -2749,8 +2975,8 @@ by Vafa Khalighi.
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2015/11/23}
-\def\bidiversion{v18.8}
+\def\bididate{2015/11/24}
+\def\bidiversion{v18.9}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -13398,6 +13624,7 @@ bidi implementation of tufte title]
\bidi@isloaded{amsmath}
\bidi@isloaded{amstext}
\bidi@isloaded{amsthm}
+\bidi@isloaded{animate}
\bidi@isloaded{breqn}
\bidi@isloaded{cals}
\bidi@isloaded{caption}
@@ -13432,6 +13659,7 @@ bidi implementation of tufte title]
\bidi@isloaded{pdfpages}
\bidi@isloaded{listings}
\bidi@isloaded{lettrine}
+\bidi@isloaded{media9}
\bidi@isloaded{pstricks}
\bidi@isloaded{pgf}
\bidi@isloaded{picinpar}
@@ -13473,6 +13701,9 @@ bidi implementation of tufte title]
\if@bidi@amsthmloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package amsthm after bidi package. Please load package amsthm before bidi package, and then try to run xelatex on your document again}{}]{amsthm}
\fi%
+ \if@bidi@animateloaded@\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package animate after bidi package. Please load package animate before bidi package, and then try to run xelatex on your document again}{}]{animate}
+ \fi%
\if@bidi@breqnloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package breqn after bidi package. Please load package breqn before bidi package, and then try to run xelatex on your document again}{}]{breqn}
\fi%
@@ -13570,6 +13801,9 @@ bidi implementation of tufte title]
\if@bidi@listingsloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package listings after bidi package. Please load package listings before bidi package, and then try to run xelatex on your document again}{}]{listings}
\fi%
+ \csname if@bidi@media9loaded@\endcsname\else
+ \bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package media9 after bidi package. Please load package media9 before bidi package, and then try to run xelatex on your document again}{}]{media9}
+ \fi%
\if@bidi@pstricksloaded@\else
\bidi@isloaded[\PackageError{bidi}{Oops! you have loaded package pstricks after bidi package. Please load package pstricks before bidi package, and then try to run xelatex on your document again}{}]{pstricks}
\fi%
@@ -13834,6 +14068,438 @@ bidi implementation of tufte title]
% \end{macrocode}
% \iffalse
%</mdframed-xetex-bidi.def>
+%<*bidi-media9.sty>
+%\fi
+% \subsection{\textsf{bidi-media9.sty}}
+% \begin{macrocode}
+\ProvidesExplPackage{bidi-media9}{2015/11/24}{0.1}
+{bidi fixes for media9 package for the XeTeX engine}
+
+\keys_define:nn{media9/mbtn}{
+ overface .code:n = {
+ \hbox_set:Nn\l_mix_poster_box{\if@RTL\beginR\fi#1\if@RTL\endR\fi}
+ \mix_pdfxform:n{\l_mix_poster_box}
+ \tl_gset:Nx\g_mix_overbtn_tl{\mix_pdflastxform:}
+ },
+ overface .value_required:n = {true},
+
+ downface .code:n = {
+ \hbox_set:Nn\l_mix_poster_box{\if@RTL\beginR\fi#1\if@RTL\endR\fi}
+ \mix_pdfxform:n{\l_mix_poster_box}
+ \tl_gset:Nx\g_mix_downbtn_tl{\mix_pdflastxform:}
+ },
+ downface .value_required:n = {true}
+}
+
+
+
+
+\RenewDocumentCommand\includemedia{O{}mm}{%#1 options, #2 text/image #3 media file
+ \mix_uriend:
+ \group_begin:
+ \beginL
+ \leavevmode
+ %empty stream as appearance dummy
+ \cs_if_exist:NF\g_mix_appearance_tl{
+ \hbox_set:Nn\l_mix_poster_box{\phantom{\rule{1pt}{1pt}}}
+ \mix_pdfxform:n{\l_mix_poster_box}
+ \tl_gset:Nx\g_mix_appearance_tl{\mix_pdflastxform:}
+ }
+ \mix_reset:
+ \mix_uribegin: %treat URI characters correctly
+ \keys_set:nn{media9/user}{#1}
+ \mix_uriend:
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{~&}{&}
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{&~}{&}
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{~=}{=}
+ \tl_greplace_all:Nnn\g_mix_flashvars_tl{=~}{=}
+ \tl_gtrim_spaces:N\g_mix_flashvars_tl
+
+ \cs_if_exist:NT\Ginput@path{\cs_set_eq:NN\input@path\Ginput@path}
+
+ \hbox_set:Nn\l_mix_poster_box{\group_begin:\if@RTL\beginR\fi#2\if@RTL\endR\fi\group_end:}
+ %\hbox_set:Nn\l_mix_poster_box{#2}
+ \mix_scale:n{\l_mix_poster_box}
+ \bool_if:nT{
+ \dim_compare_p:n{\g_mix_tt_tl=\c_zero_dim}||
+ \dim_compare_p:n{\g_mix_wd_tl=\c_zero_dim}
+ }{
+ \tl_gset:Nn\g_mix_usrpbtn_tl{none}
+ }
+ \bool_if:NTF\g_mix_usrdraft_bool{
+ \tl_if_empty:NF\g_mix_usrlabel_tl{
+ \mix_keytoaux_now:nn{ann@\g_mix_usrlabel_tl}{draft}
+ }
+ \tl_if_blank:oTF{#2}{
+ \mix_uribegin: %treat URI characters correctly
+ \mix_draftbox:n{\tl_to_str:n{#3}}
+ \mix_uriend:
+ }{
+ \hbox_to_wd:nn{\g_mix_wd_tl}{
+ \vrule~width~\c_zero_dim~height~\g_mix_ht_tl~depth~\g_mix_dp_tl
+ \box_use:N\l_mix_poster_box\hss
+ }
+ }
+ }{
+ \bool_if:nF{\str_if_eq_p:Vn\g_mix_usrpbtn_tl{none}}{
+ %attach script that switches off play button overlay upon activation
+ \mix_pdfobj:nnn{}{stream}{
+ var~ocgs=host.getOCGs(host.pageNum);
+ for(var~i=0;i<ocgs.length;i++){
+ if(ocgs[i].name=='MediaPlayButton\int_use:N\g_mix_rmcnt_int'){
+ ocgs[i].state=false;
+ }
+ }
+ }
+ \mix_pdfobj:nnn{}{dict}{
+ /Type/Filespec/EF~<</F~\mix_pdflastobj:>>/F~(btnoff)%/UF~(btnoff)
+ }
+ \tl_gset:Nx\g_mix_assets_tl{(btnoff)~\mix_pdflastobj:}
+ \tl_set:Nx\l_mix_scripts_tl{~\mix_pdflastobj:~}
+ %enforce plain playbutton overlay for XeTeX
+ \sys_if_engine_xetex:T{\tl_gset:Nn\g_mix_usrpbtn_tl{plain}}
+ }
+ %embed main asset
+ \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:nnF{\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{
+ \mix_embedasset:n{##1}
+ \tl_put_right:Nx\l_mix_scripts_tl{~\g_mix_lastasset_tl}
+ }
+ %attach 3D calculation script
+ \bool_if:nT{\g_mix_iiid_bool && \g_mix_iiidcalc_bool}{
+ \mix_embedasset:n{3Dmenu.js}
+ \tl_put_left:Nx\l_mix_scripts_tl{\g_mix_lastasset_tl~}
+ }
+ %create 3D views from file (option 3Dviews)
+ \bool_if:nT{\g_mix_iiid_bool && !(\tl_if_blank_p:V\g_mix_vfile_tl)}{
+ \tl_set:Nn\l_mix_level_tl{\c_minus_one}
+ \int_zero:N\l_mix_viewcnt_int
+ \int_zero:N\l_mix_lineno_int
+
+ \ior_open:Nn\l_mix_vfile_stream{\g_mix_vfile_tl}
+ \ior_map_inline:Nn\l_mix_vfile_stream{
+ \int_incr:N\l_mix_lineno_int
+ \keys_set:nn{media9/views}{##1} %process input line
+ }
+ \ior_close:N\l_mix_vfile_stream
+ }
+ \bool_if:nT{ %create default 3D view if required
+ \g_mix_iiid_bool &&
+ (\g_mix_opt_iiidview_bool || \tl_if_blank_p:V\l_mix_iiidviewarray_tl)
+ }{
+ \tl_set_eq:NN\l_mix_bg_tl\g_mix_opt_bg_tl
+ \tl_set_eq:NN\l_mix_ls_tl\g_mix_opt_ls_tl
+ \tl_set_eq:NN\l_mix_rm_tl\g_mix_opt_rm_tl
+ \tl_set_eq:NN\l_mix_psob_tl\g_mix_opt_psob_tl
+ \tl_set_eq:NN\l_mix_coo_tl\g_mix_opt_coo_tl
+ \tl_set_eq:NN\l_mix_ctoc_tl\g_mix_opt_ctoc_tl
+ \tl_set_eq:NN\l_mix_ciiw_tl\g_mix_opt_ciiw_tl
+
+ \fp_set_eq:NN\l_mix_roo_fp\g_mix_opt_roo_fp
+ \fp_set_eq:NN\l_mix_aac_fp\g_mix_opt_aac_fp
+ \fp_set_eq:NN\l_mix_oscale_fp\g_mix_opt_oscale_fp
+ \fp_set_eq:NN\l_mix_roll_fp\g_mix_opt_roll_fp
+
+ \bool_set_eq:NN\l_mix_ciiw_bool\g_mix_opt_ciiw_bool
+ \bool_set_eq:NN\l_mix_iiidortho_bool\g_mix_opt_iiidortho_bool
+ \tl_clear:N\l_mix_naarray_tl
+
+ \bool_if:NF\l_mix_ciiw_bool{
+ \tl_set:Nx\l_mix_args_tl{\l_mix_coo_tl\space\l_mix_ctoc_tl\space}
+ \exp_after:wN\mix_calc_ciiw:w\l_mix_args_tl\q_stop
+ }
+
+ \tl_clear:N\l_mix_naarray_tl
+ \tl_clear:N\l_mix_saarray_tl
+ \tl_set_eq:NN\l_mix_nr_tl\g_mix_nrdflt_tl
+
+ \mix_view:n{Default}
+ \tl_set:Nx\l_mix_dfltview_tl{\mix_pdflastobj:}
+
+ }
+ \mix_pdfobj:nnn{}{dict}{
+ /Type/RichMediaInstance
+ /Subtype/\g_mix_mainassetsub_tl
+ /Asset~\g_mix_mainasset_tl
+ \bool_if:NF\g_mix_iiid_bool{
+ /Params~<<
+ /Binding\str_if_eq:VnTF\g_mix_transp_tl{true}{
+ /Foreground
+ }{
+ /Background
+ }
+ \tl_if_blank:VF\g_mix_flashvars_tl{
+ /FlashVars~(\g_mix_flashvars_tl)
+ }
+ >>
+ }
+ }
+ \tl_if_empty:NF\g_mix_usrlabel_tl{
+ \mix_keytoaux_now:nn{main@\g_mix_usrlabel_tl}{\mix_pdflastobj:}
+ }
+ \mix_pdfobj:nnn{}{dict}{
+ /Type/RichMediaConfiguration
+ /Subtype/\g_mix_mainassetsub_tl
+ /Instances~[\mix_pdflastobj:]
+ }
+ \mix_pdfobj:nnn{}{dict}{
+ /Type/RichMediaContent
+ /Assets~<</Names~[\g_mix_assets_tl]>>
+ /Configurations~[\mix_pdflastobj:]
+ \bool_if:nT{
+ \g_mix_iiid_bool && !(\tl_if_empty_p:V\l_mix_iiidviewarray_tl)
+ }{
+ /Views~[\l_mix_iiidviewarray_tl]
+ }
+ }
+ \tl_set:Nx\l_mix_content_tl{\mix_pdflastobj:}
+ \bool_if:nT{
+ \g_mix_iiid_bool && \str_if_eq_p:Vn\g_mix_playtpe_tl{Oscillating}
+ }{
+ \tl_gset:Nx\g_mix_playcnt_tl{\int_eval:n{\g_mix_playcnt_tl*2}}
+ }
+ %determine floating window size
+ \bool_if:NT\g_mix_opt_windowed_bool{
+ \exp_after:wN\mix_parse_winsizearg:w\g_mix_winsize_tl\q_stop
+ }
+ \mix_pdfobj:nnn{}{dict}{
+ /Activation~<<
+ /Condition\g_mix_act_tl
+ \bool_if:nT{
+ \g_mix_iiid_bool &&
+ !(\str_if_eq_p:Vn\g_mix_playtpe_tl{None})
+ }{%seems to work only with 3D content
+ /Animation~<<
+ /Subtype/\g_mix_playtpe_tl
+ /PlayCount~\g_mix_playcnt_tl
+ /Speed~\g_mix_playspd_tl
+ >>
+ }
+ \bool_if:nT{
+ \g_mix_iiid_bool && (
+ \g_mix_opt_iiidview_bool || \tl_if_blank_p:V\l_mix_iiidviewarray_tl
+ )
+ }{/View~\l_mix_dfltview_tl}
+ /Presentation~<<
+ /Transparent~\g_mix_transp_tl
+ \bool_if:NTF\g_mix_opt_windowed_bool{
+ /Style/Windowed
+ /Window~<<
+ /Width~<</Default~\tl_mix_fltwd>>
+ /Height~<</Default~\tl_mix_fltht>>
+ /Position~<<
+ /HOffset~0/VOffset~0
+ \str_case_x:nnF{\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}
+ >>
+ >>
+ }{
+ /Style/Embedded
+ }
+ \bool_if:NTF\g_mix_iiid_bool{
+ /Toolbar~\g_mix_tools_tl
+ /NavigationPane~\g_mix_nav_tl
+ }{
+ /PassContextClick~\g_mix_contextclick_tl
+ }
+ >>
+ \tl_if_blank:VF\l_mix_scripts_tl{/Scripts~[\l_mix_scripts_tl]}
+ >>
+ /Deactivation~<</Condition\g_mix_deact_tl>>
+ }
+ \tl_set:Nx\l_mix_settings_tl{\mix_pdflastobj:}
+ \tl_if_empty:NF\g_mix_usrlabel_tl{
+ \tl_gset_eq:NN\g_mix_label_tl\g_mix_usrlabel_tl
+ }
+ % #1:width, #2:height, #3:depth, #4:content (key-value)
+ \mix_pdfannot:nnnn{\g_mix_wd_tl}{\g_mix_ht_tl}{\g_mix_dp_tl}{
+ /Subtype/RichMedia
+ /F~4\cs_if_exist_use:N\ocgxii@insert@OC
+ /BS~<</W~0/S/S>>
+ /Contents~(media~embedded~by~media9~[\g_mix_version_tl~(\g_mix_date_tl)])
+ /NM~(\g_mix_label_tl)
+ /AP~<</N~\g_mix_appearance_tl>>
+ /RichMediaSettings~\l_mix_settings_tl
+ /RichMediaContent~\l_mix_content_tl
+ }
+ \tl_if_empty:NF\g_mix_usrlabel_tl{
+ \mix_keytoaux_now:nn{ann@\g_mix_usrlabel_tl}{\mix_pdflastann:}
+ \mix_keytoaux_shipout:nn{page@\g_mix_usrlabel_tl}{
+ \noexpand\the\g@mix@page@int}
+ }
+ \mix_pdfobj:nnn{}{dict}{
+ /S/JavaScript/JS~(
+ try{
+ if(typeof(annotRM)=='undefined'){annotRM=new~Array();}
+ if(typeof(annotRM['\g_mix_label_tl'])=='undefined'){
+ annotRM['\g_mix_label_tl']=
+ this.getAnnotRichMedia(this.pageNum,'\g_mix_label_tl');
+ }
+ \str_if_eq_x:nnF{\g_mix_usrpbtn_tl}{none}{
+ if(typeof(ocgBtn\int_use:N\g_mix_rmcnt_int)=='undefined'){
+ var~ocgs=this.getOCGs(this.pageNum);
+ for(var~i=0;i<ocgs.length;i++){
+ if(ocgs[i].name=='MediaPlayButton\int_use:N\g_mix_rmcnt_int'){
+ var~ocgBtn\int_use:N\g_mix_rmcnt_int=ocgs[i];
+ }
+ }
+ }
+ if(
+ !annotRM['\g_mix_label_tl'].activated&&(
+ app.viewerType=='Reader'||
+ app.viewerType=='Exchange'||
+ app.viewerType=='Exchange-Pro'
+ )&&app.viewerVersion>=9
+ ){
+ ocgBtn\int_use:N\g_mix_rmcnt_int.state=true;
+ }
+ }
+ }catch(e){}
+ this.dirty=false;
+ )
+ }
+ \mix_pdfannot:nnnn{0pt}{0pt}{0pt}{
+ /Subtype/Widget
+ /FT/Btn/Ff~65537/F~2
+ /BS~<</W~0>>
+ /T~(fd@\g_mix_label_tl)
+ /AA~<</PO~\mix_pdflastobj:~/PV~\mix_pdflastobj:>>
+ }
+ \tl_gput_right:Nx\@anim@fields{\space\mix_pdflastann:\space}
+ \hbox_overlap_right:n{\box_use:N\l_mix_poster_box}
+ \str_if_eq_x:nnTF{\g_mix_usrpbtn_tl}{none}{
+ \hbox_to_wd:nn{\g_mix_wd_tl}{
+ \vrule~width~\c_zero_dim~height~\g_mix_ht_tl~depth~\g_mix_dp_tl\hss
+ }
+ }{%insert play button overlay
+ \mix_insert_btnocg: %create OCG
+ \cs_gset_eq:Nc\mix_pbtn:NN{g@mix@pbtn@\g_mix_usrpbtn_tl @tl}
+ \hbox_set:Nn\l_mix_pbtn_box{\mix_pbtn:NN\g_mix_wd_tl\g_mix_tt_tl}
+ \box_move_down:nn{\g_mix_dp_tl}{
+ \hbox_to_wd:nn{\g_mix_wd_tl}{
+ \vbox_to_ht:nn{\g_mix_tt_tl}{
+ \vss
+ \ocgbase_oc_bdc:n{\g_mix_btnocg_tl}
+ \box_use:N\l_mix_pbtn_box
+ \ocgbase_oc_emc:
+ }
+ }
+ }
+ }
+ \int_gincr:N\g_mix_rmcnt_int
+ }
+ \endL
+ \group_end:
+}
+\tl_set_eq:NN\l_mix_includemedia_tl\includemedia
+\tl_set:Nn\includemedia{\mix_uribegin:\l_mix_includemedia_tl}
+
+
+
+\RenewDocumentCommand\mediabutton{O{}m}{%#1 options, #2 normal button text
+ \mix_uriend:
+ \group_begin:
+ \beginL
+ \leavevmode
+ %reset various variables
+ \tl_gclear:N\g_mix_overbtn_tl
+ \tl_gclear:N\g_mix_downbtn_tl
+ \tl_gclear:N\g_mix_btnactions_tl
+ \tl_gclear:N\g_mix_tooltip_tl
+ %process options
+ \bool_gset_eq:NN\g_mix_btndraft_bool\g_mix_pkgdraft_bool
+ \mix_uribegin: %treat URI characters correctly
+ \keys_set:nn{media9/mbtndraft}{#1} %detect draft/final on first pass
+ \bool_if:NF\g_mix_btndraft_bool{\keys_set:nn{media9/mbtn}{#1}}
+ \mix_uriend:
+ %normal button appearance
+ \hbox_set:Nn\l_mix_poster_box{\if@RTL\beginR\fi#2\if@RTL\endR\fi}
+ \tl_set:Nx\width {\dim_use:N\box_wd:N\l_mix_poster_box}
+ \tl_set:Nx\height{\dim_use:N\box_ht:N\l_mix_poster_box}
+ \tl_set:Nx\depth {\dim_use:N\box_dp:N\l_mix_poster_box}
+ \bool_if:NTF\g_mix_btndraft_bool{\box_use:N\l_mix_poster_box}{
+ \mix_pdfxform:n{\l_mix_poster_box}
+ \tl_set:Nx\g_mix_normalbtn_tl{\mix_pdflastxform:}
+ \bool_if:nT{ %dummy Widget for ocgx2, AR seems to need it
+% \cs_if_exist_p:N\ocgxii@insert@OC && !\tl_if_blank_p:V\ocgxii@insert@OC
+ !\cs_if_exist:NTF\ocgxii@insert@OC{
+ \tl_if_blank_p:V\ocgxii@insert@OC
+ }{
+ \c_true_bool
+ }
+ }{\mix_pdfannot:nnnn{\width}{\height}{\depth}{/Subtype/Widget/F~2}}
+ %insert widget annotation
+ \mix_pdfannot:nnnn{\width}{\height}{\depth}{
+ /Subtype/Widget
+ /T~(mbtn@\int_use:N\g_mix_mbtncnt_int)
+ \tl_if_empty:NF\g_mix_tooltip_tl{/TU~(\g_mix_tooltip_tl)}
+ /FT/Btn/Ff~65536\cs_if_exist_use:N\ocgxii@insert@OC
+ \tl_if_empty:NTF\g_mix_downbtn_tl{/H/I}{/H/P}
+ /AP~<<
+ /N~\g_mix_normalbtn_tl
+ \tl_if_empty:NF\g_mix_overbtn_tl{/R~\g_mix_overbtn_tl}
+ \tl_if_empty:NF\g_mix_downbtn_tl{/D~\g_mix_downbtn_tl}
+ >>
+ /MK~<<
+ /TP~1~/IF~<</S/A/FB~true/A~[0.0~0.0]>>
+ /I~\g_mix_normalbtn_tl
+ \tl_if_empty:NF\g_mix_overbtn_tl{/RI~\g_mix_overbtn_tl}
+ \tl_if_empty:NF\g_mix_downbtn_tl{/IX~\g_mix_downbtn_tl}
+ >>
+ /A~<<
+ /S/JavaScript/JS~(app.focusRect=false;)
+ %sequence of actions to perform
+ \tl_if_empty:NF\g_mix_btnactions_tl{/Next~[\g_mix_btnactions_tl]}
+ >>
+ }
+ \tl_gput_right:Nx\@anim@fields{\mix_pdflastann:\space}
+ \hbox_to_wd:nn{\width}{
+ \vrule~width~\c_zero_dim~height~\height~depth~\depth\hss
+ }
+ \int_gincr:N\g_mix_mbtncnt_int
+ \cs_if_exist:NF\g_mix_dpiwarned_tl{
+ \tl_new:N\g_mix_dpiwarned_tl
+ \AtEndDvi{\special{ps::[nobreak]\mix_dpiwarning:}}
+ }
+ }
+ \endL
+ \group_end:
+}
+\tl_set_eq:NN\l_mix_mediabutton_tl\mediabutton
+\tl_set:Nn\mediabutton{\mix_uribegin:\l_mix_mediabutton_tl}
+
+
+
+% \end{macrocode}
+% \iffalse
+%</bidi-media9.sty>
%<*memoir-xetex-bidi.def>
%\fi
% \subsection{\textsf{memoir-xetex-bidi.def}}
@@ -19984,6 +20650,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{amsmath}{\input{amsmath-xetex-bidi.def}}{}
\@ifpackageloaded{amstext}{\input{amstext-xetex-bidi.def}}{}
\@ifpackageloaded{amsthm}{\input{amsthm-xetex-bidi.def}}{}
+\@ifpackageloaded{animate}{\input{animate-xetex-bidi.def}}{}
\@ifpackageloaded{breqn}{\input{breqn-xetex-bidi.def}}{}
\@ifpackageloaded{cals}{\input{cals-xetex-bidi.def}}{}
\@ifpackageloaded{caption}{\input{caption-xetex-bidi.def}}{}
@@ -20020,6 +20687,7 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{pdfpages}{\input{pdfpages-xetex-bidi.def}}{}
\@ifpackageloaded{lettrine}{\input{lettrine-xetex-bidi.def}}{}
\@ifpackageloaded{listings}{\input{listings-xetex-bidi.def}}{}
+\@ifpackageloaded{media9}{\RequirePackage{bidi-media9}}{}
\@iftexfileloaded{pstricks}{\input{pstricks-xetex-bidi.def}}{}
\@iftexfileloaded{pgfcorescopes.code}{\input{pgfcorescopes.code-xetex-bidi.def}}{}
\@ifpackageloaded{titlesec}{\input{titlesec-xetex-bidi.def}}{}
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.ins b/Master/texmf-dist/source/xelatex/bidi/bidi.ins
index 97d676f3d8b..c7162d98dc5 100644
--- a/Master/texmf-dist/source/xelatex/bidi/bidi.ins
+++ b/Master/texmf-dist/source/xelatex/bidi/bidi.ins
@@ -40,6 +40,7 @@
\generate{\file{amsmath-xetex-bidi.def}{\from{\jobname.dtx}{table,amsmath-xetex-bidi.def}}}
\generate{\file{amstext-xetex-bidi.def}{\from{\jobname.dtx}{table,amstext-xetex-bidi.def}}}
\generate{\file{amsthm-xetex-bidi.def}{\from{\jobname.dtx}{table,amsthm-xetex-bidi.def}}}
+\generate{\file{animate-xetex-bidi.def}{\from{\jobname.dtx}{table,animate-xetex-bidi.def}}}
\generate{\file{array-xetex-bidi.def}{\from{\jobname.dtx}{table,array-xetex-bidi.def}}}
\generate{\file{article-xetex-bidi.def}{\from{\jobname.dtx}{table,article-xetex-bidi.def}}}
\generate{\file{artikel1-xetex-bidi.def}{\from{\jobname.dtx}{table,artikel1-xetex-bidi.def}}}
@@ -109,6 +110,7 @@
\generate{\file{loadingorder-xetex-bidi.def}{\from{\jobname.dtx}{table,loadingorder-xetex-bidi.def}}}
\generate{\file{longtable-xetex-bidi.def}{\from{\jobname.dtx}{table,longtable-xetex-bidi.def}}}
\generate{\file{mdframed-xetex-bidi.def}{\from{\jobname.dtx}{table,mdframed-xetex-bidi.def}}}
+\generate{\file{bidi-media9.sty}{\from{\jobname.dtx}{table,bidi-media9.sty}}}
\generate{\file{memoir-xetex-bidi.def}{\from{\jobname.dtx}{table,memoir-xetex-bidi.def}}}
\generate{\file{midfloat-xetex-bidi.def}{\from{\jobname.dtx}{table,midfloat-xetex-bidi.def}}}
\generate{\file{minitoc-xetex-bidi.def}{\from{\jobname.dtx}{table,minitoc-xetex-bidi.def}}}