From 7ecbcaaf68d152851591dbb5931a6eb15d155019 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Mon, 25 Nov 2019 23:15:50 +0100 Subject: 2019-11-25 17:37:00 --- tex/context/base/mkiv/node-dir.lua | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'tex/context/base/mkiv/node-dir.lua') diff --git a/tex/context/base/mkiv/node-dir.lua b/tex/context/base/mkiv/node-dir.lua index 3f0cba67e..abfd4a8c7 100644 --- a/tex/context/base/mkiv/node-dir.lua +++ b/tex/context/base/mkiv/node-dir.lua @@ -31,13 +31,18 @@ local dirvalues = nodes.dirvalues local lefttoright = dirvalues.lefttoright local righttoleft = dirvalues.righttoleft -local localparnewgraf_code = 0 +local localparcodes = nodes.localparcodes +local hmodepar_code = localparcodes.vmode_par +local vmodepar_code = localparcodes.hmode_par -local function newstack(head,direction) +function nodes.dirstack(head,direction) local stack = { } local top = 0 - if head and getid(head) == localpar_code and getsubtype(head) == localparnewgraf_code then - direction = getdirection(head) + if head and getid(head) == localpar_code then + local s = getsubtype(head) + if s == hmodepar_code or s == vmodepar_code then + direction = getdirection(head) + end end if not direction then direction = lefttoright -- cgit v1.2.3