]> git.lyx.org Git - features.git/commitdiff
fix-arabic-preamble-for-luatex
authorUdi Fogiel <udifoglle@gmail.com>
Tue, 1 Aug 2023 01:42:22 +0000 (04:42 +0300)
committerJuergen Spitzmueller <spitz@lyx.org>
Fri, 11 Aug 2023 10:14:33 +0000 (12:14 +0200)
lib/languages

index 7f5d4655c0b58387e68e218751f49f98d4b6be3b..58c85ccfb47a879dcabe91e982f52ca737523856 100644 (file)
@@ -251,24 +251,26 @@ Language arabic_arabi
        DateFormats      "d MMMMŲŒ yyyy|dd/MM/yyyy|d/M/yyyy"
        RTL              true
        PostBabelPreamble
-         % arabic + hyperref redefines \noboundary as local textcommand
-         \let\orig@noboundary\noboundary
-         \DeclareTextCommandDefault{\noboundary}{\orig@noboundary}
-         % work around too simple test for article-like classes in arabicore.sty
-         \ifdefined\chapter\else
-           \def\thesection{\protect\if@rl\protect\I{\number\c@section}%
-             \protect\else\protect\textLR{\number\c@section}%
-             \protect\fi}
-           \def\thesubsection{\protect\if@rl\protect\I{\number\c@subsection.\number\c@section}%
-             \protect\else\protect\textLR{\number\c@section.\number\c@subsection}%
-             \protect\fi}%
-           \def\thetable{\protect\if@rl\protect\I{\number\c@table}%
-             \protect\else\protect\textLR{\number\c@table}%
-             \protect\fi}%
-           \def\thefigure{\protect\if@rl\protect\I{\number\c@figure}%
-             \protect\else\protect\textLR{\number\c@figure}%
-             \protect\fi}%
-         \fi
+         \@ifundefined{if@rl}{}{
+                 % arabic + hyperref redefines \noboundary as local textcommand
+                 \let\orig@noboundary\noboundary
+                 \DeclareTextCommandDefault{\noboundary}{\orig@noboundary}
+                 % work around too simple test for article-like classes in arabicore.sty
+                 \@ifundefined{chapter}{
+                   \def\thesection{\protect\if@rl\protect\I{\number\c@section}%
+                     \protect\else\protect\textLR{\number\c@section}%
+                     \protect\fi}
+                   \def\thesubsection{\protect\if@rl\protect\I{\number\c@subsection.\number\c@section}%
+                     \protect\else\protect\textLR{\number\c@section.\number\c@subsection}%
+                     \protect\fi}
+                   \def\thetable{\protect\if@rl\protect\I{\number\c@table}%
+                     \protect\else\protect\textLR{\number\c@table}%
+                     \protect\fi}
+                   \def\thefigure{\protect\if@rl\protect\I{\number\c@figure}%
+                     \protect\else\protect\textLR{\number\c@figure}%
+                     \protect\fi}
+                 }{}
+         }
        EndPostBabelPreamble
        LangCode         ar_SA
 End