Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support <dfn>, <cite> and <i>? #287

Open
rauschma opened this issue Mar 29, 2024 · 2 comments
Open

Support <dfn>, <cite> and <i>? #287

rauschma opened this issue Mar 29, 2024 · 2 comments

Comments

@rauschma
Copy link

rauschma commented Mar 29, 2024

Semantic HTML distinguishes the following kinds of italics:

  1. Emphasizing text (which affects how you’d read it out loud):

    Now <em>that</em> is a good idea.
  2. Definition (introducing new terms):

    A <dfn>bicycle</dfn> is a vehicle with two wheels.
  3. Citing names, book titles, etc.:

    I enjoyed <cite>His dark materials</cite>.
  4. Mentioning foreign-language text:

    She said <i lang="fr">au revoir</i>.

Would it make sense to support some of #​2–#​4 in djot? It would make the generated HTML more semantic. Options include:

{:dfn text:}
::dfn text::

{"cite text"}
""cite text""
@Omikhleia
Copy link

Omikhleia commented Mar 30, 2024

1-3 look like #240 could address them.

4 seems different and already doable, no? (_au revoir_{lang=fr}, with or without explicit span) (EDIT: The <i> in your example doesn't seem very semantic though... Should rather be a <span>, no?)

@rauschma
Copy link
Author

The <i> in your example doesn't seem very semantic though... Should rather be a <span>, no?

This is what the HTML spec says (emphasis in bold is mine):

“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.”

“Terms in languages different from the main text should be annotated with lang attributes [...]”

1-3 look like #240 could address them.

True! Maybe:

!dfn[dfn text]
!cite[cite text]
!i[i text]{lang="fr"}

Or, more verbose:

[dfn text]{!dfn}
[cite text]{!cite}
[i text]{!i lang="fr"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants