summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/xelatex/bidi/bidi.dtx')
-rw-r--r--Master/texmf-dist/source/xelatex/bidi/bidi.dtx134
1 files changed, 122 insertions, 12 deletions
diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx
index 6f18be56e80..1d76092e8b6 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
-v15.9
+v16
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: 2014/11/08
+Current version release date: 2014/11/20
___________________
Vafa Khalighi
@@ -167,11 +167,13 @@ by Vafa Khalighi.
\generate{\file{tabularx-xetex-bidi.def}{\from{\jobname.dtx}{table,tabularx-xetex-bidi.def}}}
\generate{\file{tabulary-xetex-bidi.def}{\from{\jobname.dtx}{table,tabulary-xetex-bidi.def}}}
\generate{\file{tc-xetex-bidi.def}{\from{\jobname.dtx}{table,tc-xetex-bidi.def}}}
+\generate{\file{tikz-xetex-bidi.def}{\from{\jobname.dtx}{table,tikz-xetex-bidi.def}}}
\generate{\file{titlesec-xetex-bidi.def}{\from{\jobname.dtx}{table,titlesec-xetex-bidi.def}}}
\generate{\file{titletoc-xetex-bidi.def}{\from{\jobname.dtx}{table,titletoc-xetex-bidi.def}}}
\generate{\file{tocbibind-xetex-bidi.def}{\from{\jobname.dtx}{table,tocbibind-xetex-bidi.def}}}
\generate{\file{tocloft-xetex-bidi.def}{\from{\jobname.dtx}{table,tocloft-xetex-bidi.def}}}
\generate{\file{tocstyle-xetex-bidi.def}{\from{\jobname.dtx}{table,tocstyle-xetex-bidi.def}}}
+\generate{\file{todonotes-xetex-bidi.def}{\from{\jobname.dtx}{table,todonotes-xetex-bidi.def}}}
\generate{\file{wrapfig-xetex-bidi.def}{\from{\jobname.dtx}{table,wrapfig-xetex-bidi.def}}}
\generate{\file{xcolor-xetex-bidi.def}{\from{\jobname.dtx}{table,xcolor-xetex-bidi.def}}}
\generate{\file{latex-xetex-bidi.def}{\from{\jobname.dtx}{table,latex-xetex-bidi.def}}}
@@ -315,7 +317,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 15.9}}
+%\large Documentation for \textcolor{blue!65!black}{version 16}}
% \author{Vafa Khalighi\\
% \url{persian-tex@tug.org}}
%\setcounter{page}{0}
@@ -326,7 +328,7 @@ by Vafa Khalighi.
%\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}}
%
%\Large
-%Documentation for \textcolor{blue!65!black}{version 15.9}}
+%Documentation for \textcolor{blue!65!black}{version 16}}
%
%\vskip 0pt plus 3fill
%\textit{\large to my Master, \textbf{Ferdowsi The Great}}
@@ -377,7 +379,7 @@ by Vafa Khalighi.
%*
%* Copyright © 2009–2014 Vafa Khalighi
%*
-%* 2014/11/08, v15.9
+%* 2014/11/20, v16
%*
%* License: LaTeX Project Public License, version
%* 1.3c or higher (your choice)
@@ -1134,7 +1136,7 @@ by Vafa Khalighi.
%\iffalse
%<*table>
%\fi
-%% \CheckSum{42684}
+%% \CheckSum{42863}
%% \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
@@ -2665,8 +2667,8 @@ by Vafa Khalighi.
% \subsection{\textsf{bidi.sty}}
% \begin{macrocode}
\NeedsTeXFormat{LaTeX2e}
-\def\bididate{2014/11/08}
-\def\bidiversion{v15.9}
+\def\bididate{2014/11/20}
+\def\bidiversion{v16}
\ProvidesPackage{bidi}[\bididate\space \bidiversion\space
Bidirectional typesetting in plain TeX and LaTeX]
\edef\@bidi@info{****************************************************^^J%
@@ -2788,7 +2790,7 @@ Bidirectional typesetting in plain TeX and LaTeX]
%\fi
% \subsection{\textsf{bidi.tex}}
% \begin{macrocode}
-\def\bididate{2014/11/08}
+\def\bididate{2014/11/20}
\def\bidiversion{v0.2}
\catcode`@=11
\let \protect \relax
@@ -13792,11 +13794,13 @@ bidi implementation of tufte title]
%\fi
% \subsection{\textsf{pgf-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{pgf-xetex-bidi.def}[2012/07/08 v0.4 bidi adaptations for pgf package for XeTeX engine]
+\ProvidesFile{pgf-xetex-bidi.def}[2014/11/20 v0.5 bidi adaptations for pgf package for XeTeX engine]
\let\origin@pgfpicture=\pgfpicture
\let\origin@endpgfpicture=\endpgfpicture
+\def\bidi@pgfpicture{\ifmmode\else\beginL\fi\origin@pgfpicture}
+\def\endbidi@pgfpicture{\origin@endpgfpicture\ifmmode\else\endL\fi}
\def\pgfpicture{\ifmmode\else\LTR\beginL\fi\origin@pgfpicture}
-\def\endpgfpicture{\origin@endpgfpicture\ifmmode\else\endL\endLTR\fi}%
+\def\endpgfpicture{\origin@endpgfpicture\ifmmode\else\endL\endLTR\fi}
% \end{macrocode}
% \iffalse
%</pgf-xetex-bidi.def>
@@ -17100,6 +17104,46 @@ to\rtside{\box\bslice\hfil}}
% \end{macrocode}
% \iffalse
%</tc-xetex-bidi.def>
+%<*tikz-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{tikz-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{tikz-xetex-bidi.def}[2014/11/20 v0.1 bidi adaptations for tikz package for XeTeX engine]
+\def\bidi@tikzpicture{%
+ \begingroup%
+ \tikz@startup@env%
+ \pgfutil@ifnextchar[\bidi@tikz@picture{\bidi@tikz@picture[]}}%}
+\def\bidi@tikz@picture[#1]{%
+ \bidi@pgfpicture%
+ \let\tikz@atbegin@picture=\pgfutil@empty%
+ \let\tikz@atend@picture=\pgfutil@empty%
+ \let\tikz@transform=\relax%
+ \def\tikz@time{.5}%
+ \tikz@installcommands%
+ \scope[every picture,#1]%
+ \iftikz@handle@active@code%
+ \tikz@switchoff@shorthands%
+ \fi%
+ \expandafter\tikz@atbegin@picture%
+ \tikz@lib@scope@check%
+}
+\def\endbidi@tikzpicture{%
+ \tikz@atend@picture%
+ \global\let\pgf@shift@baseline@smuggle=\pgf@baseline%
+ \global\let\pgf@trimleft@final@smuggle=\pgf@trimleft%
+ \global\let\pgf@trimright@final@smuggle=\pgf@trimright%
+ \global\let\pgf@remember@smuggle=\ifpgfrememberpicturepositiononpage%
+ \pgf@remember@layerlist@globally
+ \endscope%
+ \let\pgf@baseline=\pgf@shift@baseline@smuggle%
+ \let\pgf@trimleft=\pgf@trimleft@final@smuggle%
+ \let\pgf@trimright=\pgf@trimright@final@smuggle%
+ \let\ifpgfrememberpicturepositiononpage=\pgf@remember@smuggle%
+ \pgf@restore@layerlist@from@global
+ \endbidi@pgfpicture\endgroup}
+% \end{macrocode}
+% \iffalse
+%</tikz-xetex-bidi.def>
%<*titlesec-xetex-bidi.def>
%\fi
% \subsection{\textsf{titlesec-xetex-bidi.def}}
@@ -17847,6 +17891,70 @@ to\rtside{\box\bslice\hfil}}
% \end{macrocode}
% \iffalse
%</tocstyle-xetex-bidi.def>
+%<*todonotes-xetex-bidi.def>
+%\fi
+% \subsection{\textsf{todonotes-xetex-bidi.def}}
+% \begin{macrocode}
+\ProvidesFile{todonotes-xetex-bidi.def}[2014/11/20 v0.1 bidi adaptations for todonotes package for XeTeX engine]
+\renewcommand{\@todonotes@drawMarginNoteWithLine}{%
+\begin{bidi@tikzpicture}[remember picture, overlay, baseline=-0.75ex]%
+ \node [coordinate] (inText) {};%
+\end{bidi@tikzpicture}%
+\marginpar[{% Draw note in left margin
+ \@todonotes@drawMarginNote%
+ \if@RTL\@todonotes@drawLineToRightMargin\else\@todonotes@drawLineToLeftMargin\fi%
+}]{% Draw note in right margin
+ \@todonotes@drawMarginNote%
+ \if@RTL\@todonotes@drawLineToLeftMargin\else\@todonotes@drawLineToRightMargin\fi%
+}%
+}%
+\newcommand{\@bidi@todonotes@align}{left}%
+\define@key{todonotes}{align}{\renewcommand{\@bidi@todonotes@align}{#1}}%
+\newcommand{\@bidi@todonotes@textdirection}{}%
+\define@choicekey{todonotes}{textdirection}[\bidi@todonotes@tempa\bidi@todonotes@tempb]{righttoleft,lefttoright}{%
+ \ifcase\bidi@todonotes@tempb\relax
+ \let\@bidi@todonotes@textdirection\RLE
+ \or
+ \let\@bidi@todonotes@textdirection\LRE
+ \fi}
+\renewcommand{\@todonotes@drawMarginNote}{%
+\if@todonotes@dviStyle%
+ \begin{tikzpicture}[remember picture]%
+ \draw node[notestyle] {};%
+ \end{tikzpicture}\\%
+ \begin{minipage}{\@todonotes@textwidth}%
+ \if@todonotes@authorgiven%
+ \@todonotes@sizecommand \@todonotes@author \@todonotes@text%
+ \else%
+ \@todonotes@sizecommand \@todonotes@text%
+ \fi%
+ \end{minipage}\\%
+ \begin{tikzpicture}[remember picture]%
+ \draw node[notestyle] (inNote) {};%
+ \end{tikzpicture}%
+\else%
+ \let\originalHbadness\hbadness%
+ \hbadness 100000%
+ \begin{tikzpicture}[remember picture,baseline=(X.base)]%
+ \node(X){\vphantom{X}};%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@text};%
+ \if@todonotes@authorgiven%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)%
+ {\@todonotes@sizecommand\@todonotes@author};%
+ \node(Y)[below=of X]{};%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.south)%
+ {\@todonotes@text};%
+ \else%
+ \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.north)%
+ {\@bidi@todonotes@textdirection{\@todonotes@text}};%
+ \fi%
+ \end{tikzpicture}%
+ \hbadness \originalHbadness%
+\fi}%
+% \end{macrocode}
+% \iffalse
+%</todonotes-xetex-bidi.def>
%<*wrapfig-xetex-bidi.def>
%\fi
% \subsection{\textsf{wrapfig-xetex-bidi.def}}
@@ -18045,7 +18153,7 @@ to\rtside{\box\bslice\hfil}}
%\fi
% \subsection{\textsf{latex-xetex-bidi.def}}
% \begin{macrocode}
-\ProvidesFile{latex-xetex-bidi.def}[2014/11/08 v1.1.6 bidi adaptations for `latex.ltx' for XeTeX engine]
+\ProvidesFile{latex-xetex-bidi.def}[2014/11/20 v1.1.7 bidi adaptations for `latex.ltx' for XeTeX engine]
\newcommand{\TeXXeTOn}{\TeXXeTstate=1 }
\newcommand{\TeXXeTOff}{\TeXXeTstate=0 }
\TeXXeTOn
@@ -18804,6 +18912,8 @@ $\@@underline{\hbox{#1}}\m@th$\relax\fi\fi}
\@ifpackageloaded{tocbibind}{\@ifclassloaded{memoir}{}{\input{tocbibind-xetex-bidi.def}}}{}
\@ifpackageloaded{tocloft}{\@ifclassloaded{memoir}{}{\input{tocloft-xetex-bidi.def}}}{}
\@ifdefinitionfileloaded{tc-xetex}{\input{tc-xetex-bidi.def}}{}
+\@ifpackageloaded{tikz}{\input{tikz-xetex-bidi.def}}{}
+\@ifpackageloaded{todonotes}{\input{todonotes-xetex-bidi.def}}{}
% \end{macrocode}
% \iffalse
%</latex-xetex-bidi.def>