summaryrefslogtreecommitdiff
path: root/source/luametatex/source/tex/texmlist.c
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2023-06-04 19:46:50 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2023-06-04 19:46:50 +0200
commite9ccab5308d2b6fec79e36c355c03aad4e1e5dec (patch)
tree42a003cdebc84d23b9cc424ba47f11515b196385 /source/luametatex/source/tex/texmlist.c
parente2ffa186c8e622ce9235533b91bb2399dd051672 (diff)
downloadcontext-beta.tar.gz
2023-06-04 16:40:00HEADbeta
Diffstat (limited to 'source/luametatex/source/tex/texmlist.c')
-rw-r--r--source/luametatex/source/tex/texmlist.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/source/luametatex/source/tex/texmlist.c b/source/luametatex/source/tex/texmlist.c
index 13085dca1..0ec6db249 100644
--- a/source/luametatex/source/tex/texmlist.c
+++ b/source/luametatex/source/tex/texmlist.c
@@ -7047,6 +7047,26 @@ static void tex_mlist_to_hlist_finalize_list(mliststate *state)
/*tex Here we have a left, right, middle */
current_type = simple_noad; /*tex Same kind of fields. */
current_subtype = noad_analyzed(current);
+ if (fence_nesting_factor(current) && fence_nesting_factor(current) != scaling_factor) {
+ switch(current_subtype) {
+ case open_noad_subtype:
+ boundarylevel++;
+ boundaryfactor = fence_nesting_factor(current);
+ break;
+ case close_noad_subtype:
+ if (boundarylevel > 0) {
+ boundarylevel--;
+ if (boundarylevel == 0) {
+ boundaryfactor = scaling_factor;
+ } else {
+ boundaryfactor = fence_nesting_factor(current);
+ }
+ } else {
+ boundaryfactor = scaling_factor;
+ }
+ break;
+ }
+ }
packedfence = current;
break;
case style_node:
@@ -7089,7 +7109,9 @@ static void tex_mlist_to_hlist_finalize_list(mliststate *state)
case 3:
if (boundarylevel > 0) {
boundarylevel--;
- if (l == 2) {
+ if (boundarylevel == 0) {
+ boundaryfactor = scaling_factor;
+ } else if (l == 2) {
boundaryfactor = boundary_reserved(current) ? boundary_reserved(current) : scaling_factor;
}
} else {