[tex4ht-commits] [SCM] tex4ht updated: r631 - trunk/lit

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Fri Dec 13 14:43:29 CET 2019


Author: michal_h21
Date: 2019-12-13 15:43:29 +0200 (Fri, 13 Dec 2019)
New Revision: 631

Modified:
   trunk/lit/ChangeLog
   trunk/lit/tex4ht-4ht.tex
Log:
Fixed polyglossia direction handling

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2019-12-12 21:08:37 UTC (rev 630)
+++ trunk/lit/ChangeLog	2019-12-13 13:43:29 UTC (rev 631)
@@ -1,3 +1,7 @@
+2019-12-13 Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (usepackage.4ht): patched Polyglossia's direction handling.
+
 2019-12-12 Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (usepackage.4ht): the test for Polyglossia package was

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2019-12-12 21:08:37 UTC (rev 630)
+++ trunk/lit/tex4ht-4ht.tex	2019-12-13 13:43:29 UTC (rev 631)
@@ -3699,32 +3699,28 @@
 tex4ht support for XeLaTeX fail. tex4ht use a different mechanism for direction
 handling, so we can just disable it.
 
+User needs to use \`'\Configure{LRdir}'to achieve the correct direction.
+
 \<use package\><<<
 polyglossia,>>>
 
 \<add to usepackage\><<<
 \def\:temp{polyglossia}\ifx \@currname\:temp
+\ExplSyntaxOn
 \AtEndOfPackage{
-  \let\orig at xpg@define at keys\xpg at define@keys
-  \def\xpg at define@keys#1{%
-    \orig at xpg@define at keys{#1}%
-    \define at choicekey+[xpg at setup]{#1}{direction}[\val\nr]{LR,RL}[LR]%
-    {
-      \togglefalse{#1 at RL}%
-      \ifcase\nr\relax%
-        \csgappto{init at extras@#1}{%
-          a:PolyglossiaRtl%
-        }
-      \or
-        \csgappto{init at extras@#1}{%
-          \b:PolyglossiaRtl%
-        }
-      \fi
-    }%
-    {\xpg at warning{#1: Invalid value \val\space for key "direction"}}%
-}}
+
+\cs_set_eq:NN\orig_polyglossia at keys_define_lang:n\polyglossia at keys_define_lang:n
+\cs_set_protected:Npn \polyglossia at keys_define_lang:n #1 {
+  \orig_polyglossia at keys_define_lang:n{#1}
+  \keys_define:nn {polyglossia}{
+    #1 / direction
+    .  code:n = {}
+  }
+}
+\def\RequireBidi{}%
+}
+\ExplSyntaxOff
 \fi
-
 >>>
 
 \<polyglossia.4ht\><<<



More information about the tex4ht-commits mailing list