- switch (t) {
- case (MDOC_Item):
- /* FALLTHROUGH */
- case (MDOC_Ohang):
- print_otag(h, TAG_DIV, 0, NULL);
- break;
- case (MDOC_Column):
- buffmt("min-width: %dem;", w);
- bufcat("clear: none;");
- if (n->next && MDOC_HEAD == n->next->type)
- bufcat("float: left;");
- tag.key = ATTR_STYLE;
- tag.val = buf;
- print_otag(h, TAG_DIV, 1, &tag);
- break;
- default:
- buffmt("margin-left: -%dem; min-width: %dem;",
- w, w ? w - 1 : 0);
- bufcat("clear: left;");
- if (n->next && n->next->child)
- bufcat("float: left;");
- bufcat("padding-right: 1em;");
- tag.key = ATTR_STYLE;
- tag.val = buf;
- print_otag(h, TAG_DIV, 1, &tag);
- break;
- }
-
- switch (t) {
- case (MDOC_Diag):
- tag.key = ATTR_CLASS;
- tag.val = "diag";
- print_otag(h, TAG_SPAN, 1, &tag);
- break;
- case (MDOC_Enum):
- ord = SLIST_FIRST(&h->ords);
- assert(ord);
- nbuf[BUFSIZ - 1] = 0;
- (void)snprintf(nbuf, BUFSIZ - 1, "%d.", ord->pos++);
- print_text(h, nbuf);
- return(0);
- case (MDOC_Dash):
- print_text(h, "\\(en");
- return(0);
- case (MDOC_Hyphen):
- print_text(h, "\\(hy");
- return(0);
- case (MDOC_Bullet):
- print_text(h, "\\(bu");
- return(0);
- default:
- break;
- }
+ SCALE_VS_INIT(&su, 0);
+ bufcat_su(h, "margin-top", &su);
+ bufcat_su(h, "margin-bottom", &su);
+ PAIR_STYLE_INIT(&tag[0], h);