From: Tim Cross <theophilusx@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: <span class="underline"> should be <em>
Date: Sat, 17 Oct 2020 09:46:08 +1100 [thread overview]
Message-ID: <87wnzpyekv.fsf@gmail.com> (raw)
In-Reply-To: <m28sc66qr7.fsf@codeisgreat.org>
This one is a little 'tricky'. The <em> tag means emphasis and is not
the same as underline (browsers are free to 'interpret' emphasis as
anything which will emphasise the text from surrounding text, which
could be bold, italic, underline or a combination. If we changed
underline to <em> tags, I'm sure we would get a post about text not
being underlined in html export.
There use to be a <u> tag for underline, but that has been replaced by
'unarticulated text' and it is recommended to now use CSS text
decoration properties to do underline.
On the other hand, I don't think Emacs' EWW/shr support the CSS text
decoration properties, so I'm not sure if you will get underlined text
when viewing org HTML in Emacs EWW.
The real challenge here is in how to map org mode specific attributes
such as italic, underline and bold to HTML's semantic tags of <em>,
<strong> etc. In hindsight, it probably would have been better for org
to have used sematnic markup types, leaving it to each exporter to
interpret how the different semantic types map to character types.
One solution could be to make all of them CSS classes, have a default
CSS for italic, bold, underline, code etc. Users could then add their
own CSS to render each as they preferred when not happy with the defaults.
Pankaj Jangid <pankaj@codeisgreat.org> writes:
> For this org mode text:
>
> #+begin_src org
> - This text is /emphasized/
> - This text is *in bold*
> - This text is _underlined_
> - This text uses =a teletype font=
> #+end_src
>
> the follow is the HTML output:
>
> #+begin_src
> <ul class="org-ul">
> <li>This text is <i>emphasized</i></li>
> <li>This text is <b>in bold</b></li>
> <li>This text is <span class="underline">underlined</span></li>
> <li>This text uses <code>a teletype font</code></li>
> </ul>
> #+end_src
>
> In case of /italics/, CSS class is used whereas for other formatting
> cases native HTML elements are used. Shouldn't the _underline_ be
> converted into <em> tags?
>
> Regards
--
Tim Cross
prev parent reply other threads:[~2020-10-16 22:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-16 17:10 <span class="underline"> should be <em> Pankaj Jangid
2020-10-16 22:46 ` Tim Cross [this message]
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wnzpyekv.fsf@gmail.com \
--to=theophilusx@gmail.com \
--cc=emacs-orgmode@gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).