From 15a55b29b4d502d5b49deceead0696bbafe1999a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Sun, 23 Nov 2014 20:54:22 +0000 Subject: bidi (23nov14) git-svn-id: svn://tug.org/texlive/trunk@35649 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/source/xelatex/bidi/bidi.dtx | 61 +++++++++++++++++++------- 1 file changed, 44 insertions(+), 17 deletions(-) (limited to 'Master/texmf-dist/source') diff --git a/Master/texmf-dist/source/xelatex/bidi/bidi.dtx b/Master/texmf-dist/source/xelatex/bidi/bidi.dtx index 4f0b317a253..2fafd18202e 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 -v16.1 +v16.2 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/21 +Current version release date: 2014/11/23 ___________________ Vafa Khalighi @@ -317,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 16.1}} +%\large Documentation for \textcolor{blue!65!black}{version 16.2}} % \author{Vafa Khalighi\\ % \url{persian-tex@tug.org}} %\setcounter{page}{0} @@ -328,7 +328,7 @@ by Vafa Khalighi. %\textcolor{blue!65!black}{\Huge The \textsf{bidi} \textit{Package}} % %\Large -%Documentation for \textcolor{blue!65!black}{version 16.1}} +%Documentation for \textcolor{blue!65!black}{version 16.2}} % %\vskip 0pt plus 3fill %\textit{\large to my Master, \textbf{Ferdowsi The Great}} @@ -379,7 +379,7 @@ by Vafa Khalighi. %* %* Copyright © 2009–2014 Vafa Khalighi %* -%* 2014/11/21, v16.1 +%* 2014/11/23, v16.2 %* %* License: LaTeX Project Public License, version %* 1.3c or higher (your choice) @@ -1136,7 +1136,7 @@ by Vafa Khalighi. %\iffalse %<*table> %\fi -%% \CheckSum{42904} +%% \CheckSum{42937} %% \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 @@ -2667,8 +2667,8 @@ by Vafa Khalighi. % \subsection{\textsf{bidi.sty}} % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\def\bididate{2014/11/21} -\def\bidiversion{v16.1} +\def\bididate{2014/11/23} +\def\bidiversion{v16.2} \ProvidesPackage{bidi}[\bididate\space \bidiversion\space Bidirectional typesetting in plain TeX and LaTeX] \edef\@bidi@info{****************************************************^^J% @@ -2790,7 +2790,7 @@ Bidirectional typesetting in plain TeX and LaTeX] %\fi % \subsection{\textsf{bidi.tex}} % \begin{macrocode} -\def\bididate{2014/11/21} +\def\bididate{2014/11/23} \def\bidiversion{v0.2} \catcode`@=11 \let \protect \relax @@ -17895,16 +17895,26 @@ to\rtside{\box\bslice\hfil}} %\fi % \subsection{\textsf{todonotes-xetex-bidi.def}} % \begin{macrocode} -\ProvidesFile{todonotes-xetex-bidi.def}[2014/11/21 v0.1 bidi adaptations for todonotes package for XeTeX engine] +\ProvidesFile{todonotes-xetex-bidi.def}[2014/11/23 v0.2 bidi adaptations for todonotes package for XeTeX engine] +\newif\if@bidi@todonotes@textdirection@RTL +\newif\if@bidi@todonotes@figposition@right \newcommand{\@bidi@todonotes@align}{}% \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 + \@bidi@todonotes@textdirection@RTLtrue \let\@bidi@todonotes@textdirection\RLE \or + \@bidi@todonotes@textdirection@RTLfalse \let\@bidi@todonotes@textdirection\LRE \fi} +\define@choicekey{todonotes}{figposition}[\bidi@todonotes@tempa\bidi@todonotes@tempb]{right,left}{% + \ifcase\bidi@todonotes@tempb\relax + \@bidi@todonotes@figposition@righttrue + \or + \@bidi@todonotes@figposition@rightfalse + \fi} \if@todonotes@disabled% \else % \if@todonotes@disabled \renewcommand{\@todonotes@drawMarginNoteWithLine}{% @@ -17938,18 +17948,19 @@ to\rtside{\box\bslice\hfil}} \let\originalHbadness\hbadness% \hbadness 100000% \begin{tikzpicture}[remember picture,baseline=(X.base)]% + \if@bidi@todonotes@textdirection@RTL\setRTL\fi% \node(X){\vphantom{X}};% \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.north)% - {\@bidi@todonotes@textdirection{\@todonotes@text}};% + {\@todonotes@text};% \if@todonotes@authorgiven% \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.north)% - {\@bidi@todonotes@textdirection{\@todonotes@sizecommand\@todonotes@author}};% + {\@todonotes@sizecommand\@todonotes@author};% \node(Y)[below=of X]{};% \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.south)% - {\@bidi@todonotes@textdirection{\@todonotes@text}};% + {\@todonotes@text};% \else% \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.north)% - {\@bidi@todonotes@textdirection{\@todonotes@text}};% + {\@todonotes@text};% \fi% \end{tikzpicture}% \hbadness \originalHbadness% @@ -17962,19 +17973,35 @@ to\rtside{\box\bslice\hfil}} \begin{tikzpicture} \draw[fill=\@todonotes@currentfigcolor, draw = black!40, line width=2pt] (-2, -2.5) rectangle +(\@todonotes@currentfigwidth, \@todonotes@currentfigheight); -\draw (2, -0.3) node[right, text - width=\@todonotes@currentfigwidth-4.5cm,align=\@bidi@todonotes@align] {\@bidi@todonotes@textdirection{#2}}; +\if@bidi@todonotes@figposition@right% +\begin{scope}[xshift=\@todonotes@currentfigwidth-4cm] +\fi% \draw[red, fill=white, rounded corners = 5pt, line width=10pt] (30:2cm) -- (150:2cm) -- (270:2cm) -- cycle; +\if@bidi@todonotes@figposition@right% +\end{scope} +\begin{scope}[xshift=-3.8cm] +\fi% +\if@bidi@todonotes@textdirection@RTL\setRTL\fi% +\draw (2, -0.3) node[right, text + width=\@todonotes@currentfigwidth-4.5cm,align=\@bidi@todonotes@align] {#2}; +\if@bidi@todonotes@figposition@right% +\end{scope} +\begin{scope}[xshift=\@todonotes@currentfigwidth-4cm] +\fi% \draw (0, 0.3) node[align=\@bidi@todonotes@align] {\@bidi@todonotes@textdirection{\@todonotes@MissingFigureUp}}; \draw (0, -0.3) node[align=\@bidi@todonotes@align] {\@bidi@todonotes@textdirection{\@todonotes@MissingFigureDown}}; +\if@bidi@todonotes@figposition@right% +\end{scope} +\fi% \end{tikzpicture}\hfill }% Ending \missingfigure command \fi % Ending \@todonotes@ifdisabled \presetkeys% {todonotes}% {align=left,% - textdirection=lefttoright}{}% + textdirection=lefttoright,% + figposition=left}{}% % \end{macrocode} % \iffalse % -- cgit v1.2.3