[latex3-commits] [git/LaTeX3-latex3-latex2e] luatex-test-shift: Normalize shift of null delimiters in LuaTeX tests (703d3d6d)
Marcel Fabian Krüger
tex at 2krueger.de
Wed May 5 15:33:08 CEST 2021
Repository : https://github.com/latex3/latex2e
On branch : luatex-test-shift
Link : https://github.com/latex3/latex2e/commit/703d3d6db149e6200ed60a6c53ff69bd88c28587
>---------------------------------------------------------------
commit 703d3d6db149e6200ed60a6c53ff69bd88c28587
Author: Marcel Fabian Krüger <tex at 2krueger.de>
Date: Wed May 5 15:10:45 2021 +0200
Normalize shift of null delimiters in LuaTeX tests
>---------------------------------------------------------------
703d3d6db149e6200ed60a6c53ff69bd88c28587
build-config.lua | 2 +-
support/fixup_mathaxis.lua | 14 ++++++++++++++
support/regression-test.tex | 3 +++
support/test2e.tex | 1 +
4 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/build-config.lua b/build-config.lua
index 4235aff7..742b9c81 100644
--- a/build-config.lua
+++ b/build-config.lua
@@ -37,7 +37,7 @@ checksuppfiles = checksuppfiles or
"lualibs*.lua",
"fontloader*.lua",
"luaotfload*.lua",
- "luaotfloat.sty"
+ "fixup_mathaxis.lua",
}
stdengine = stdengine or "etex"
tagfiles = tagfiles or {"*.dtx","*.ins","*.tex","README.md"}
diff --git a/support/fixup_mathaxis.lua b/support/fixup_mathaxis.lua
new file mode 100644
index 00000000..97e13ff6
--- /dev/null
+++ b/support/fixup_mathaxis.lua
@@ -0,0 +1,14 @@
+local hlist_id = node.id'hlist'
+local vlist_id = node.id'vlist'
+local function recurse(h)
+ for n, id, sub in node.traverse(h) do
+ if id == hlist_id or id == vlist_id then
+ if sub == 13 and (not n.head) and n.shift == 0 then
+ n.shift = -tex.getmath("axis", "text")
+ end
+ recurse(n.head)
+ end
+ end
+ return true
+end
+luatexbase.add_to_callback('post_mlist_to_hlist_filter', recurse, 'l3build.shift')
diff --git a/support/regression-test.tex b/support/regression-test.tex
index eae274e0..09164b6b 100644
--- a/support/regression-test.tex
+++ b/support/regression-test.tex
@@ -174,6 +174,9 @@
>>
}
\fi
+\ifx\directlua\@undefined\else
+ \directlua{require'fixup_mathaxis'}%
+\fi
\reset at catcodes
%%
%%
diff --git a/support/test2e.tex b/support/test2e.tex
index 72a751ce..0f705457 100644
--- a/support/test2e.tex
+++ b/support/test2e.tex
@@ -277,6 +277,7 @@ else
end
}
%\fi
+\directlua{require'fixup_mathaxis'}%
\fi
% Load the map file early so it does not appear in the log.
More information about the latex3-commits
mailing list.