+/* ARGSUSED */
+static int
+man_alt_pre(MAN_ARGS)
+{
+ const struct man_node *nn;
+ struct tag *t;
+ int i;
+ struct htmlpair tagi, tagb, *tagp;
+
+ PAIR_CLASS_INIT(&tagi, "italic");
+ PAIR_CLASS_INIT(&tagb, "bold");
+
+ for (i = 0, nn = n->child; nn; nn = nn->next, i++) {
+ switch (n->tok) {
+ case (MAN_BI):
+ tagp = i % 2 ? &tagi : &tagb;
+ break;
+ case (MAN_IB):
+ tagp = i % 2 ? &tagb : &tagi;
+ break;
+ case (MAN_RI):
+ tagp = i % 2 ? &tagi : NULL;
+ break;
+ case (MAN_IR):
+ tagp = i % 2 ? NULL : &tagi;
+ break;
+ case (MAN_BR):
+ tagp = i % 2 ? NULL : &tagb;
+ break;
+ case (MAN_RB):
+ tagp = i % 2 ? &tagb : NULL;
+ break;
+ default:
+ abort();
+ /* NOTREACHED */
+ }
+
+ if (i)
+ h->flags |= HTML_NOSPACE;
+
+ if (tagp) {
+ t = print_otag(h, TAG_SPAN, 1, tagp);
+ print_man_node(m, nn, h);
+ print_tagq(h, t);
+ } else
+ print_man_node(m, nn, h);
+ }
+
+ return(0);
+}
+
+
+/* ARGSUSED */
+static int
+man_SB_pre(MAN_ARGS)
+{
+ struct htmlpair tag;
+
+ PAIR_CLASS_INIT(&tag, "small bold");
+ print_otag(h, TAG_SPAN, 1, &tag);
+ return(1);
+}
+
+
+/* ARGSUSED */
+static int
+man_SM_pre(MAN_ARGS)
+{
+ struct htmlpair tag;
+
+ PAIR_CLASS_INIT(&tag, "small");
+ print_otag(h, TAG_SPAN, 1, &tag);
+ return(1);
+}
+
+