]> git.lyx.org Git - features.git/commitdiff
Fix error with arabic and KOMA-article (as well as other article-like classes).
authorGünter Milde <milde@lyx.org>
Thu, 9 May 2019 19:41:48 +0000 (21:41 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:28 +0000 (15:48 +0200)
lib/languages

index 8c51b0f79c0621b037ffb2e3ccf04b3bbe2aeb34..e1f5b4749007f0dc653afb8eb8ef3352fb139f3e 100644 (file)
@@ -235,9 +235,24 @@ Language arabic_arabi
        DateFormats      "d MMMM، yyyy|dd/MM/yyyy|d/M/yyyy"
        RTL              true
        PostBabelPreamble
-         % arabi + hyperref redefines \noboundary as local textcommand
+         % 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
        EndPostBabelPreamble
        LangCode         ar_SA
 End
@@ -824,7 +839,7 @@ Language icelandic
 End
 
 # Interlingua has no official country code because it is an auxiliary
-# language. We therefore the name of its hunspell dictionary.
+# language. We use the name of its hunspell dictionary.
 Language interlingua
        GuiName          "Interlingua"
        HasGuiSupport    true