texlive[58988] Master/texmf-dist: lua-ul (25apr21)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 25 22:01:30 CEST 2021


Revision: 58988
          http://tug.org/svn/texlive?view=revision&revision=58988
Author:   karl
Date:     2021-04-25 22:01:30 +0200 (Sun, 25 Apr 2021)
Log Message:
-----------
lua-ul (25apr21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/lua-ul/lua-ul.pdf
    trunk/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx
    trunk/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty
    trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua
    trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty

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

Modified: trunk/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx
===================================================================
--- trunk/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx	2021-04-25 20:00:35 UTC (rev 58987)
+++ trunk/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx	2021-04-25 20:01:30 UTC (rev 58988)
@@ -20,6 +20,7 @@
 %</gobble>
 \input docstrip.tex
 \keepsilent
+\askforoverwritefalse
 \let\MetaPrefix\relax
 \preamble
 \endpreamble
@@ -294,6 +295,11 @@
 
 local properties = node.direct.get_properties_table()
 
+%    \end{macrocode}
+% \verb+current_attr+ is not \texttt{.direct} since it's used in
+% place of a node callback argument.
+%    \begin{macrocode}
+local current_attr = node.current_attr
 local has_attribute = node.direct.has_attribute
 local set_attribute = node.direct.set_attribute
 local dimensions = node.direct.dimensions
@@ -773,6 +779,16 @@
     end, 'add underlines to list')
 luatexbase.add_to_callback('hpack_filter',
     function(head, group, size, pack, dir, attr)
+%    \end{macrocode}
+% \changes{0.1.3}{2021-04-25}{Correctly detect attributes in alignments}
+% When \verb+hpack_filter+ is called as part of an alignment, no attributes
+% are passed. It seems like a bug, but we will just substitute with the
+% current attributes. Since the callbacks are called after the group for the
+% cell ended, these should always be right.
+%    \begin{macrocode}
+      if group == 'align_set' or group == 'fin_row' then
+        attr = current_attr()
+      end
       head = todirect(head)
       for i = 1, #underlineattrs do
         local ulattr = underlineattrs[i]
@@ -816,7 +832,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage
   {lua-ul}
-  [2021/02/15 v0.1.2 Underlining and related functionality for LuaTeX]
+  [2021/04/25 v0.1.3 Underlining and related functionality for LuaTeX]
 
 % \fi
 % Only \LuaLaTeX{} is supported.

Modified: trunk/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty	2021-04-25 20:00:35 UTC (rev 58987)
+++ trunk/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty	2021-04-25 20:01:30 UTC (rev 58988)
@@ -13,7 +13,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage
   {docstrip-luacode}
-  [2021/02/15 v0.1.2 Directly execute Lua code from DocStrip files]
+  [2021/04/25 v0.1.3 Directly execute Lua code from DocStrip files]
 \expanded{%
   \def\noexpand\docstrip at luacode@argscanner#1\directlua{
   tex.sprint(\the\catcodetable at string, "\string\\end{docstrip-luacode}")

Modified: trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua	2021-04-25 20:00:35 UTC (rev 58987)
+++ trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua	2021-04-25 20:01:30 UTC (rev 58988)
@@ -25,6 +25,7 @@
 
 local properties = node.direct.get_properties_table()
 
+local current_attr = node.current_attr
 local has_attribute = node.direct.has_attribute
 local set_attribute = node.direct.set_attribute
 local dimensions = node.direct.dimensions
@@ -455,6 +456,9 @@
     end, 'add underlines to list')
 luatexbase.add_to_callback('hpack_filter',
     function(head, group, size, pack, dir, attr)
+      if group == 'align_set' or group == 'fin_row' then
+        attr = current_attr()
+      end
       head = todirect(head)
       for i = 1, #underlineattrs do
         local ulattr = underlineattrs[i]

Modified: trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty	2021-04-25 20:00:35 UTC (rev 58987)
+++ trunk/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty	2021-04-25 20:01:30 UTC (rev 58988)
@@ -20,7 +20,7 @@
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesPackage
   {lua-ul}
-  [2021/02/15 v0.1.2 Underlining and related functionality for LuaTeX]
+  [2021/04/25 v0.1.3 Underlining and related functionality for LuaTeX]
 
 \ifx\directlua\undefined
   \PackageError{lua-ul}{LuaLaTeX required}%



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