texlive[68432] Master/texmf-dist: luabidi (2oct23)

commits+karl at tug.org commits+karl at tug.org
Mon Oct 2 21:44:19 CEST 2023


Revision: 68432
          https://tug.org/svn/texlive?view=revision&revision=68432
Author:   karl
Date:     2023-10-02 21:44:19 +0200 (Mon, 02 Oct 2023)
Log Message:
-----------
luabidi (2oct23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md
    trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md
    trunk/Master/texmf-dist/doc/lualatex/luabidi/luabidi.pdf
    trunk/Master/texmf-dist/doc/lualatex/luabidi/luabidi.tex
    trunk/Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty

Modified: trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md	2023-10-02 19:44:10 UTC (rev 68431)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md	2023-10-02 19:44:19 UTC (rev 68432)
@@ -1,6 +1,7 @@
 # MIT Licence
 
-Copyright (c) Vafa Khalighi 2009, Arthur Reutenauer 2013, 2019, Jürgen Spitzmüller 2019.
+Copyright (c) Vafa Khalighi 2009, Arthur Reutenauer 2013, 2019-2023,
+Jürgen Spitzmüller 2019-2023.
 
 The licence for all files within this package is (the MIT
 licence)[https://opensource.org/licenses/MIT] unless otherwise noted.

Modified: trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md	2023-10-02 19:44:10 UTC (rev 68431)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md	2023-10-02 19:44:19 UTC (rev 68432)
@@ -5,4 +5,11 @@
 ## CTAN Package
 https://www.ctan.org/pkg/luabidi
 
-Copyright (c) Vafa Khalighi 2009, Arthur Reutenauer 2013, 2019, Jürgen Spitzmüller 2019
+Copyright (c) Vafa Khalighi 2009, Arthur Reutenauer 2013, 2019-2023,
+Jürgen Spitzmüller 2019-2023
+
+Except for luabidi.sty, all files in this package are licensed under the terms
+of the MIT licence in the wording of the Open Source Initiative
+(https://opensource.org/licenses/MIT).  The file luabidi.sty is licensed under
+the LaTeX Project Public License (https://www.latex-project.org/lppl/), either
+version 1.3c or, at your option, any later version.

Modified: trunk/Master/texmf-dist/doc/lualatex/luabidi/luabidi.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/luabidi/luabidi.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/luabidi.tex	2023-10-02 19:44:10 UTC (rev 68431)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/luabidi.tex	2023-10-02 19:44:19 UTC (rev 68432)
@@ -80,6 +80,8 @@
 \begin{document}
 \hyphenation{Kha-li-ghi Reu-ten-auer}
 \GetFileInfo{luabidi.sty}
+% not correctly set
+\def\fileversion{0.6}
 
 \title{\lbd\\\color{myblue}Bidirectional typesetting in \LuaLaTeX}
 
@@ -226,6 +228,9 @@
 \section{Revision Log}
 
 \begin{description}
+	\item[v. 0.6 (2023/10/01)] Fixing a bug in \cmd{\RLE} and \cmd{\LRE}; Switching \cmd{\bodydir} inside long RTL/LTR text;
+		 ensuring \cmd{\bodydir} and \cmd{\pagedir} are equal at shipout; patching lists to use a correct value of \cmd{\shapemode};
+		 Setting \cmd{\breakafterdirmode} and \cmd{\matheqdirmode} to 1. Patch kindly provided by Udi Fogiel.
 	\item[v. 0.5 (2019/10/27)] Add \cmd{\RTLfootnote}, \cmd{\LTRfootnote}, and \cmd{\hboxR}; fix \texttt{autofootnoterule} option; add \cmd{\autofootnoterule},
 	     \cmd{\leftfootnoterule}, \cmd{\rightfootnoterule} and \cmd{\textwidthfootnoterule}; add manual.
 	\item[v. 0.4 (2019/08/24)] Fix \cmd{\@ensure at RTL}.

Modified: trunk/Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty	2023-10-02 19:44:10 UTC (rev 68431)
+++ trunk/Master/texmf-dist/tex/lualatex/luabidi/luabidi.sty	2023-10-02 19:44:19 UTC (rev 68432)
@@ -1,13 +1,14 @@
 %% This file is luabidi.sty
 %% This is part of the luabidi package
 %%
-%% Copyright © 2009 Vafa Khalighi, 2013--2019 Arthur Reutenauer, 2019 Jürgen Spitzmüller
+%% Copyright © 2009 Vafa Khalighi, 2013--2023 Arthur Reutenauer,
+%% 2019--2023 Jürgen Spitzmüller
 %%
 %%%% It may be distributed and/or modified under the
 %% conditions of the LaTeX Project Public License, either version 1.3c
 %% of this license or (at your option) any later version.
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{luabidi}[2019/10/27 v0.5
+\ProvidesPackage{luabidi}[2023/10/01 v0.6
 	Bidirectional typesetting in LuaTeX]
 
 \RequirePackage{etoolbox}
@@ -29,20 +30,19 @@
 
 \newif\if at RTL
 \newif\if at RTLmain
-\@RTLmainfalse
-\def\setRTLmain{\@RTLmaintrue\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT}
-\def\setRTL{\@RTLtrue\pardir TRT \textdir TRT}
+\def\setRTLmain{\@RTLmaintrue\pagedir TRT\bodydir TRT\pardir TRT\textdir TRT}
+\def\setRTL{\@RTLtrue\bodydir TRT\pardir TRT\textdir TRT}
 \let\setRL=\setRTL
-\def\setLTR{\@RTLfalse\pardir TLT \textdir TLT}
+\def\setLTR{\@RTLfalse\bodydir TLT\pardir TLT\textdir TLT}
 \let\setLR=\setLTR
 \let\unsetRTL=\setLTR
 \let\unsetLTR=\setRTL
-\def\RTL{\@RTLtrue\trivlist \pardir TRT \textdir TRT\item\relax}
-\def\endRTL{\@RTLfalse\endtrivlist}
-\def\LTR{\trivlist \pardir TLT \textdir TLT\item\relax}
-\def\endLTR{\endtrivlist}
-\def\@ensure at RTL#1{\if at RTL#1\else\RLE{#1}\fi}
-\def\@ensure at LTR#1{\if at RTL\LRE{#1}\else{#1}\fi}
+\def\RTL{\par\@RTLtrue\bodydir TRT\pardir TRT\textdir TRT}
+\def\endRTL{\par}
+\def\LTR{\par\@RTLfalse\bodydir TLT\pardir TLT \textdir TLT}
+\def\endLTR{\par}
+\def\@ensure at RTL#1{\if at RTL #1\else\RLE{#1}\fi}
+\def\@ensure at LTR#1{\if at RTL\LRE{#1}\else #1\fi}
 \def\@ensure at dir#1{\if at RTL\RLE{#1}\else{#1}\fi}
 \let\@ensure at maindir=\@ensuredir
 \let\n at xt=\
@@ -52,13 +52,38 @@
 \def\pRLE{\protect\afterassignment\moreRLE \let\n at xt= }
 \def\bracetext{\ifcat\n at xt{\else\ifcat\n at xt}\fi
   \errmessage{Missing left brace has been substituted}\fi \bgroup}
-\def\moreLRE{\bracetext \aftergroup\unsetLTR \setLTR\@RTLfalse}
-\def\moreRLE{\bracetext \aftergroup\unsetRTL \setRTL\@RTLtrue}
+\def\moreLRE{\bracetext \leavevmode\@RTLfalse\textdir TLT}
+\def\moreRLE{\bracetext \leavevmode\@RTLtrue\textdir TRT}
 \let\LR=\LRE
 \let\RL=\RLE
 \def\hboxR#1{\hbox{\RL{#1}}}
 
 %
+% If \pagedir is different from \pardir then \shapemode needs to be 2 for \parshape in lists
+%
+
+\let\luabidi at OL@list\list
+\patchcmd\list{\parshape}{\luabidi at parshape}{}{}
+\def\luabidi at parshape#1#2#3{%
+	\parshape #1 #2 #3 %
+	\ifnum\pagedirection=\pardirection\else
+	\shapemode\tw@
+\fi}
+
+%
+% making sure \bodydir is the same as \pagedir at \output time
+%
+
+\output\expandafter{\expandafter\bodydir\expandafter\pagedir\the\output}
+
+%
+% The following registers are set to 1 to fix some bugs in the engine. See sections 3.3.3 and 7.5.3 of LuaTeX's manual.
+%
+
+\matheqdirmode=1
+\breakafterdirmode=1
+
+%
 % Footnotes
 %
 
@@ -70,11 +95,9 @@
 
 % This needs to be loaded late because of the switch
 \AtEndPreamble{%
-  \makeatletter
      \ifluabidi at autofootnoterule
          \input{luabidi-autofootnoterule.def}
      \fi
-  \makeatother
 }
 
 \endinput



More information about the tex-live-commits mailing list.