diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/simurgh/simurgh-bidi.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/simurgh/simurgh-bidi.sty | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/lualatex/simurgh/simurgh-bidi.sty b/Master/texmf-dist/tex/lualatex/simurgh/simurgh-bidi.sty index 925dc440e43..d7a0ded8680 100644 --- a/Master/texmf-dist/tex/lualatex/simurgh/simurgh-bidi.sty +++ b/Master/texmf-dist/tex/lualatex/simurgh/simurgh-bidi.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{simurgh-bidi}[2013/12/01 v0.01a bidirectional typesetting] -\directlua { tex.enableprimitives('simurgh@',{'pagedir','bodydir','pardir','textdir','mathdir','boxdir'}) } +\ProvidesPackage{simurgh-bidi}[2013/09/18 v0.01a bidirectional typesetting] +\directlua { tex.enableprimitives('',{'pagedir','bodydir','pardir','textdir','mathdir','boxdir'}) } \newif\if@RTLmain \newif\if@RTL \newif\if@Latin @@ -19,25 +19,28 @@ \def\simurgh@ptextRLE{\protect\afterassignment\simurgh@moretextRLE \let\simurgh@n@xt= } \def\simurgh@bracetext{\ifcat\simurgh@n@xt{\else\ifcat\simurgh@n@xt}\fi \simurgh@error{missing left brace has been substituted}{}\fi \bgroup} -\def\simurgh@moretextLRE{\simurgh@bracetext \@RTLfalse\simurgh@textdir TLT} -\def\simurgh@moretextRLE{\simurgh@bracetext \@RTLtrue\simurgh@textdir TRT} +\def\simurgh@moretextLRE{\simurgh@bracetext \@RTLfalse\textdir TLT} +\def\simurgh@moretextRLE{\simurgh@bracetext \@RTLtrue\textdir TRT} \simurgh@newrobustcmd*{\textLatin}[1]{\textLRE{\@Latintrue\latinmainfont #1}} \simurgh@newrobustcmd*{\textParsi}[1]{\textRLE{\@Latinfalse\parsimainfont #1}} - +\simurgh@newrobustcmd*{\LROtextdir}{\textdir TLT} +\simurgh@newrobustcmd*{\RLOtextdir}{\textdir TRT} \protected\def\hboxR{\hbox\bgroup \everyhbox{% \aftergroup\egroup \everyhbox{}% \@RTLtrue% + \textdir TRT% }\hbox dir TRT} \protected\def\hboxL{\hbox\bgroup \everyhbox{% \aftergroup\egroup \everyhbox{}% \@RTLfalse% + \textdir TLT% }\hbox dir TLT} \protected\def\vboxR{\vbox\bgroup \everyvbox{% @@ -66,12 +69,12 @@ - \def\LTRpar{\par\@RTLfalse\@RTL@footnotefalse\simurgh@pardir TLT \simurgh@textdir TLT \hsize\linewidth\parshape\z@} + \def\LTRpar{\par\@RTLfalse\@RTL@footnotefalse\pardir TLT \textdir TLT \hsize\linewidth\parshape\z@} \def\endLTRpar{\par} -\def\RTLpar{\par\@RTLtrue\@RTL@footnotetrue\simurgh@pardir TRT \simurgh@textdir TRT \hsize\linewidth\parshape\z@} +\def\RTLpar{\par\@RTLtrue\@RTL@footnotetrue\pardir TRT \textdir TRT \hsize\linewidth\parshape\z@} \let\endRTLpar\endLTRpar -\def\setRTLpar{\@RTLtrue\@RTL@footnotetrue\simurgh@pardir TRT \simurgh@textdir TRT} -\def\setLTRpar{\@RTLfalse\@RTL@footnotefalse\simurgh@pardir TLT \simurgh@textdir TLT} +\def\setRTLpar{\@RTLtrue\@RTL@footnotetrue\pardir TRT \textdir TRT} +\def\setLTRpar{\@RTLfalse\@RTL@footnotefalse\pardir TLT \textdir TLT} \let\unsetRTLpar\setLTRpar \let\unsetLTRpar\setRTLpar @@ -81,8 +84,8 @@ \def\parsipar{\RTLpar\ParsiAlphs\@RTL@footnotetrue\reset@parsifont} \let\endparsipar\endRTLpar -\def\setRTLmath{\simurgh@mathdir TRT} -\def\setLTRmath{\simurgh@mathdir TLT} +\def\setRTLmath{\mathdir TRT} +\def\setLTRmath{\mathdir TLT} \let\unsetRTLmath\setLTRmath \let\unsetLTRmath\setRTLmath |