diff options
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def | 57 |
1 files changed, 40 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def index 6a9137235e2..acdbd608388 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/todonotes-xetex-bidi.def @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{42863} +%% \CheckSum{42904} %% \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,18 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% -\ProvidesFile{todonotes-xetex-bidi.def}[2014/11/20 v0.1 bidi adaptations for todonotes package for XeTeX engine] +\ProvidesFile{todonotes-xetex-bidi.def}[2014/11/21 v0.1 bidi adaptations for todonotes package for XeTeX engine] +\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 + \let\@bidi@todonotes@textdirection\RLE + \or + \let\@bidi@todonotes@textdirection\LRE + \fi} +\if@todonotes@disabled% +\else % \if@todonotes@disabled \renewcommand{\@todonotes@drawMarginNoteWithLine}{% \begin{bidi@tikzpicture}[remember picture, overlay, baseline=-0.75ex]% \node [coordinate] (inText) {};% @@ -47,15 +58,6 @@ \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]% @@ -76,14 +78,14 @@ \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};% + \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.north)% + {\@bidi@todonotes@textdirection{\@todonotes@text}};% \if@todonotes@authorgiven% - \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.north)% - {\@todonotes@sizecommand\@todonotes@author};% + \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.north)% + {\@bidi@todonotes@textdirection{\@todonotes@sizecommand\@todonotes@author}};% \node(Y)[below=of X]{};% - \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north] (inNote) at (X.south)% - {\@todonotes@text};% + \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.south)% + {\@bidi@todonotes@textdirection{\@todonotes@text}};% \else% \draw node[notestyle,font=\@todonotes@sizecommand,anchor=north,align=\@bidi@todonotes@align] (inNote) at (X.north)% {\@bidi@todonotes@textdirection{\@todonotes@text}};% @@ -91,6 +93,27 @@ \end{tikzpicture}% \hbadness \originalHbadness% \fi}% +\renewcommand{\missingfigure}[2][]{% +\setkeys{todonotes}{#1}% +\addcontentsline{tdo}{todo}{\@todonotes@MissingFigureText: #2}% +\par +\noindent +\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}}; +\draw[red, fill=white, rounded corners = 5pt, line width=10pt] + (30:2cm) -- (150:2cm) -- (270:2cm) -- cycle; +\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}}; +\end{tikzpicture}\hfill +}% Ending \missingfigure command +\fi % Ending \@todonotes@ifdisabled +\presetkeys% + {todonotes}% + {align=left,% + textdirection=lefttoright}{}% \endinput %% %% End of file `todonotes-xetex-bidi.def'. |