Org-mode mailing list
 help / color / mirror / Atom feed
* <span class="underline"> should be <em>
@ 2020-10-16 17:10 Pankaj Jangid
  2020-10-16 22:46 ` Tim Cross
  0 siblings, 1 reply; 2+ messages in thread
From: Pankaj Jangid @ 2020-10-16 17:10 UTC (permalink / raw)
  To: Emacs Org Mode

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: <span class="underline"> should be <em>
  2020-10-16 17:10 <span class="underline"> should be <em> Pankaj Jangid
@ 2020-10-16 22:46 ` Tim Cross
  0 siblings, 0 replies; 2+ messages in thread
From: Tim Cross @ 2020-10-16 22:46 UTC (permalink / raw)
  To: emacs-orgmode


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-16 22:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-16 17:10 <span class="underline"> should be <em> Pankaj Jangid
2020-10-16 22:46 ` Tim Cross

Org-mode mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://orgmode.org/list/0 list/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 list list/ https://orgmode.org/list \
		emacs-orgmode@gnu.org
	public-inbox-index list

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.emacs.orgmode
	nntp://news.gmane.io/gmane.emacs.orgmode


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git