diff options
author | Karl Berry <karl@freefriends.org> | 2016-09-14 21:11:05 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-09-14 21:11:05 +0000 |
commit | fb5830e320c5ab416455dc9dbf51a9c49e29e4c8 (patch) | |
tree | 299ce8d6746ee528145bccdfa8449f8030407e0d /Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def | |
parent | cce4cfcca515abf63a126ff196f406246f4d7be3 (diff) |
bidi (14sep16)
git-svn-id: svn://tug.org/texlive/trunk@42060 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def')
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def b/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def index 89bd7471d2a..c2de28b1c05 100644 --- a/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def +++ b/Master/texmf-dist/tex/xelatex/bidi/listings-xetex-bidi.def @@ -17,7 +17,7 @@ %% by Vafa Khalighi. %% %% -%% \CheckSum{46470} +%% \CheckSum{47498} %% \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,13 +34,21 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} %% -\ProvidesFile{listings-xetex-bidi.def}[2015/08/23 v0.9 bidi adaptations for listings package for XeTeX engine] +\ProvidesFile{listings-xetex-bidi.def}[2016/09/12 v1.0 bidi adaptations for listings package for XeTeX engine] \lst@Key{captiondirection}{textdirection}{% \lstKV@SwitchCases{#1}% {textdirection&\\% RTL&\chardef\bidi@lst@caption@direction\@ne\\% LTR&\chardef\bidi@lst@caption@direction\z@% }{\PackageError{Listings}{direction #1 unknown}\@ehc}} + +\lst@Key{captionscript}{latin}{% + \lstKV@SwitchCases{#1}% + {% + latin&\chardef\bidi@lst@caption@script\@ne\\% + nonlatin&\chardef\bidi@lst@caption@script\z@% + }{\PackageError{Listings}{direction #1 unknown}\@ehc}} + \newcommand*{\bidi@lst@ensure@caption@direction}[2]{% \@ifundefined{bidi@lst@caption@direction}{}{% \ifnum\bidi@lst@caption@direction=\z@% @@ -52,6 +60,13 @@ \fi% }} \long\def\@bidi@lst@makecaption#1#2{% + \ifnum\bidi@lst@caption@script=\z@% + \@nonlatintrue% + \else% + \ifnum\bidi@lst@caption@script=\@ne% + \@nonlatinfalse% + \fi% + \fi% \vskip\abovecaptionskip \bidi@lst@ensure@caption@direction{\@RTLfalse}{\@RTLtrue}% \sbox\@tempboxa{% |