summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-11-08 23:52:13 +0000
committerKarl Berry <karl@freefriends.org>2014-11-08 23:52:13 +0000
commit1a33d3e9aa73f2b9226bdc7af7c5659e37ce23ed (patch)
tree9673c54ddd8c09d07c3392ed20008a6eb38b507b /Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
parent8c22ed00b585dfd0ec2dbd6d97058a126e88ffa1 (diff)
bidi (8nov14)
git-svn-id: svn://tug.org/texlive/trunk@35547 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def')
-rw-r--r--Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def228
1 files changed, 226 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
index 16062a2a2f8..c83eac912ff 100644
--- a/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
+++ b/Master/texmf-dist/tex/xelatex/bidi/hyperref-xetex-bidi.def
@@ -17,7 +17,7 @@
%% by Vafa Khalighi.
%%
%%
-%% \CheckSum{42082}
+%% \CheckSum{42684}
%% \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
@@ -34,7 +34,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
%%
-\ProvidesFile{hyperref-xetex-bidi.def}[2013/04/08 v0.7 bidi adaptations for hyperref package for XeTeX engine]
+\ProvidesFile{hyperref-xetex-bidi.def}[2014/11/08 v0.8 bidi adaptations for hyperref package for XeTeX engine]
\AtBeginDocument{%
\def\contentsline#1#2#3#4{%
\ifx\\#4\\%
@@ -201,6 +201,199 @@
\ifhmode\spacefactor\@x@sf\fi
\relax
}%
+ \@ifpackageloaded{tabularx}{%
+ \let\HyOrg@TX@endtabularx\TX@endtabularx
+ \def\Hy@tabularx@hook{%
+ \let\@footnotetext\H@@footnotetext
+ \let\@LTRfootnotetext\HLTR@@LTRfootnotetext
+ \let\@RTLfootnotetext\HRTL@@RTLfootnotetext
+ \let\@footnotemark\H@@footnotemark
+ \let\@mpfootnotetext\H@@mpfootnotetext
+ \let\@mpLTRfootnotetext\HLTR@@mpLTRfootnotetext
+ \let\@mpRTLfootnotetext\HRTL@@mpRTLfootnotetext
+ }%
+ \begingroup
+ \toks@\expandafter{\TX@endtabularx}%
+ \xdef\Hy@gtemp{%
+ \noexpand\Hy@tabularx@hook
+ \the\toks@
+ }%
+ \endgroup
+ \let\TX@endtabularx\Hy@gtemp
+ }{}%
+ \@ifpackageloaded{longtable}{%
+ \CheckCommand*{\LT@p@LTRftntext}[1]{%
+ \edef\@tempa{%
+ \the\LT@p@ftn
+ \noexpand\LTRfootnotetext[\the\c@footnote]%
+ }%
+ \global\LT@p@ftn\expandafter{\@tempa{#1}}%
+ }%
+ \long\def\LT@p@LTRftntext#1{%
+ \edef\@tempa{%
+ \the\LT@p@ftn
+ \begingroup
+ \noexpand\c@footnote=\the\c@footnote\relax
+ \noexpand\protected@xdef\noexpand\@thefnmark{%
+ \noexpand\thempfn
+ }%
+ \noexpand\Hy@LT@LTRfootnotetext{%
+ \Hy@footnote@currentHref
+ }%
+ }%
+ \global\LT@p@ftn\expandafter{%
+ \@tempa{#1}%
+ \endgroup
+ }%
+ }%
+ \long\def\Hy@LT@LTRfootnotetext#1#2{%
+ \HLTR@@LTRfootnotetext{%
+ \ifHy@nesting
+ \hyper@@anchor{#1}{#2}%
+ \else
+ \Hy@raisedlink{%
+ \hyper@@anchor{#1}{\relax}%
+ }%
+ \def\@currentHref{#1}%
+ \let\@currentlabelname\@empty
+ #2%
+ \fi
+ }%
+ }%
+ \CheckCommand*{\LT@p@RTLftntext}[1]{%
+ \edef\@tempa{%
+ \the\LT@p@ftn
+ \noexpand\RTLfootnotetext[\the\c@footnote]%
+ }%
+ \global\LT@p@ftn\expandafter{\@tempa{#1}}%
+ }%
+ \long\def\LT@p@RTLftntext#1{%
+ \edef\@tempa{%
+ \the\LT@p@ftn
+ \begingroup
+ \noexpand\c@footnote=\the\c@footnote\relax
+ \noexpand\protected@xdef\noexpand\@thefnmark{%
+ \noexpand\thempfn
+ }%
+ \noexpand\Hy@LT@RTLfootnotetext{%
+ \Hy@footnote@currentHref
+ }%
+ }%
+ \global\LT@p@ftn\expandafter{%
+ \@tempa{#1}%
+ \endgroup
+ }%
+ }%
+ \long\def\Hy@LT@RTLfootnotetext#1#2{%
+ \HRTL@@RTLfootnotetext{%
+ \ifHy@nesting
+ \hyper@@anchor{#1}{#2}%
+ \else
+ \Hy@raisedlink{%
+ \hyper@@anchor{#1}{\relax}%
+ }%
+ \def\@currentHref{#1}%
+ \let\@currentlabelname\@empty
+ #2%
+ \fi
+ }%
+ }%
+ }{}%
+ \@ifpackageloaded{bidipoem}{%
+ \long\def\bidipoem@p@ftntext#1{%
+ \edef\@tempx{%
+ \the\bidipoem@p@ftn
+ \begingroup
+ \noexpand\csname c@\@mpfn\endcsname=\the\csname c@\@mpfn\endcsname\relax
+ \noexpand\protected@xdef\noexpand\@thefnmark{%
+ \noexpand\thempfn
+ }%
+ \noexpand\Hy@bidipoem@footnotetext{%
+ \Hy@footnote@currentHref
+ }%
+ }%
+ \global\bidipoem@p@ftn\expandafter{%
+ \@tempx{#1}%
+ \endgroup
+ }%
+ }%
+ \long\def\Hy@bidipoem@footnotetext#1#2{%
+ \H@@footnotetext{%
+ \ifHy@nesting
+ \hyper@@anchor{#1}{#2}%
+ \else
+ \Hy@raisedlink{%
+ \hyper@@anchor{#1}{\relax}%
+ }%
+ \def\@currentHref{#1}%
+ \let\@currentlabelname\@empty
+ #2%
+ \fi
+ }%
+ }%
+ \long\def\bidipoem@p@LTRftntext#1{%
+ \edef\@tempxi{%
+ \the\bidipoem@p@ftn
+ \begingroup
+ \noexpand\csname c@\@mpfn\endcsname=\the\csname c@\@mpfn\endcsname\relax
+ \noexpand\protected@xdef\noexpand\@thefnmark{%
+ \noexpand\thempfn
+ }%
+ \noexpand\Hy@bidipoem@LTRfootnotetext{%
+ \Hy@footnote@currentHref
+ }%
+ }%
+ \global\bidipoem@p@ftn\expandafter{%
+ \@tempxi{#1}%
+ \endgroup
+ }%
+ }%
+ \long\def\Hy@bidipoem@LTRfootnotetext#1#2{%
+ \HLTR@@LTRfootnotetext{%
+ \ifHy@nesting
+ \hyper@@anchor{#1}{#2}%
+ \else
+ \Hy@raisedlink{%
+ \hyper@@anchor{#1}{\relax}%
+ }%
+ \def\@currentHref{#1}%
+ \let\@currentlabelname\@empty
+ #2%
+ \fi
+ }%
+ }%
+ \long\def\bidipoem@p@RTLftntext#1{%
+ \edef\@tempxii{%
+ \the\bidipoem@p@ftn
+ \begingroup
+ \noexpand\csname c@\@mpfn\endcsname=\the\csname c@\@mpfn\endcsname\relax
+ \noexpand\protected@xdef\noexpand\@thefnmark{%
+ \noexpand\thempfn
+ }%
+ \noexpand\Hy@bidipoem@RTLfootnotetext{%
+ \Hy@footnote@currentHref
+ }%
+ }%
+ \global\bidipoem@p@ftn\expandafter{%
+ \@tempxii{#1}%
+ \endgroup
+ }%
+ }%
+ \long\def\Hy@bidipoem@RTLfootnotetext#1#2{%
+ \HRTL@@RTLfootnotetext{%
+ \ifHy@nesting
+ \hyper@@anchor{#1}{#2}%
+ \else
+ \Hy@raisedlink{%
+ \hyper@@anchor{#1}{\relax}%
+ }%
+ \def\@currentHref{#1}%
+ \let\@currentlabelname\@empty
+ #2%
+ \fi
+ }%
+ }%
+ }{}%
\let\HyOrg@maketitle\maketitle
\def\maketitle{%
\let\Hy@saved@footnotemark\@footnotemark
@@ -275,6 +468,37 @@
\def\XeTeX{Xe\TeX}
\def\XeLaTeX{Xe\LaTeX}
}
+\@ifpackageloaded{longtable}{%
+ \begingroup
+ \def\y{\LT@array}%
+ \@ifundefined{scr@LT@array}{%
+ \@ifundefined{adl@LT@array}{}{\def\y{\adl@LT@array}}%
+ }{\def\y{\scr@LT@array}}%
+ \long\def\x\refstepcounter#1#2\@sharp#3#4\@nil{%
+ \expandafter\endgroup
+ \expandafter\def\y[##1]##2{%
+ \H@refstepcounter{#1}%
+ \hyper@makecurrent{table}%
+ \let\Hy@LT@currentHref\@currentHref
+ #2\@sharp#####4%
+ }%
+ }%
+ \expandafter\expandafter\expandafter\x\y[{#1}]{#2}\@nil
+ \begingroup
+ \def\x#1\ifvoid\LT@foot#2\fi#3\@nil{%
+ \endgroup
+ \def\LT@start{%
+ #1%
+ \ifvoid\LT@foot#2\fi
+ \let\@currentHref\Hy@LT@currentHref
+ \Hy@raisedlink{%
+ \hyper@anchorstart{\@currentHref}\hyper@anchorend
+ }%
+ #3%
+ }%
+ }%
+ \expandafter\x\LT@start\@nil
+}{}
\endinput
%%
%% End of file `hyperref-xetex-bidi.def'.