Alternate voice or mood (<i> tag in HTML5)

Markdown does not contain syntax for the <i> tag. Although this was a presentational tag in older versions of HTML, it has been redefined to have semantic meaning in HTML5. From the spec:

The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts.

I read through the recently published draft specification for Markua (the replacement for Leanpub Flavored Markdown). It contains some thought provoking points and ideas, some of which could be considered for CommonMark. The draft spec for Markua adds Markdown-style syntax for alternative voice. It does this by redefining the use of the underscore surrounding text for <i>, while keeping asterisks for emphasis (<em>).

This: This is some _italicized with an old-school but now semantic i tag_ text.

Produces: <p>This is some <i>italicized with an old-school but now semantic i tag</i> text.</p>

This breaks compatibility with Markdown, but is understandable. This may not be the best approach for CommonMark, given that authors of older Markdown documents may have intended the underscores to mean emphasis rather than alternative voice. I thought it would be worth looking at, at least.

Since alternative voice is quite commonly used in prose, Markdown-style syntax of some kind would be beneficial as a CommonMark extension. Besides Markua, I don’t know of any flavours that have specified syntax for it.

Not sure if this should be implemented as an extension or not.
Ideally the AST could save the marker so the renderer can opt to use <i>.

It might be better use a separate marker (rather than an underscore) for alternative voice. The problem with using an underscore as the marker is that legacy Markdown documents may intend for the underscore to mean emphasis.

The intention of CommonMark is to be as true to the original Markdown spec as possible, whereas Markua intentionally breaks backward compatibility in places (in order to improve the syntax). Different project goals.

Perhaps a forward slash could be used as the start and end marker, so long as it is preceded by a space or is at the start of a new line? Visually, a forward slash is slanted like italics.

Valid: I am a member of the species /homo sapiens/.

Invalid: No space, so this will render the forward slash normally: homo/sapiens/.

Modified examples from the HTML5 spec page:

The /Felis silvestris catus/ is cute.

The term /prose content/ is defined above.

There is a certain /je ne sais quoi/ in the air.
<p>The <i>Felis silvestris catus</i> is cute.</p>
<p>The term <i>prose content</i> is defined above.</p>
<p>There is a certain <i>je ne sais quoi</i> in the air.</p>

Dream sequence example:

Raymond tried to sleep.

/The ship sailed away on Thursday/, he
dreamt. /The ship had many people aboard, including a beautiful
princess called Carey. He watched her, day-in, day-out, hoping she
would notice him, but she never did./

/Finally one night he picked up the courage to speak with
her—/

Raymond woke with a start as the fire alarm rang out.
<p>Raymond tried to sleep.</p>
<p><i>The ship sailed away on Thursday</i>, he
dreamt. <i>The ship had many people aboard, including a beautiful
princess called Carey. He watched her, day-in, day-out, hoping she
would notice him, but she never did.</i></p>
<p><i>Finally one night he picked up the courage to speak with
her—</i></p>
<p>Raymond woke with a start as the fire alarm rang out.</p>
2 Likes

“/” vs “\” isn’t exactly wonderful.

  • _i_ and *em*
  • *i* and _em_
  • /i/ or //i//
  • no support

0 voters

I do like the / (or, if necessary to avoid undesirable results since / is more commonly used in actual text than * or _, //) suggestion, and strongly support a proposal to add a meaningful shorthand for <i>.

Yeah, I like the / for italics. FYI, this is also how Creole does italics. Their thinking was that it was the most intuitive character for italics given the forward lean.

@dpk makes a good point; / is far more common in prose than * or _. Furthermore, there are cases where a forward slash is surrounded by spaces, such as in catalog formats (e.g. Gone with the Wind / by Margaret Mitchell ), so we probably can’t count on spaces on either side of the / for formulating the syntax rules for starting/ending a span of alternative voice.

There’s also the problem of a single forward slash potentially conflicting with the content block syntax which uses a / at the start of a new line to identify a file path to transclude in the document. We might be able to work around this by identifying a delimiter forward slash somewhere on the line.

It wouldn’t be out of place to use a double character pair in CommonMark (strong emphasis, for example). Using a double forward slash seems to be most natural here. Here’s what the examples above look like using a double forward slash to mark up alternative voice/mood.

The //Felis silvestris catus// is cute.

The term //prose content// is defined above.

There is a certain //je ne sais quoi// in the air.

Raymond tried to sleep.

//The ship sailed away on Thursday//, he dreamt. //The ship had many people aboard, including a beautiful princess called Carey. He watched her, day-in, day-out, hoping she would notice him, but she never did.//

//Finally one night he picked up the courage to speak with her—//

Raymond woke with a start as the fire alarm rang out.

It’s not quite as elegant as using a single forward slash, but it’s still a presentable way of marking up alternative voice/mood.

1 Like