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

michal_h21 at gnu.org.ua michal_h21 at gnu.org.ua
Wed Jun 19 16:35:32 CEST 2019


Author: michal_h21
Date: 2019-06-19 17:35:32 +0300 (Wed, 19 Jun 2019)
New Revision: 580

Modified:
   trunk/lit/ChangeLog
   trunk/lit/mktex4ht-cnf.tex
   trunk/lit/tex4ht-4ht.tex
   trunk/lit/tex4ht-html4.tex
   trunk/lit/tex4ht-ooffice.tex
Log:
fixed direction support for polyglossia

Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog	2019-06-18 22:53:00 UTC (rev 579)
+++ trunk/lit/ChangeLog	2019-06-19 14:35:32 UTC (rev 580)
@@ -1,3 +1,9 @@
+2019-06-19  Michal Hoftich  <michal.h21 at gmail.com>
+
+	* tex4ht-4ht.tex (usepackage.4ht, polyglossia.4ht),
+	tex4ht-html4.tex (html4.4ht),
+	tex4ht-ooffice.tex (ooffice.4ht): fixed direction support for polyglossia.
+
 2019-06-18  Michal Hoftich  <michal.h21 at gmail.com>
 
 	* tex4ht-4ht.tex (fontspec-4ht.lua): fix for unicode specials

Modified: trunk/lit/mktex4ht-cnf.tex
===================================================================
--- trunk/lit/mktex4ht-cnf.tex	2019-06-18 22:53:00 UTC (rev 579)
+++ trunk/lit/mktex4ht-cnf.tex	2019-06-19 14:35:32 UTC (rev 580)
@@ -334,6 +334,7 @@
 \AddFile{9}{greek}
 \AddFile{9}{magyar}
 \AddFile{9}{exam}
+\AddFile{9}{polyglossia}
 \AddFile{9}{fontspec}
 \AddFile{9}{fontspec-xetex}
 \AddFile{9}{fontspec-luatex}

Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2019-06-18 22:53:00 UTC (rev 579)
+++ trunk/lit/tex4ht-4ht.tex	2019-06-19 14:35:32 UTC (rev 580)
@@ -3691,7 +3691,50 @@
 \fi
 >>>
 
+%%%%%%%%%%%%%%%%%
+\Section{polyglossia}
+%%%%%%%%%%%%%%%%%
 
+The direction option for Polyglossia's language selection commands causes
+tex4ht support for XeLaTeX fail. tex4ht use a different mechanism for direction
+handling, so we can just disable it.
+
+\<use package\><<<
+polyglossia,>>>
+
+\<add to usepackage\><<<
+\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"}}%
+}}
+
+>>>
+
+\<polyglossia.4ht\><<<
+% polyglossia.4ht (|version), generated from |jobname.tex
+% Copyright 2019 TeX Users Group
+|<TeX4ht license text|>
+\NewConfigure{PolyglossiaRtl}{2}
+\Hinput{polyglossia}
+\endinput
+>>> \AddFile{9}{polyglossia}
+
+
 %%%%%%%%%%%%%%%%%
 \Section{fontspec}
 %%%%%%%%%%%%%%%%%

Modified: trunk/lit/tex4ht-html4.tex
===================================================================
--- trunk/lit/tex4ht-html4.tex	2019-06-18 22:53:00 UTC (rev 579)
+++ trunk/lit/tex4ht-html4.tex	2019-06-19 14:35:32 UTC (rev 580)
@@ -21869,6 +21869,10 @@
 >>>
 
 
+\<configure html4 polyglossia\><<<
+\Configure{PolyglossiaRtl}{\Configure{LRdir}{}}{\Configure{LRdir}{ dir="rtl"}}
+>>>
+
 \<configure html4 animate\><<<
 \Configure{animinline}{\Picture+{}}{\EndPicture}
 \ConfigureEnv{animateinline}{%

Modified: trunk/lit/tex4ht-ooffice.tex
===================================================================
--- trunk/lit/tex4ht-ooffice.tex	2019-06-18 22:53:00 UTC (rev 579)
+++ trunk/lit/tex4ht-ooffice.tex	2019-06-19 14:35:32 UTC (rev 580)
@@ -9418,6 +9418,12 @@
   {\HCode{</text:p>}}
 >>>
 
+%%%%%%%%%%%%%%%%%%
+\section{Polyglossia}
+%%%%%%%%%%%%%%%%%%
+\<configure polyglossia polyglossia\><<<
+\Configure{PolyglossiaRtl}{\@rltrue}{\@rlfalse}
+>>>
 
 %%%%%%%%%%%%%%%%%%
 \section{Babel}



More information about the tex4ht-commits mailing list