summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-05 20:21:18 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2017-02-05 20:21:18 +0000
commit83097ccc8c95638eb6d670dc2561f8bde1ab02f7 (patch)
treea3461599d52aa1dbf6e859b7346761cd7bb00727 /usr.bin/mandoc
parent0ff82e18c979903860dc9df0a5e86e4f27499bf9 (diff)
mark up .Ar, .Fa, .Va, .Ft, and .Vt with <var> rather than <i>;
suggested by bentley@ long ago, but needed lots of cleanup first
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/html.c3
-rw-r--r--usr.bin/mandoc/html.h3
-rw-r--r--usr.bin/mandoc/mandoc.css17
-rw-r--r--usr.bin/mandoc/mdoc_html.c20
4 files changed, 25 insertions, 18 deletions
diff --git a/usr.bin/mandoc/html.c b/usr.bin/mandoc/html.c
index 2efbd97e762..3f4e6dc5c9b 100644
--- a/usr.bin/mandoc/html.c
+++ b/usr.bin/mandoc/html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: html.c,v 1.76 2017/02/05 19:29:03 schwarze Exp $ */
+/* $OpenBSD: html.c,v 1.77 2017/02/05 20:21:17 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -74,6 +74,7 @@ static const struct htmldata htmltags[TAG_MAX] = {
{"dt", HTML_NLAROUND},
{"dd", HTML_NLAROUND | HTML_INDENT},
{"pre", HTML_NLALL | HTML_NOINDENT},
+ {"var", 0},
{"cite", 0},
{"b", 0},
{"i", 0},
diff --git a/usr.bin/mandoc/html.h b/usr.bin/mandoc/html.h
index 14c7857c6c0..c2c572fa9a2 100644
--- a/usr.bin/mandoc/html.h
+++ b/usr.bin/mandoc/html.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: html.h,v 1.44 2017/02/05 19:29:03 schwarze Exp $ */
+/* $OpenBSD: html.h,v 1.45 2017/02/05 20:21:17 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -41,6 +41,7 @@ enum htmltag {
TAG_DT,
TAG_DD,
TAG_PRE,
+ TAG_VAR,
TAG_CITE,
TAG_B,
TAG_I,
diff --git a/usr.bin/mandoc/mandoc.css b/usr.bin/mandoc/mandoc.css
index d46621261ad..f3a0fd974a7 100644
--- a/usr.bin/mandoc/mandoc.css
+++ b/usr.bin/mandoc/mandoc.css
@@ -1,4 +1,4 @@
-/* $OpenBSD: mandoc.css,v 1.2 2017/02/05 19:29:03 schwarze Exp $ */
+/* $OpenBSD: mandoc.css,v 1.3 2017/02/05 20:21:17 schwarze Exp $ */
/*
* Standard style sheet for mandoc(1) -Thtml and man.cgi(8).
*/
@@ -134,7 +134,8 @@ table.Nm { }
b.Nm { font-style: normal; }
b.Fl { font-style: normal; }
b.Cm { font-style: normal; }
-i.Ar { font-weight: normal; }
+var.Ar { font-style: italic;
+ font-weight: normal; }
span.Op { }
b.Ic { font-style: normal; }
code.Ev { font-style: normal;
@@ -148,11 +149,15 @@ span.Lb { }
b.In { font-style: normal; }
a.In { }
b.Fd { font-style: normal; }
-i.Ft { font-weight: normal; }
+var.Ft { font-style: italic;
+ font-weight: normal; }
b.Fn { font-style: normal; }
-i.Fa { font-weight: normal; }
-i.Vt { font-weight: normal; }
-i.Va { font-weight: normal; }
+var.Fa { font-style: italic;
+ font-weight: normal; }
+var.Vt { font-style: italic;
+ font-weight: normal; }
+var.Va { font-style: italic;
+ font-weight: normal; }
code.Dv { font-style: normal;
font-weight: normal;
font-family: monospace; }
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index 7b9604a09b3..d68d3294eac 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_html.c,v 1.141 2017/02/05 19:29:03 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.142 2017/02/05 20:21:17 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -647,7 +647,7 @@ mdoc_ns_pre(MDOC_ARGS)
static int
mdoc_ar_pre(MDOC_ARGS)
{
- print_otag(h, TAG_I, "c", "Ar");
+ print_otag(h, TAG_VAR, "c", "Ar");
return 1;
}
@@ -1086,12 +1086,12 @@ mdoc_fa_pre(MDOC_ARGS)
struct tag *t;
if (n->parent->tok != MDOC_Fo) {
- print_otag(h, TAG_I, "c", "Fa");
+ print_otag(h, TAG_VAR, "c", "Fa");
return 1;
}
for (nn = n->child; nn; nn = nn->next) {
- t = print_otag(h, TAG_I, "c", "Fa");
+ t = print_otag(h, TAG_VAR, "c", "Fa");
print_text(h, nn->string);
print_tagq(h, t);
if (nn->next) {
@@ -1170,7 +1170,7 @@ mdoc_vt_pre(MDOC_ARGS)
} else if (n->type == ROFFT_HEAD)
return 0;
- print_otag(h, TAG_I, "c", "Vt");
+ print_otag(h, TAG_VAR, "c", "Vt");
return 1;
}
@@ -1178,7 +1178,7 @@ static int
mdoc_ft_pre(MDOC_ARGS)
{
synopsis_pre(h, n);
- print_otag(h, TAG_I, "c", "Ft");
+ print_otag(h, TAG_VAR, "c", "Ft");
return 1;
}
@@ -1199,7 +1199,7 @@ mdoc_fn_pre(MDOC_ARGS)
ep = strchr(sp, ' ');
if (NULL != ep) {
- t = print_otag(h, TAG_I, "c", "Ft");
+ t = print_otag(h, TAG_VAR, "c", "Ft");
while (ep) {
sz = MIN((int)(ep - sp), BUFSIZ - 1);
@@ -1225,10 +1225,10 @@ mdoc_fn_pre(MDOC_ARGS)
for (n = n->child->next; n; n = n->next) {
if (NODE_SYNPRETTY & n->flags)
- t = print_otag(h, TAG_I, "css?", "Fa",
+ t = print_otag(h, TAG_VAR, "css?", "Fa",
"white-space", "nowrap");
else
- t = print_otag(h, TAG_I, "c", "Fa");
+ t = print_otag(h, TAG_VAR, "c", "Fa");
print_text(h, n->string);
print_tagq(h, t);
if (n->next) {
@@ -1436,7 +1436,7 @@ mdoc_ic_pre(MDOC_ARGS)
static int
mdoc_va_pre(MDOC_ARGS)
{
- print_otag(h, TAG_I, "c", "Va");
+ print_otag(h, TAG_VAR, "c", "Va");
return 1;
}