summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-04-25 20:01:30 +0000
committerKarl Berry <karl@freefriends.org>2021-04-25 20:01:30 +0000
commit0cbcfc232fca1b98c3123303779cb1dd6b116161 (patch)
tree9c0a53dc18de7ba2c0e8b04fb06a256a6cfd549c
parent9a7fbd3067b48f35e170f7ce637050f224b30453 (diff)
lua-ul (25apr21)
git-svn-id: svn://tug.org/texlive/trunk@58988 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/lualatex/lua-ul/lua-ul.pdfbin100003 -> 101260 bytes
-rw-r--r--Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx18
-rw-r--r--Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty2
-rw-r--r--Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua4
-rw-r--r--Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty2
5 files changed, 23 insertions, 3 deletions
diff --git a/Master/texmf-dist/doc/lualatex/lua-ul/lua-ul.pdf b/Master/texmf-dist/doc/lualatex/lua-ul/lua-ul.pdf
index f87859a29d0..537315bdf4f 100644
--- a/Master/texmf-dist/doc/lualatex/lua-ul/lua-ul.pdf
+++ b/Master/texmf-dist/doc/lualatex/lua-ul/lua-ul.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx b/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx
index c530c492b43..70fbbddb1c4 100644
--- a/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx
+++ b/Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx
@@ -20,6 +20,7 @@
%</gobble>
\input docstrip.tex
\keepsilent
+\askforoverwritefalse
\let\MetaPrefix\relax
\preamble
\endpreamble
@@ -294,6 +295,11 @@ local glue_t = node.id'glue'
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 @@ luatexbase.add_to_callback('pre_append_to_vlist_filter',
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 @@ luatexbase.add_to_callback('vpack_filter',
\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.
diff --git a/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty b/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty
index f406b6a0d15..fe5c1b4f754 100644
--- a/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty
+++ b/Master/texmf-dist/tex/lualatex/lua-ul/docstrip-luacode.sty
@@ -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@luacode@argscanner#1\directlua{
tex.sprint(\the\catcodetable@string, "\string\\end{docstrip-luacode}")
diff --git a/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua b/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua
index 45518e83542..204f9b400cc 100644
--- a/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua
+++ b/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.lua
@@ -25,6 +25,7 @@ local glue_t = node.id'glue'
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 @@ luatexbase.add_to_callback('pre_append_to_vlist_filter',
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]
diff --git a/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty b/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty
index a36cdec1b44..8c18e3506c4 100644
--- a/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty
+++ b/Master/texmf-dist/tex/lualatex/lua-ul/lua-ul.sty
@@ -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}%