version 1.79, 2019/04/02 15:53:02 |
version 1.82, 2019/04/03 11:46:09 |
Line 172 pnode_printciterefentry(struct format *p, struct pnode |
|
Line 172 pnode_printciterefentry(struct format *p, struct pnode |
|
macro_addarg(p, "1", ARG_SPACE); |
macro_addarg(p, "1", ARG_SPACE); |
else |
else |
macro_addnode(p, manvol, ARG_SPACE | ARG_SINGLE); |
macro_addnode(p, manvol, ARG_SPACE | ARG_SINGLE); |
macro_close(p); |
|
pnode_unlinksub(pn); |
pnode_unlinksub(pn); |
} |
} |
|
|
Line 438 pnode_printauthor(struct format *f, struct pnode *n) |
|
Line 437 pnode_printauthor(struct format *f, struct pnode *n) |
|
} |
} |
|
|
/* |
/* |
|
* If there is an email address, |
|
* print it on the same macro line. |
|
*/ |
|
|
|
if ((nc = pnode_findfirst(n, NODE_EMAIL)) != NULL) { |
|
pnode_print(f, nc); |
|
pnode_unlink(nc); |
|
} |
|
|
|
/* |
* If there are still unprinted children, end the scope |
* If there are still unprinted children, end the scope |
* with a comma. Otherwise, leave the scope open in case |
* with a comma. Otherwise, leave the scope open in case |
* a text node follows that starts with closing punctuation. |
* a text node follows that starts with closing punctuation. |
Line 531 pnode_printrow(struct format *p, struct pnode *pn) |
|
Line 540 pnode_printrow(struct format *p, struct pnode *pn) |
|
} |
} |
|
|
static void |
static void |
pnode_printtable(struct format *p, struct pnode *pn) |
pnode_printtgroup1(struct format *p, struct pnode *n) |
{ |
{ |
struct pnode *pp; |
struct pnode *nc; |
|
|
pnode_printtitle(p, pn); |
macro_line(p, "Bl -bullet -compact"); |
|
while ((nc = pnode_findfirst(n, NODE_ENTRY)) != NULL) { |
|
macro_line(p, "It"); |
|
pnode_print(p, nc); |
|
pnode_unlink(nc); |
|
} |
|
macro_line(p, "El"); |
|
pnode_unlinksub(n); |
|
} |
|
|
|
static void |
|
pnode_printtgroup(struct format *p, struct pnode *n) |
|
{ |
|
struct pnode *nc; |
|
|
|
switch (atoi(pnode_getattr_raw(n, ATTRKEY_COLS, "0"))) { |
|
case 1: |
|
pnode_printtgroup1(p, n); |
|
return; |
|
default: |
|
break; |
|
} |
|
|
macro_line(p, "Bl -ohang"); |
macro_line(p, "Bl -ohang"); |
while ((pp = pnode_findfirst(pn, NODE_ROW)) != NULL) { |
while ((nc = pnode_findfirst(n, NODE_ROW)) != NULL) { |
macro_line(p, "It Table Row"); |
macro_line(p, "It Table Row"); |
pnode_printrow(p, pp); |
pnode_printrow(p, nc); |
} |
} |
macro_line(p, "El"); |
macro_line(p, "El"); |
pnode_unlinksub(pn); |
pnode_unlinksub(n); |
} |
} |
|
|
static void |
static void |
Line 773 pnode_print(struct format *p, struct pnode *pn) |
|
Line 804 pnode_print(struct format *p, struct pnode *pn) |
|
case NODE_STRUCTNAME: |
case NODE_STRUCTNAME: |
macro_open(p, "Vt"); |
macro_open(p, "Vt"); |
break; |
break; |
case NODE_TABLE: |
|
case NODE_INFORMALTABLE: |
|
pnode_printtable(p, pn); |
|
break; |
|
case NODE_TEXT: |
case NODE_TEXT: |
if (pn->bsz == 0) { |
if (pn->bsz == 0) { |
assert(pn->real != pn->b); |
assert(pn->real != pn->b); |
Line 820 pnode_print(struct format *p, struct pnode *pn) |
|
Line 847 pnode_print(struct format *p, struct pnode *pn) |
|
putchar('e'); |
putchar('e'); |
} |
} |
break; |
break; |
|
case NODE_TGROUP: |
|
pnode_printtgroup(p, pn); |
|
break; |
case NODE_TITLE: |
case NODE_TITLE: |
if (pn->parent->node == NODE_BOOKINFO) |
if (pn->parent->node == NODE_BOOKINFO) { |
macro_open(p, "Nd"); |
macro_open(p, "Nd"); |
|
break; |
|
} |
|
pnode_printpara(p, pn); |
|
macro_nodeline(p, "Sy", pn, 0); |
|
pnode_unlinksub(pn); |
break; |
break; |
case NODE_TYPE: |
case NODE_TYPE: |
macro_open(p, "Vt"); |
macro_open(p, "Vt"); |