diff options
author | Karl Berry <karl@freefriends.org> | 2019-08-29 15:46:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2019-08-29 15:46:02 +0000 |
commit | 7576bebf95b7501ef361c4c491c7960df42ec52b (patch) | |
tree | 55370dc2375282bf9650ccc5f3eeafd303367b11 /Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty | |
parent | 4b4be65fc955720fea20f00a76dd18bf93eb0717 (diff) |
luabidi (29aug19)
git-svn-id: svn://tug.org/texlive/trunk@51983 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty b/Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty new file mode 100644 index 00000000000..abc1d2a9367 --- /dev/null +++ b/Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty @@ -0,0 +1,56 @@ +%% This file is luabidi.sty +%% +%% Copyright © 2009 Vafa Khalighi, 2013--2019 Arthur Reutenauer, 2019 Jürgen Spitzmüller +%% +%%%% It may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3c +%% of this license or (at your option) any later version. +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{luabidi}[2019/08/24 v0.4 + Bidirectional typesetting in LuaTeX] +\newif\if@RTL +\newif\if@RTLmain +\def\setRTLmain{\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT} +\def\setRTL{\@RTLtrue\pardir TRT \textdir TRT} +\let\setRL=\setRTL +\def\setLTR{\@RTLfalse\pardir TLT \textdir TLT} +\let\setLR=\setLTR +\let\unsetRTL=\setLTR +\let\unsetLTR=\setRTL +\def\RTL{\@RTLtrue\trivlist \pardir TRT \textdir TRT\item\relax} +\def\endRTL{\@RTLfalse\endtrivlist} +\def\LTR{\trivlist \pardir TLT \textdir TLT\item\relax} +\def\endLTR{\endtrivlist} +\def\@ensure@RTL#1{\if@RTL#1\else\RLE{#1}\fi} +\def\@ensure@LTR#1{\if@RTL\LRE{#1}\else{#1}\fi} +\def\@ensure@dir#1{\if@RTL\RLE{#1}\else{#1}\fi} +\let\@ensure@maindir=\@ensuredir +\@RTLmainfalse +\DeclareOption{arabmaths}{\input{arabmaths}} +\DeclareOption{textwidthfootnoterule}{\input{textwidthfootnoterule}} +\let\n@xt=\ +\DeclareRobustCommand*\LRE{\protect\pLRE} +\def\pLRE{\protect\afterassignment\moreLRE \let\n@xt= } +\DeclareRobustCommand*\RLE{\protect\pRLE} +\def\pRLE{\protect\afterassignment\moreRLE \let\n@xt= } +\def\bracetext{\ifcat\n@xt{\else\ifcat\n@xt}\fi + \errmessage{Missing left brace has been substituted}\fi \bgroup} +\def\moreLRE{\bracetext \aftergroup\unsetLTR \setLTR\@RTLfalse} +\def\moreRLE{\bracetext \aftergroup\unsetRTL \setRTL\@RTLtrue} +\let\LR=\LRE +\let\RL=\RLE + +\def\Footnote#1{% +\begingroup +\footnotemark +\renewcommand{\thefootnote}{\@arabic\c@footnote}% +\pardir TLT \textdir TLT\footnotetext{#1}% +\endgroup +} + +\DeclareOption{autofootnoterule}{\input{autofootnoterule}} + + + +\ProcessOptions +\endinput |