aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-20 21:37:56 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-20 21:37:56 +0000
commit0f78e8c2a778806400421a2633736fcd6eb9afd6 (patch)
treef6d7732de8a6d8d6b8a7f570a1ad70d8a858dc93
parent7b51f5de4836454a4e44b7c1e6841342ca59eae7 (diff)
downloadmandoc-0f78e8c2a778806400421a2633736fcd6eb9afd6.tar.gz
mandoc-0f78e8c2a778806400421a2633736fcd6eb9afd6.tar.zst
mandoc-0f78e8c2a778806400421a2633736fcd6eb9afd6.zip
standardize .Rs class attributes
-rw-r--r--mandoc.css33
-rw-r--r--mdoc_html.c42
2 files changed, 35 insertions, 40 deletions
diff --git a/mandoc.css b/mandoc.css
index 28b8b86e..e45dcf19 100644
--- a/mandoc.css
+++ b/mandoc.css
@@ -1,4 +1,4 @@
-/* $Id: mandoc.css,v 1.8 2017/01/20 19:58:07 schwarze Exp $ */
+/* $Id: mandoc.css,v 1.9 2017/01/20 21:37:56 schwarze Exp $ */
/*
* Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
*/
@@ -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 d9d09c46..c43332ae 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.256 2017/01/20 19:58:07 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.257 2017/01/20 21:37:56 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;
}