version 1.16, 2017/08/23 20:49:15 |
version 1.19, 2018/12/13 05:23:38 |
|
|
#include <stdlib.h> |
#include <stdlib.h> |
#include <string.h> |
#include <string.h> |
|
|
#include "mandoc.h" |
#include "eqn.h" |
#include "out.h" |
#include "out.h" |
#include "term.h" |
#include "term.h" |
|
|
Line 96 eqn_box(struct termp *p, const struct eqn_box *bp) |
|
Line 96 eqn_box(struct termp *p, const struct eqn_box *bp) |
|
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
term_word(p, bp->text); |
term_word(p, bp->text); |
if ((cp = strchr(bp->text, '\0')) > bp->text && |
if ((cp = strchr(bp->text, '\0')) > bp->text && |
((cp[-1] == '-' && bp->prev == NULL) || |
(strchr("\"'([{", cp[-1]) != NULL || |
strchr("\"'([{", cp[-1]) != NULL)) |
(bp->prev == NULL && (cp[-1] == '-' || |
|
(cp >= bp->text + 5 && |
|
strcmp(cp - 5, "\\[mi]") == 0))))) |
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
} |
} |
|
|
/* Special box types. */ |
/* Special box types. */ |
|
|
if (bp->pos == EQNPOS_SQRT) { |
if (bp->pos == EQNPOS_SQRT) { |
term_word(p, "sqrt"); |
term_word(p, "\\(sr"); |
if (bp->first != NULL) { |
if (bp->first != NULL) { |
p->flags |= TERMP_NOSPACE; |
p->flags |= TERMP_NOSPACE; |
eqn_box(p, bp->first); |
eqn_box(p, bp->first); |