From: Guy Harris <guy@alum.mit.edu>
To: tech@mdocml.bsd.lv
Subject: Is there any reason not to use <EM> for items emphasized with .Em?
Date: Thu, 20 Dec 2012 16:30:13 -0800 [thread overview]
Message-ID: <A4DA9DCE-6971-45E6-A905-DD5DD95EF0AF@alum.mit.edu> (raw)
[-- Attachment #1: Type: text/plain, Size: 830 bytes --]
.Em is documented in the groff_mdoc man page as
Emphasis Macro
Text may be stressed or emphasized with the `.Em' macro. The usual font
for emphasis is italic.
That sounds like the <EM> HTML tag - the HTML 4.01 spec says
EM:
Indicates emphasis.
...
The presentation of phrase elements depends on the user agent. Generally, visual user agents present EM text in italics and STRONG text in bold font. Speech synthesizer user agents may change the synthesis parameters, such as volume, pitch and rate accordingly.
Is there any reason not to use that tag for text emphasized with .Em?
If not, see the attached patch.
(BTW, is there anonymous CVS access to the source repository? I got the top-of-trunk source with a pile of curl calls from the cvsweb site, but that's kind of a pain.)
[-- Attachment #2: patch --]
[-- Type: application/octet-stream, Size: 2733 bytes --]
--- example.style.css.dist 2012-12-18 19:40:25.000000000 -0800
+++ example.style.css 2012-12-20 16:25:33.000000000 -0800
@@ -30,7 +30,7 @@
div.mandoc i { } /* Italic: BI, IB, I, (implicit). */
div.mandoc b { } /* Bold: SB, BI, IB, BR, RB, B, (implicit). */
div.mandoc small { } /* Small: SB, SM. */
-div.mandoc .emph { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */
+div.mandoc em { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */
div.mandoc .symb { font-style: normal; font-weight: bold; } /* Symbolic: Sy, Ms, Bf -symbolic. */
div.mandoc .lit { font-style: normal; font-weight: normal; font-family: monospace; } /* Literal: Dl, Li, Ql, Bf -literal, Bl -literal, Bl -unfilled. */
div.mandoc i.addr { font-weight: normal; } /* Address (Ad). */
--- html.c.dist 2012-12-18 19:40:27.000000000 -0800
+++ html.c 2012-12-20 14:40:51.000000000 -0800
@@ -75,6 +75,7 @@
{"i", 0 }, /* TAG_I */
{"code", 0 }, /* TAG_CODE */
{"small", 0 }, /* TAG_SMALL */
+ {"em", 0 }, /* TAG_EM */
};
static const char *const htmlattrs[ATTR_MAX] = {
--- html.h.dist 2012-12-18 19:40:27.000000000 -0800
+++ html.h 2012-12-20 14:41:05.000000000 -0800
@@ -50,6 +50,7 @@
TAG_I,
TAG_CODE,
TAG_SMALL,
+ TAG_EM,
TAG_MAX
};
--- mdoc_html.c.dist 2012-12-18 19:40:51.000000000 -0800
+++ mdoc_html.c 2012-12-20 16:26:52.000000000 -0800
@@ -1112,10 +1112,7 @@
static int
mdoc_em_pre(MDOC_ARGS)
{
- struct htmlpair tag;
-
- PAIR_CLASS_INIT(&tag, "emph");
- print_otag(h, TAG_SPAN, 1, &tag);
+ print_otag(h, TAG_EM, 0, NULL);
return(1);
}
@@ -1892,9 +1889,7 @@
else if (MDOC_BODY != n->type)
return(1);
- if (FONT_Em == n->norm->Bf.font)
- PAIR_CLASS_INIT(&tag[0], "emph");
- else if (FONT_Sy == n->norm->Bf.font)
+ if (FONT_Sy == n->norm->Bf.font)
PAIR_CLASS_INIT(&tag[0], "symb");
else if (FONT_Li == n->norm->Bf.font)
PAIR_CLASS_INIT(&tag[0], "lit");
@@ -1912,6 +1907,10 @@
bufcat_su(h, "margin-left", &su);
PAIR_STYLE_INIT(&tag[1], h);
print_otag(h, TAG_DIV, 2, tag);
+ if (FONT_Em == n->norm->Bf.font) {
+ /* Tag this with <EM>. */
+ print_otag(h, TAG_EM, 0, NULL);
+ }
return(1);
}
--- style.css.dist 2012-12-18 19:41:01.000000000 -0800
+++ style.css 2012-12-20 16:24:17.000000000 -0800
@@ -34,7 +34,7 @@
/* General font modes. */
i { } /* Italic: BI, IB, I, (implicit). */
-.emph { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */
+em { font-style: italic; font-weight: normal; } /* Emphasis: Em, Bl -emphasis. */
b { } /* Bold: SB, BI, IB, BR, RB, B, (implicit). */
.symb { font-style: normal; font-weight: bold; } /* Symbolic: Sy, Ms, Bf -symbolic. */
small { } /* Small: SB, SM. */
next reply other threads:[~2012-12-21 0:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-21 0:30 Guy Harris [this message]
2014-08-12 22:44 Guy Harris
2014-08-13 1:15 ` Ingo Schwarze
2014-08-13 2:06 ` Anthony J. Bentley
2014-08-13 14:51 ` Ingo Schwarze
2014-08-13 15:17 ` Anthony J. Bentley
2014-08-13 17:49 ` Ingo Schwarze
2014-08-13 1:44 ` Joerg Sonnenberger
2014-08-13 15:30 ` Ingo Schwarze
2014-08-13 17:20 ` Ingo Schwarze
2014-08-13 18:53 ` Guy Harris
2014-08-13 23:24 ` Kristaps Dzonsons
2014-08-14 0:46 ` Ingo Schwarze
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A4DA9DCE-6971-45E6-A905-DD5DD95EF0AF@alum.mit.edu \
--to=guy@alum.mit.edu \
--cc=tech@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).