aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Alessi <alessi@robertalessi.net>2016-02-22 15:45:01 +0100
committerRobert Alessi <alessi@robertalessi.net>2016-02-22 15:45:01 +0100
commit426fd91e25f4a435712b4d9730413b74f4db376f (patch)
tree324e468a6e6fa33f56b43cb054ed9bf65b3c3375
parentb7d95ec20cf6c3491cd4a6299a6a617c38413be5 (diff)
downloadarabluatex-426fd91e25f4a435712b4d9730413b74f4db376f.tar.gz
(re)define \LR{} \AtBeginDocument{} in case luabidi is loaded
-rw-r--r--arabluatex.dtx12
1 files changed, 6 insertions, 6 deletions
diff --git a/arabluatex.dtx b/arabluatex.dtx
index 847bb2e..72792db 100644
--- a/arabluatex.dtx
+++ b/arabluatex.dtx
@@ -187,20 +187,20 @@
187\RequirePackage{environ} 187\RequirePackage{environ}
188\luadirect{dofile(kpse.find_file("arabluatex.lua"))} 188\luadirect{dofile(kpse.find_file("arabluatex.lua"))}
189% \end{macrocode} 189% \end{macrocode}
190% This is needed by the current version of \package{luabidi}. 190% This is needed by the current versions of \package{polyglossia} and
191% \package{luabidi}. \package{luabidi} provides a \cs{Footnote}
192% command. Use it as well if it is loaded.
191% \begin{macrocode} 193% \begin{macrocode}
192\luadirect{tex.enableprimitives("luatex",tex.extraprimitives("omega"))} 194\luadirect{tex.enableprimitives("luatex",tex.extraprimitives("omega"))}
193% \end{macrocode} 195% \end{macrocode}
194% \package{luabidi} provides a \cs{Footnote} command. Use it for now.
195% \begin{macrocode}
196\RequirePackage{luabidi}
197% \end{macrocode}
198% \begin{macrocode} 196% \begin{macrocode}
199\AtBeginDocument{\ifdefined\arabicfont\relax\else 197\AtBeginDocument{\ifdefined\arabicfont\relax\else
200\PackageWarning{arabluatex}{\string\arabicfont\ is not defined!^^JI 198\PackageWarning{arabluatex}{\string\arabicfont\ is not defined!^^JI
201 will try to load Amiri}% 199 will try to load Amiri}%
202\newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}% 200\newfontfamily\arabicfont[Script=Arabic]{Amiri}\fi}%
203\DeclareDocumentCommand{\LR}{+m}{\bgroup\textdir TLT\rmfamily#1\egroup} 201\AtBeginDocument{\ifdef{\LR}%
202 {\renewrobustcmd{\LR}[1]{\bgroup\textdir TLT\rmfamily#1\egroup}}
203 {\newrobustcmd{\LR}[1]{\bgroup\textdir TLT\rmfamily#1\egroup}}}
204\DeclareDocumentCommand{\txarb}{+m}{\bgroup\textdir TRT\arabicfont#1\egroup} 204\DeclareDocumentCommand{\txarb}{+m}{\bgroup\textdir TRT\arabicfont#1\egroup}
205\DeclareDocumentCommand{\arb}{O{\al@mode} +m}% 205\DeclareDocumentCommand{\arb}{O{\al@mode} +m}%
206{\edef\@tempa{#1}% 206{\edef\@tempa{#1}%