diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-20 21:37:56 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-20 21:37:56 +0000 |
commit | 8ffdcc1d064b1e2ad2d427f359ac7fefc67db02b (patch) | |
tree | 2981fdf7c58afa281be04e19cd37eaea0ea8440d | |
parent | daab3cc3621a1b4041c5f13eb824dac81300a964 (diff) | |
download | mandoc-8ffdcc1d064b1e2ad2d427f359ac7fefc67db02b.tar.gz |
standardize .Rs class attributes
-rw-r--r-- | mandoc.css | 31 | ||||
-rw-r--r-- | mdoc_html.c | 40 |
2 files changed, 33 insertions, 38 deletions
@@ -96,6 +96,22 @@ table.Bl-column { } tr.It-column { } td.It-column { } +span.Rs { } +span.RsA { } +i.RsB { font-weight: normal; } +span.RsC { } +span.RsD { } +i.RsI { font-weight: normal; } +i.RsJ { font-weight: normal; } +span.RsN { } +span.RsO { } +span.RsP { } +span.RsQ { } +span.RsR { } +span.RsT { text-decoration: underline; } +a.RsU { } +span.RsV { } + /* Fonts. */ .Li { font-style: normal; @@ -134,20 +150,6 @@ span.lib { } /* Library (Lb). */ b.macro { font-style: normal; } /* Macro-ish thing (Fd). */ b.name { font-style: normal; } /* Name of utility (Nm). */ span.opt { } /* Options (Op, Oo/Oc). */ -span.ref { } /* Citations (Rs). */ -span.ref-auth { } /* Reference author (%A). */ -i.ref-book { font-weight: normal; } /* Reference book (%B). */ -span.ref-city { } /* Reference city (%C). */ -span.ref-date { } /* Reference date (%D). */ -i.ref-issue { font-weight: normal; } /* Reference issuer/publisher (%I). */ -i.ref-jrnl { font-weight: normal; } /* Reference journal (%J). */ -span.ref-num { } /* Reference number (%N). */ -span.ref-opt { } /* Reference optionals (%O). */ -span.ref-page { } /* Reference page (%P). */ -span.ref-corp { } /* Reference corporate/foreign author (%Q). */ -span.ref-rep { } /* Reference report (%R). */ -span.ref-title { text-decoration: underline; } /* Reference title (%T). */ -span.ref-vol { } /* Reference volume (%V). */ span.type { font-style: italic; font-weight: normal; } /* Variable types (Vt). */ span.unix { } /* Unices (Ux, Ox, Nx, Fx, Bx, Bsx, Dx). */ b.utility { font-style: normal; } /* Name of utility (Ex). */ @@ -156,7 +158,6 @@ b.var { font-style: normal; } /* Variables (Rv). */ a.link-ext { } /* Off-site link (Lk). */ a.link-includes { } /* Include-file link (In). */ a.link-mail { } /* Mailto links (Mt). */ -a.link-ref { } /* Reference section links (%Q). */ /* Equation modes. See eqn(7). */ diff --git a/mdoc_html.c b/mdoc_html.c index dd6a63d9..68d3811a 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1487,7 +1487,7 @@ mdoc_rs_pre(MDOC_ARGS) if (n->prev && SEC_SEE_ALSO == n->sec) print_paragraph(h); - print_otag(h, TAG_SPAN, "c", "ref"); + print_otag(h, TAG_SPAN, "c", "Rs"); return 1; } @@ -1532,64 +1532,58 @@ mdoc__x_pre(MDOC_ARGS) switch (n->tok) { case MDOC__A: - cattr = "ref-auth"; + cattr = "RsA"; if (n->prev && MDOC__A == n->prev->tok) if (NULL == n->next || MDOC__A != n->next->tok) print_text(h, "and"); break; case MDOC__B: - cattr = "ref-book"; t = TAG_I; + cattr = "RsB"; break; case MDOC__C: - cattr = "ref-city"; + cattr = "RsC"; break; case MDOC__D: - cattr = "ref-date"; + cattr = "RsD"; break; case MDOC__I: - cattr = "ref-issue"; t = TAG_I; + cattr = "RsI"; break; case MDOC__J: - cattr = "ref-jrnl"; t = TAG_I; + cattr = "RsJ"; break; case MDOC__N: - cattr = "ref-num"; + cattr = "RsN"; break; case MDOC__O: - cattr = "ref-opt"; + cattr = "RsO"; break; case MDOC__P: - cattr = "ref-page"; + cattr = "RsP"; break; case MDOC__Q: - cattr = "ref-corp"; + cattr = "RsQ"; break; case MDOC__R: - cattr = "ref-rep"; + cattr = "RsR"; break; case MDOC__T: - cattr = "ref-title"; + cattr = "RsT"; break; case MDOC__U: - cattr = "link-ref"; - break; + print_otag(h, TAG_A, "ch", "RsU", n->child->string); + return 1; case MDOC__V: - cattr = "ref-vol"; + cattr = "RsV"; break; default: abort(); } - if (MDOC__U != n->tok) { - print_otag(h, t, "c", cattr); - return 1; - } - - print_otag(h, TAG_A, "ch", cattr, n->child->string); - + print_otag(h, t, "c", cattr); return 1; } |