summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-11-26 22:30:56 +0000
committerKarl Berry <karl@freefriends.org>2015-11-26 22:30:56 +0000
commit77f3c70030f7f916ddf1ccc01d9f83c307b9f8f0 (patch)
tree14c3cd81132aaf0a1a0c6fb900210f0bdf943db3 /Master/texmf-dist/source/xelatex
parent249e1802e166afcb824ea15688c6fff18f40ff80 (diff)
bidi (26nov15)
git-svn-id: svn://tug.org/texlive/trunk@38953 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.dtx201
1 files changed, 157 insertions, 44 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index 0b1878963b8..4ca2d270622 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.9
+v19
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/24
+Current version release date: 2015/11/26
___________________
Vafa Khalighi
@@ -321,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.9}}
+%\large Documentation for \textcolor{blue!65!black}{version 19}}
% \author{Vafa Khalighi\\
% \url{persian-tex@tug.org}}
%\setcounter{page}{0}
@@ -332,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.9}}
+%Documentation for \textcolor{blue!65!black}{version 19}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -383,7 +383,7 @@ by Vafa Khalighi.
%*
%* Copyright (c) 2009--2015 Vafa Khalighi
%*
-%* 2015/11/24, v18.9
+%* 2015/11/26, v19
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -1140,7 +1140,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{45985}
+%% \CheckSum{46083}
%% \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
@@ -2975,8 +2975,8 @@ by Vafa Khalighi.
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2015/11/24}
-\def\bidiversion{v18.9}
+\def\bididate{2015/11/26}
+\def\bidiversion{v19}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -12912,7 +12912,7 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{hyperref-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{hyperref-xetex-bidi.def}[2014/11/08 v0.8 bidi adaptations for hyperref package for XeTeX engine]
+\ProvidesFile{hyperref-xetex-bidi.def}[2015/11/26 v0.9 bidi adaptations for hyperref package for XeTeX engine]
\AtBeginDocument{%
\def\contentsline#1#2#3#4{%
\ifx\\#4\\%
@@ -12922,17 +12922,17 @@ bidi implementation of tufte title]
\csname l@#1\endcsname{#2}{#3}%
\or % section
\csname l@#1\endcsname{%
- \beginL\hyper@linkstart{link}{#4}{\if@RTL\beginR\fi#2\if@RTL\endR\fi}\hyper@linkend\endL
+ \hyper@linkstart{link}{#4}{\if@RTL\beginR\fi#2\if@RTL\endR\fi}\hyper@linkend
}{#3}%
\or % page
\csname l@#1\endcsname{{#2}}{%
- \beginL\hyper@linkstart{link}{#4}{#3}\hyper@linkend\endL
+ \hyper@linkstart{link}{#4}{#3}\hyper@linkend
}%
\else % all
\csname l@#1\endcsname{%
- \beginL\hyper@linkstart{link}{#4}{\if@RTL\beginR\fi#2\if@RTL\endR\fi}\hyper@linkend\endL
+ \hyper@linkstart{link}{#4}{\if@RTL\beginR\fi#2\if@RTL\endR\fi}\hyper@linkend
}{%
- \beginL\hyper@linkstart{link}{#4}{#3}\hyper@linkend\endL
+ \hyper@linkstart{link}{#4}{#3}\hyper@linkend
}%
\fi
\fi
@@ -13062,23 +13062,6 @@ bidi implementation of tufte title]
\fi
}%
}%
- \def\@footnotemark{%
- \leavevmode
- \ifhmode\edef\@x@sf{\the\spacefactor}\nobreak\fi
- \stepcounter{Hfootnote}%
- \global\let\Hy@saved@currentHlabel\@currentHlabel
- \global\let\Hy@saved@currentHref\@currentHref
- \hyper@makecurrent{Hfootnote}%
- \global\let\Hy@footnote@currentHlabel\@currentHlabel
- \global\let\Hy@footnote@currentHref\@currentHref
- \global\let\@currentHlabel\Hy@saved@currentHlabel
- \global\let\@currentHref\Hy@saved@currentHref
- \beginL\hyper@linkstart{link}{\Hy@footnote@currentHref}%
- \@makefnmark
- \hyper@linkend\endL
- \ifhmode\spacefactor\@x@sf\fi
- \relax
- }%
\@ifpackageloaded{tabularx}{%
\let\HyOrg@TX@endtabularx\TX@endtabularx
\def\Hy@tabularx@hook{%
@@ -13313,31 +13296,161 @@ bidi implementation of tufte title]
}%
}%
\fi
+\def\Hy@BeginAnnot#1{%
+ \ifmmode\else\beginL\fi%
+ \stepcounter{Hy@AnnotLevel}%
+ \ifnum\value{Hy@AnnotLevel}=\@ne
+ #1%
+ \fi
+}
+\def\Hy@EndAnnot{%
+ \ifnum\value{Hy@AnnotLevel}=\@ne
+ \Hy@endcolorlink
+ \@pdfm@mark{eann}%
+ \fi
+ \addtocounter{Hy@AnnotLevel}\m@ne
+ \ifmmode\else\endL\fi%
+}
\def\hyper@link#1#2#3{%
- \ifmmode\else\beginL\fi\hyper@linkstart{#1}{#2}\ifmmode\else\if@RTL\beginR\fi\fi#3\ifmmode\else\if@RTL\endR\fi\fi\hyper@linkend\ifmmode\else\endL\fi
+ \hyper@linkstart{#1}{#2}\ifmmode\else\if@RTL\beginR\fi\fi#3\ifmmode\else\if@RTL\endR\fi\fi\Hy@xspace@end\hyper@linkend
+}
+\def\hyper@linkfile#1#2#3{%
+ \leavevmode
+ \Hy@BeginAnnot{%
+ \def\Hy@pstringF{#2}%
+ \Hy@CleanupFile\Hy@pstringF
+ \Hy@pstringdef\Hy@pstringF\Hy@pstringF
+ \Hy@pstringdef\Hy@pstringD{#3}%
+ \Hy@MakeRemoteAction
+ \@pdfm@mark{%
+ bann<<%
+ /Type/Annot%
+ /Subtype/Link%
+ \ifHy@pdfa /F 4\fi
+ \Hy@setpdfborder
+ \ifx\@filebordercolor\relax
+ \else
+ /C[\@filebordercolor]%
+ \fi
+ /A<<%
+ /S/GoToR%
+ /F(\Hy@pstringF)%
+ /D%
+ \ifx\\#3\\%
+ [\Hy@href@page\@pdfremotestartview]%
+ \else
+ (\Hy@pstringD)%
+ \fi
+ \Hy@SetNewWindow
+ \Hy@href@nextactionraw
+ >>%
+ >>%
+ }%
+ \Hy@colorlink\@filecolor
+ }%
+ \ifmmode\else\if@RTL\beginR\fi\fi#1\ifmmode\else\if@RTL\endR\fi\fi\Hy@xspace@end
+ \Hy@EndAnnot
+}
+\def\@hyper@launch run:#1\\#2#3{% filename, anchor text linkname
+ \leavevmode
+ \Hy@BeginAnnot{%
+ \Hy@pstringdef\Hy@pstringF{#1}%
+ \Hy@pstringdef\Hy@pstringP{#3}%
+ \@pdfm@mark{%
+ bann<<%
+ /Type/Annot%
+ /Subtype/Link%
+ \ifHy@pdfa /F 4\fi
+ \Hy@setpdfborder
+ \ifx\@runbordercolor\relax
+ \else
+ /C[\@runbordercolor]%
+ \fi
+ /A<<%
+ /F(\Hy@pstringF)%
+ /S/Launch%
+ \Hy@SetNewWindow
+ \ifx\\#3\\%
+ \else
+ /Win<</P(\Hy@pstringP)/F(\Hy@pstringF)>>%
+ \fi
+ \Hy@href@nextactionraw
+ >>%
+ >>%
+ }%
+ \Hy@colorlink\@runcolor
+ }%
+ \ifmmode\else\if@RTL\beginR\fi\fi#2\ifmmode\else\if@RTL\endR\fi\fi\Hy@xspace@end
+ \Hy@EndAnnot
+}
+\def\hyper@linkurl#1#2{%
+ \leavevmode
+ \Hy@BeginAnnot{%
+ \Hy@pstringdef\Hy@pstringURI{#2}%
+ \@pdfm@mark{%
+ bann<<%
+ /Type/Annot%
+ /Subtype/Link%
+ \ifHy@pdfa /F 4\fi
+ \Hy@setpdfborder
+ \ifx\@urlbordercolor\relax
+ \else
+ /C[\@urlbordercolor]%
+ \fi
+ /A<<%
+ /S/URI%
+ /URI(\Hy@pstringURI)%
+ \ifHy@href@ismap
+ /IsMap true%
+ \fi
+ \Hy@href@nextactionraw
+ >>%
+ >>%
+ }%
+ \Hy@colorlink\@urlcolor
+ }%
+ \ifmmode\else\if@RTL\beginR\fi\fi#1\ifmmode\else\if@RTL\endR\fi\fi\Hy@xspace@end
+ \Hy@EndAnnot
+}
+\def\Acrobatmenu#1#2{%
+ \Hy@Acrobatmenu{#1}{#2}{%
+ \Hy@BeginAnnot{%
+ \EdefEscapeName\Hy@temp@menu{#1}%
+ \@pdfm@mark{%
+ bann<<%
+ /Type/Annot%
+ /Subtype/Link%
+ \ifHy@pdfa /F 4\fi
+ \Hy@setpdfborder
+ \ifx\@menubordercolor\relax
+ \else
+ /C[\@menubordercolor]%
+ \fi
+ /A<<%
+ /S/Named%
+ /N/\Hy@temp@menu
+ \Hy@href@nextactionraw
+ >>%
+ >>%
+ }%
+ \Hy@colorlink\@menucolor
+ }%
+ \ifmmode\else\if@RTL\beginR\fi\fi#2\ifmmode\else\if@RTL\endR\fi\fi\Hy@xspace@end
+ \Hy@EndAnnot
+ }%
}
-\def\url@#1{\beginL\hyper@linkurl{\Hurl{#1}}{#1}\endL}
\def\hyper@natlinkstart#1{%
\Hy@backout{#1}%
- \beginL\hyper@linkstart{cite}{cite.#1}\if@RTL\beginR\fi%
+ \hyper@linkstart{cite}{cite.#1}\if@RTL\beginR\fi%
\def\hyper@nat@current{#1}%
}
\def\hyper@natlinkend{%
- \if@RTL\endR\fi\hyper@linkend\endL
+ \if@RTL\endR\fi\hyper@linkend
}
\def\hyper@natlinkbreak#1#2{%
- \if@RTL\endR\fi\hyper@linkend\endL#1\beginL\hyper@linkstart{cite}{cite.#2}\if@RTL\beginR\fi%
+ \if@RTL\endR\fi\hyper@linkend#1\hyper@linkstart{cite}{cite.#2}\if@RTL\beginR\fi%
}%
}
-\begingroup
- \catcode`\$=6 %
- \catcode`\#=12 %
- \gdef\href@$1{\expandafter\href@split$1##\\}%
- \gdef\href@split$1#$2#$3\\$4{%
- \beginL\hyper@@link{$1}{$2}{\if@RTL\beginR\fi$4\if@RTL\endR\fi}\endL%
- \endgroup
- }%
-\endgroup
\pdfstringdefDisableCommands{%
\let\LRE\@firstofone
\let\LR\@firstofone