-mdoc_it_body_pre(MDOC_ARGS, int type)
-{
- struct htmlpair tag;
- struct roffsu su;
-
- switch (type) {
- case (MDOC_Item):
- /* FALLTHROUGH */
- case (MDOC_Ohang):
- /* FALLTHROUGH */
- case (MDOC_Column):
- break;
- default:
- /*
- * XXX: this tricks CSS into aligning the bodies with
- * the right-padding in the head.
- */
- SCALE_HS_INIT(&su, 2);
- bufcat_su(h, "margin-left", &su);
- PAIR_STYLE_INIT(&tag, h);
- print_otag(h, TAG_DIV, 1, &tag);
- break;
- }
-
- return(1);
-}
-
-
-/* ARGSUSED */
-static int
-mdoc_it_head_pre(MDOC_ARGS, int type, struct roffsu *width)
-{
- struct htmlpair tag;
- struct ord *ord;
- char nbuf[BUFSIZ];
-
- switch (type) {
- case (MDOC_Item):
- /* FALLTHROUGH */
- case (MDOC_Ohang):
- print_otag(h, TAG_DIV, 0, NULL);
- break;
- case (MDOC_Column):
- bufcat_su(h, "min-width", width);
- bufcat_style(h, "clear", "none");
- if (n->next && MDOC_HEAD == n->next->type)
- bufcat_style(h, "float", "left");
- PAIR_STYLE_INIT(&tag, h);
- print_otag(h, TAG_DIV, 1, &tag);
- break;
- default:
- bufcat_su(h, "min-width", width);
- SCALE_INVERT(width);
- bufcat_su(h, "margin-left", width);
- if (n->next && n->next->child)
- bufcat_style(h, "float", "left");
-
- /* XXX: buffer if we run into body. */
- SCALE_HS_INIT(width, 1);
- bufcat_su(h, "margin-right", width);
- PAIR_STYLE_INIT(&tag, h);
- print_otag(h, TAG_DIV, 1, &tag);
- break;
- }
-
- switch (type) {
- case (MDOC_Diag):
- PAIR_CLASS_INIT(&tag, "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;
- }
-
- return(1);
-}
-
-
-static int
-mdoc_it_pre(MDOC_ARGS)