diff options
author | Karl Berry <karl@freefriends.org> | 2016-05-02 23:39:30 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-05-02 23:39:30 +0000 |
commit | 4141c4aa83d1ead340876cdc2b8408b754bd9b69 (patch) | |
tree | b48928c20ceb05f7a9b8bfc92b1755f20e73fb7a /Master/texmf-dist/source | |
parent | a2e546fd16ad80846377eeb25715c877e57d69c3 (diff) |
bidi (2may16)
git-svn-id: svn://tug.org/texlive/trunk@40842 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source')
-rwxr-xr-x[-rw-r--r--] | Master/texmf-dist/source/latex/bidi/bidi.dtx (renamed from Master/texmf-dist/source/xelatex/bidi/bidi.dtx) | 244 | ||||
-rw-r--r-- | Master/texmf-dist/source/latex/bidi/bidi.ins (renamed from Master/texmf-dist/source/xelatex/bidi/bidi.ins) | 4 |
2 files changed, 209 insertions, 39 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/latex/bidi/bidi.dtx index 9e661a9145b..5baf9a5cda4 100644..100755 --- a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx +++ b/Master/texmf-dist/source/latex/bidi/bidi.dtx @@ -5,7 +5,7 @@ %<*readme> ___________________ The bidi package -v19.1 +v19.2 This package provides a convenient interface for typesetting bidirectional texts in Plain TeX and LaTeX, using XeTeX engine. @@ -25,13 +25,13 @@ 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/12/07 +Current version release date: 2016/05/03 ___________________ Vafa Khalighi persian-tex@tug.org -Copyright (c) 2007--2015 +Copyright (c) 2007--2016 It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of this license is at: http://www.latex-project.org/lppl.txt @@ -49,7 +49,7 @@ by Vafa Khalighi. \preamble __________________________________________________ - Copyright (c) 2009--2015 Vafa Khalighi <persian-tex@tug.org> + Copyright (c) 2009--2016 Vafa Khalighi <persian-tex@tug.org> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of @@ -322,7 +322,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 19.1}} +%\large Documentation for \textcolor{blue!65!black}{version 19.2}} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} %\setcounter{page}{0} @@ -333,7 +333,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} % %\Large -%Documentation for \textcolor{blue!65!black}{version 19.1}} +%Documentation for \textcolor{blue!65!black}{version 19.2}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -357,7 +357,7 @@ by Vafa Khalighi. % %\vskip 0pt plus 3fill % -%Copyright (c) 2007--2015 Vafa Khalighi +%Copyright (c) 2007--2016 Vafa Khalighi % %\medskip %Permission is granted to distribute and/or modify \emph{both the documentation and the code} under the conditions of the \LaTeX{} Project Public License, either version 1.3c of this license or (at your option) any later version. @@ -382,9 +382,9 @@ by Vafa Khalighi. %* and LaTeX. The package includes adaptations %* for use with many other commonly-used packages. %* -%* Copyright (c) 2009--2015 Vafa Khalighi +%* Copyright (c) 2009--2016 Vafa Khalighi %* -%* 2015/12/07, v19.1 +%* 2016/05/03, v19.2 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -1141,7 +1141,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{46182} +%% \CheckSum{46409} %% \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 @@ -1563,7 +1563,7 @@ by Vafa Khalighi. %\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] +\ProvidesFile{animate-xetex-bidi.def}[2016/05/03 v0.2 bidi adaptations for animate package for XeTeX engine] %user command for embedding animation sequence @@ -1631,7 +1631,7 @@ by Vafa Khalighi. \fi% \def\@anim@relop{>}% \edef\@anim@numtemplate{\@anim@first}% - \ifnum\@anim@first>\@anim@last% + \ifnum\@anim@first>\@anim@last\relax% \edef\@anim@every{-\@anim@every}% \def\@anim@relop{<}% \edef\@anim@numtemplate{\@anim@last}% @@ -1670,7 +1670,7 @@ by Vafa Khalighi. \xdef\@anim@fps{\@anim@nfps}% % %read all frames of the sequence - \loop\ifnum\@anim@curframe\@anim@relop\@anim@last\else% + \loop\ifnum\@anim@curframe\@anim@relop\@anim@last\relax\else% \if@anim@multipage% %embed graphics \@anim@ximage{\the\@anim@num}{\the\@anim@curframe@zb}{% @@ -1694,6 +1694,10 @@ by Vafa Khalighi. %build timeline from optional timeline file \@anim@sanitizeJS% \if@anim@timeline\@anim@buildtmln{\the\@anim@num}\fi% + % if last frame used as poster, write frame num to aux file + \ifnum\@anim@poster=\@anim@mone\relax% + \@anim@keytoaux{a\the\@anim@num.poster}{\@anim@maxframe}% + \fi% %insert animation widget & controls \@anim@insertwidgets{\the\@anim@num}{% \@anim@getkeyval{btncol:\@anim@bgcolour:\@anim@fgcolour}}% @@ -1715,7 +1719,6 @@ by Vafa Khalighi. \renewenvironment{animateinline}[2][]{% \@anim@endsanitize% \leavevmode% - \setboolean{@anim@inside}{true}% \@anim@reset% to default settings \begingroup% \beginL% @@ -1753,6 +1756,8 @@ by Vafa Khalighi. \fi% \fi% \ifdefined\NoHyper\NoHyper\fi% silently suppress any hyperref specials + \let\newframe\@anim@@newframe% + \let\multiframe\@anim@multiframe% \@anim@beginframe% \ignorespaces% }{% @@ -1772,11 +1777,14 @@ by Vafa Khalighi. \@anim@insertwidgets{\the\@anim@num}{% \@anim@getkeyval{btncol:\@anim@bgcolour:\@anim@fgcolour}}% \@anim@endsanitize% + % if last frame used as poster, write frame num to aux file + \ifnum\@anim@poster=\@anim@mone\relax% + \@anim@keytoaux{a\the\@anim@num.poster}{\@anim@maxframe}% + \fi% \fi% \endL% \endgroup% \global\advance\@anim@num by \@ne% - \setboolean{@anim@inside}{false}% } \let\@anim@animateinline\animateinline \def\animateinline{\@anim@sanitizeColon\@anim@animateinline} @@ -2976,8 +2984,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2015/12/07} -\def\bidiversion{v19.1} +\def\bididate{2016/05/03} +\def\bidiversion{v19.2} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -2990,7 +2998,7 @@ Bidirectional typesetting in plain TeX and LaTeX] * and LaTeX. The package includes adaptations^^J% * for use with many other commonly-used packages.^^J% * ^^J% -* Copyright (c) 2009--2015 Vafa Khalighi^^J% +* Copyright (c) 2009--2016 Vafa Khalighi^^J% * ^^J% * \bididate, \bidiversion^^J% * ^^J% @@ -14190,26 +14198,187 @@ bidi implementation of tufte title] %\fi % \subsection{\textsf{bidi-media9.sty}} % \begin{macrocode} -\ProvidesExplPackage{bidi-media9}{2015/11/24}{0.1} +\ProvidesExplPackage{bidi-media9}{2016/05/03}{0.2} {bidi fixes for media9 package for the XeTeX engine} \keys_define:nn{media9/mbtn}{ + draft .code:n = {}, + final .code:n = {}, + + tooltip .tl_gset_x:N = \g_mix_tooltip_tl, + tooltip .value_required:n = {true}, + overface .code:n = { - \hbox_set:Nn\l_mix_poster_box{\if@RTL\beginR\fi#1\if@RTL\endR\fi} + %\hbox_set:Nn\l_mix_poster_box{#1} + \sbox\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} + %\hbox_set:Nn\l_mix_poster_box{#1} + \sbox\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} -} - + downface .value_required:n = {true}, + + 3Dgotoview .code:n = { + \tl_set:Nx\l_tmpa_tl{#1} %extract ref + \regex_replace_once:nnN{([^:]+):??.*}{\1}\l_tmpa_tl + \tl_trim_spaces:N\l_tmpa_tl + \tl_if_exist:cTF{ann@\l_tmpa_tl}{ + \str_if_eq_x:nnF{\tl_use:c{ann@\l_tmpa_tl}}{draft}{ + \tl_set:Nx\l_tmpb_tl{#1} %extract idx + \regex_replace_once:nnN{[^:]+:?}{}\l_tmpb_tl + \tl_trim_spaces:N\l_tmpb_tl + \tl_if_blank:VF\l_tmpb_tl{ + \regex_match:nVTF{^[DFLNP]$}\l_tmpb_tl{ + \tl_set:Nx\l_mix_vidx_tl{/\l_tmpb_tl} + }{ + \regex_match:nVTF{^\d+$}\l_tmpb_tl{ + \tl_set:Nx\l_mix_vidx_tl{~\l_tmpb_tl} + }{ + \regex_replace_once:nnN{^\(\s*}{}\l_tmpb_tl + \regex_replace_once:nnN{\s*\)$}{}\l_tmpb_tl + \tl_set:Nx\l_mix_vidx_tl{~(\l_tmpb_tl)} + } + } + } + \mix_pdfobj:nnn{}{dict}{ + /S/JavaScript/JS~( + if(typeof(annotRM)=='undefined'){annotRM=new~Array();} + if(typeof(annotRM['\l_tmpa_tl'])=='undefined'){ + annotRM['\l_tmpa_tl']= + this.getAnnotRichMedia(\tl_use:c{page@\l_tmpa_tl},'\l_tmpa_tl'); + } + annotRM['\l_tmpa_tl'].activated=true; + ) + \tl_if_blank:VF\l_tmpb_tl{ + /Next~<< + /S/GoTo3DView + /TA~\tl_use:c{ann@\l_tmpa_tl} + /V\l_mix_vidx_tl + >> + } + } + \tl_gput_right:Nx\g_mix_btnactions_tl{~\mix_pdflastobj:} + } + }{ + \msg_warning:nnx{media9}{undefined~reference}{\l_tmpa_tl} + \cs_if_exist:NF\g_mix_refundefwarned_tl{ + \tl_new:N\g_mix_refundefwarned_tl + \AtEndDocument{\msg_warning:nn{media9}{undefined~references}} + } + } + }, + 3Dgotoview .value_required:n = {true}, + + mediacommand .code:n = { + \tl_set:Nx\l_tmpa_tl{#1} + \regex_replace_once:nnN{([^:]+):??.*}{\1}\l_tmpa_tl %extract ref + \tl_trim_spaces:N\l_tmpa_tl + \tl_if_exist:cTF{ann@\l_tmpa_tl}{ + \str_if_eq_x:nnF{\tl_use:c{ann@\l_tmpa_tl}}{draft}{ + \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 + \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 + \tl_set:Nx\l_mix_arg_tl{ + \exp_after:wN\mix_separate_arg_from_actn:w\l_tmpb_tl[]\q_stop} + \tl_trim_spaces:N\l_mix_arg_tl + \mix_pdfobj:nnn{}{dict}{ + /S/JavaScript/JS~( + if(typeof(annotRM)=='undefined'){annotRM=new~Array();} + if(typeof(annotRM['\l_tmpa_tl'])=='undefined'){ + annotRM['\l_tmpa_tl']= + this.getAnnotRichMedia(\tl_use:c{page@\l_tmpa_tl},'\l_tmpa_tl'); + } + annotRM['\l_tmpa_tl'].activated=true; + ) + \tl_if_blank:VF\l_mix_cmd_tl{ + /Next~<< + /S/RichMediaExecute + /TA~\tl_use:c{ann@\l_tmpa_tl} + /TI~\tl_use:c{main@\l_tmpa_tl} + /CMD~<< + /C~(\l_mix_cmd_tl) + \tl_if_blank:VF\l_mix_arg_tl{ + /A~[\l_mix_arg_tl] + } + >> + >> + } + } + \tl_gput_right:Nx\g_mix_btnactions_tl{~\mix_pdflastobj:} + } + }{ + \msg_warning:nnx{media9}{undefined~reference}{\l_tmpa_tl} + \cs_if_exist:NF\g_mix_refundefwarned_tl{ + \tl_new:N\g_mix_refundefwarned_tl + \AtEndDocument{\msg_warning:nn{media9}{undefined~references}} + } + } + }, + mediacommand .value_required:n = {true}, + + jsaction .code:n = { + \tl_set:Nx\l_tmpa_tl{#1} + \regex_match:nVTF{^[^\{:]+:.*$}\l_tmpa_tl{ + \regex_replace_once:nnN{([^:]+):??.*}{\1}\l_tmpa_tl %extract ref + \tl_trim_spaces:N\l_tmpa_tl + }{\tl_clear:N\l_tmpa_tl} + \tl_set:Nx\l_tmpb_tl{#1} + \tl_if_blank:VF\l_tmpa_tl{ + \tl_if_exist:cF{ann@\l_tmpa_tl}{ + \msg_warning:nnx{media9}{undefined~reference}{\l_tmpa_tl} + \cs_if_exist:NF\g_mix_refundefwarned_tl{ + \tl_new:N\g_mix_refundefwarned_tl + \AtEndDocument{\msg_warning:nn{media9}{undefined~references}} + } + } + \regex_replace_once:nnN{[^:]+\:}{}\l_tmpb_tl + } + \tl_set:Nx\l_tmpb_tl{\exp_after:wN\use:n\l_tmpb_tl} + \tl_trim_spaces:N\l_tmpb_tl + \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)})}} + \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} + }{ + \mix_pdfobj:nnn{}{dict}{ + /S/JavaScript/JS~( + if(typeof(annotRM)=='undefined'){annotRM=new~Array();} + if(typeof(annotRM['\l_tmpa_tl'])=='undefined'){ + annotRM['\l_tmpa_tl']= + this.getAnnotRichMedia(\tl_use:c{page@\l_tmpa_tl},'\l_tmpa_tl'); + } + annotRM['\l_tmpa_tl'].activated=true; + ) + \tl_if_blank:VF\l_tmpb_tl{/Next~\mix_pdflastobj:} + } + } + \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}|| + !\tl_if_blank_p:V\l_tmpb_tl + }{ + \tl_gput_right:Nx\g_mix_btnactions_tl{~\mix_pdflastobj:} + } + }, + jsaction .value_required:n = {true}, + unknown .code:n = { + \msg_error:nnx{media9}{unknown~option}{\l_keys_key_tl} + } +} \RenewDocumentCommand\includemedia{O{}mm}{%#1 options, #2 text/image #3 media file @@ -14235,8 +14404,9 @@ bidi implementation of tufte title] \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{\group_begin:#2\group_end:} %\hbox_set:Nn\l_mix_poster_box{#2} + \sbox\l_mix_poster_box{\if@RTL\beginR\fi#2\if@RTL\endR\fi} \mix_scale:n{\l_mix_poster_box} \bool_if:nT{ \dim_compare_p:n{\g_mix_tt_tl=\c_zero_dim}|| @@ -14262,10 +14432,12 @@ bidi implementation of tufte title] \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; + {}{ + 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; + } } } } @@ -14510,7 +14682,7 @@ bidi implementation of tufte title] /T~(fd@\g_mix_label_tl) /AA~<</PO~\mix_pdflastobj:~/PV~\mix_pdflastobj:>> } - \tl_gput_right:Nx\@anim@fields{\space\mix_pdflastann:\space} + \mix_appendtofields:n{\mix_pdflastann:} \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}{ @@ -14519,7 +14691,8 @@ bidi implementation of tufte title] }{%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} + %\hbox_set:Nn\l_mix_pbtn_box{\mix_pbtn:NN\g_mix_wd_tl\g_mix_tt_tl} + \sbox\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}{ @@ -14558,7 +14731,8 @@ bidi implementation of tufte title] \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} + %\hbox_set:Nn\l_mix_poster_box{#2} + \sbox\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} @@ -14597,15 +14771,11 @@ bidi implementation of tufte title] \tl_if_empty:NF\g_mix_btnactions_tl{/Next~[\g_mix_btnactions_tl]} >> } - \tl_gput_right:Nx\@anim@fields{\mix_pdflastann:\space} + \mix_appendtofields:n{\mix_pdflastann:} \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: diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.ins b/Master/texmf-dist/source/latex/bidi/bidi.ins index 54e051d0310..ba3e4ef0587 100644 --- a/Master/texmf-dist/source/xelatex/bidi/bidi.ins +++ b/Master/texmf-dist/source/latex/bidi/bidi.ins @@ -7,7 +7,7 @@ %% bidi.dtx (with options: `batchfile') %% %% __________________________________________________ -%% Copyright (c) 2009--2015 Vafa Khalighi <persian-tex@tug.org> +%% Copyright (c) 2009--2016 Vafa Khalighi <persian-tex@tug.org> %% %% It may be distributed and/or modified under the LaTeX Project Public License, %% version 1.3c or higher (your choice). The latest version of @@ -22,7 +22,7 @@ \preamble __________________________________________________ - Copyright (c) 2009--2015 Vafa Khalighi <persian-tex@tug.org> + Copyright (c) 2009--2016 Vafa Khalighi <persian-tex@tug.org> It may be distributed and/or modified under the LaTeX Project Public License, version 1.3c or higher (your choice). The latest version of |