From ed34a8580df21614f2622dd34ffa3176f80d5c46 Mon Sep 17 00:00:00 2001 From: Ali Gholami Rudi Date: Fri, 10 Feb 2017 14:19:10 +0330 Subject: [PATCH] eqn: do not include gaps in postfix commands like bar --- eqn.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/eqn.c b/eqn.c index 5ebd0ea..41eab18 100644 --- a/eqn.c +++ b/eqn.c @@ -315,7 +315,7 @@ static struct box *eqn_left(int flg, struct box *pre, int sz0, char *fn0) char left[NMLEN] = "", right[NMLEN] = ""; char fn[FNLEN] = ""; int sz = sz0; - int subsz = nregmk(); + int subsz; int dx = 0, dy = 0; int style = EQN_TSMASK & flg; if (fn0) @@ -323,8 +323,11 @@ static struct box *eqn_left(int flg, struct box *pre, int sz0, char *fn0) while (!eqn_commands()) ; box = box_alloc(sz, pre ? pre->tcur : 0, style); - while (!eqn_gaps(box, sz)) - ; + if (!eqn_gaps(box, sz)) { + while (!eqn_gaps(box, sz)) + ; + return box; + } while (1) { if (!tok_jmp("fat")) { } else if (!tok_jmp("roman")) { @@ -419,6 +422,7 @@ static struct box *eqn_left(int flg, struct box *pre, int sz0, char *fn0) break; } } + subsz = nregmk(); if (!tok_jmp("sub")) { sizesub(subsz, sz0, ts_sup(style), style); sub_sub = eqn_left(ts_sup(style) | EQN_SUB, NULL, subsz, fn0); -- 2.11.4.GIT