summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/lualatex
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 /Master/texmf-dist/source/lualatex
parent9a7fbd3067b48f35e170f7ce637050f224b30453 (diff)
lua-ul (25apr21)
git-svn-id: svn://tug.org/texlive/trunk@58988 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/lualatex')
-rw-r--r--Master/texmf-dist/source/lualatex/lua-ul/lua-ul.dtx18
1 files changed, 17 insertions, 1 deletions
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.