[LyX/master] fix-arabic-preamble-for-luatex

Juergen Spitzmueller spitz at lyx.org
Fri Aug 11 09:02:11 UTC 2023


commit a2ad210926784aada2dc4c5d7d8cea79beeb7a80
Author: Udi Fogiel <udifoglle at gmail.com>
Date:   Tue Aug 1 04:42:22 2023 +0300

    fix-arabic-preamble-for-luatex
---
 lib/languages |   38 ++++++++++++++++++++------------------
 1 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/lib/languages b/lib/languages
index 7f5d465..58c85cc 100644
--- a/lib/languages
+++ b/lib/languages
@@ -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 at noboundary\noboundary
-	  \DeclareTextCommandDefault{\noboundary}{\orig at noboundary}
-	  % work around too simple test for article-like classes in arabicore.sty
-	  \ifdefined\chapter\else
-	    \def\thesection{\protect\if at rl\protect\I{\number\c at section}%
-	      \protect\else\protect\textLR{\number\c at section}%
-	      \protect\fi}
-	    \def\thesubsection{\protect\if at rl\protect\I{\number\c at subsection.\number\c at section}%
-	      \protect\else\protect\textLR{\number\c at section.\number\c at subsection}%
-	      \protect\fi}%
-	    \def\thetable{\protect\if at rl\protect\I{\number\c at table}%
-	      \protect\else\protect\textLR{\number\c at table}%
-	      \protect\fi}%
-	    \def\thefigure{\protect\if at rl\protect\I{\number\c at figure}%
-	      \protect\else\protect\textLR{\number\c at figure}%
-	      \protect\fi}%
-	  \fi
+	  \@ifundefined{if at rl}{}{
+		  % arabic + hyperref redefines \noboundary as local textcommand
+		  \let\orig at noboundary\noboundary
+		  \DeclareTextCommandDefault{\noboundary}{\orig at noboundary}
+		  % work around too simple test for article-like classes in arabicore.sty
+		  \@ifundefined{chapter}{
+		    \def\thesection{\protect\if at rl\protect\I{\number\c at section}%
+		      \protect\else\protect\textLR{\number\c at section}%
+		      \protect\fi}
+		    \def\thesubsection{\protect\if at rl\protect\I{\number\c at subsection.\number\c at section}%
+		      \protect\else\protect\textLR{\number\c at section.\number\c at subsection}%
+		      \protect\fi}
+		    \def\thetable{\protect\if at rl\protect\I{\number\c at table}%
+		      \protect\else\protect\textLR{\number\c at table}%
+		      \protect\fi}
+		    \def\thefigure{\protect\if at rl\protect\I{\number\c at figure}%
+		      \protect\else\protect\textLR{\number\c at figure}%
+		      \protect\fi}
+		  }{}
+	  }
 	EndPostBabelPreamble
 	LangCode         ar_SA
 End


More information about the lyx-cvs mailing list