all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug] [new exporter] [markdown] Underline exports as HTML
@ 2013-03-11 22:47 T.F. Torrey
  2013-03-11 23:06 ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: T.F. Torrey @ 2013-03-11 22:47 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

The new markdown exporter (which I didn't think I'd use, but now greatly
appreciate) seems to export underlines as HTML rather than markdown.

In other words, this:

The _second_ thing.

exports as this:

The <span style="text-decoration:underline;">second</span> thing.

I'm not experienced with markdown, but this doesn't look right to me.

Emacs  : GNU Emacs 24.3.50.1 (i686-pc-linux-gnu, GTK+ Version 3.6.0)
 of 2012-12-24 on menkib, modified by Debian
Package: Org-mode version 8.0-pre (release_8.0-pre-36-g0c7e2c @ /home/tftorrey/.emacs.d/elisp/org/lisp/)

All the best,
Terry
-- 
T.F. Torrey

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-11 22:47 [bug] [new exporter] [markdown] Underline exports as HTML T.F. Torrey
@ 2013-03-11 23:06 ` Bastien
  2013-03-12  0:42   ` Rick Frankel
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2013-03-11 23:06 UTC (permalink / raw)
  To: T.F. Torrey; +Cc: emacs-orgmode

Hi Terry,

tftorrey@tftorrey.com (T.F. Torrey) writes:

> I'm not experienced with markdown, but this doesn't look right to
> me.

I fixed this in master.  

AFAIK there is no syntax for underlining in Markdown, so underlined
text in Org will be exported as plain text in Markdown.

See
http://stackoverflow.com/questions/3003476/get-underlined-text-with-markdown

Thanks for reporting this,

-- 
 Bastien

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-11 23:06 ` Bastien
@ 2013-03-12  0:42   ` Rick Frankel
  2013-03-12  7:44     ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Rick Frankel @ 2013-03-12  0:42 UTC (permalink / raw)
  To: emacs-orgmode

On Tue, Mar 12, 2013 at 12:06:55AM +0100, Bastien wrote:
> Hi Terry,
> 
> tftorrey@tftorrey.com (T.F. Torrey) writes:
> 
> > I'm not experienced with markdown, but this doesn't look right to
> > me.
> 

> AFAIK there is no syntax for underlining in Markdown, so underlined
> text in Org will be exported as plain text in Markdown.

I would argue that underlining is a form of emphasis, so the leading
and trailing underscores should be passed through verbatim to
markdown (which, in markdown syntax is an emphasized span).

rick

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-12  0:42   ` Rick Frankel
@ 2013-03-12  7:44     ` Bastien
  2013-03-13 15:17       ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2013-03-12  7:44 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode

Rick Frankel <rick@rickster.com> writes:

> On Tue, Mar 12, 2013 at 12:06:55AM +0100, Bastien wrote:
>> Hi Terry,
>> 
>> tftorrey@tftorrey.com (T.F. Torrey) writes:
>> 
>> > I'm not experienced with markdown, but this doesn't look right to
>> > me.
>> 
>
>> AFAIK there is no syntax for underlining in Markdown, so underlined
>> text in Org will be exported as plain text in Markdown.
>
> I would argue that underlining is a form of emphasis, so the leading
> and trailing underscores should be passed through verbatim to
> markdown (which, in markdown syntax is an emphasized span).

Yes, I see your point -- it's now the case.

Thanks!

-- 
 Bastien

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-12  7:44     ` Bastien
@ 2013-03-13 15:17       ` Nicolas Goaziou
  2013-03-13 15:43         ` Bastien
  2013-03-13 15:54         ` Eric Schulte
  0 siblings, 2 replies; 12+ messages in thread
From: Nicolas Goaziou @ 2013-03-13 15:17 UTC (permalink / raw)
  To: Bastien; +Cc: Rick Frankel, emacs-orgmode

Hello,

Bastien <bzg@altern.org> writes:

> Rick Frankel <rick@rickster.com> writes:
>
>> On Tue, Mar 12, 2013 at 12:06:55AM +0100, Bastien wrote:
>>> Hi Terry,
>>> 
>>> tftorrey@tftorrey.com (T.F. Torrey) writes:
>>> 
>>> > I'm not experienced with markdown, but this doesn't look right to
>>> > me.
>>> 
>>
>>> AFAIK there is no syntax for underlining in Markdown, so underlined
>>> text in Org will be exported as plain text in Markdown.
>>
>> I would argue that underlining is a form of emphasis, so the leading
>> and trailing underscores should be passed through verbatim to
>> markdown (which, in markdown syntax is an emphasized span).
>
> Yes, I see your point -- it's now the case.

AFAIU, one Markdown feature is to accept raw HTML as part of the syntax.
So, what's wrong in writing in HTML code anything that is not directly
supported by Markdown syntax (like tables)?


Regards,

-- 
Nicolas Goaziou

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-13 15:17       ` Nicolas Goaziou
@ 2013-03-13 15:43         ` Bastien
  2013-03-13 15:54         ` Eric Schulte
  1 sibling, 0 replies; 12+ messages in thread
From: Bastien @ 2013-03-13 15:43 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Rick Frankel, emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> AFAIU, one Markdown feature is to accept raw HTML as part of the syntax.
> So, what's wrong in writing in HTML code anything that is not directly
> supported by Markdown syntax (like tables)?

Nothing wrong /per se/ but, I modified `org-html-underline' so that it
uses a specific class "underline" instead of hardcoding the style.

(There is no style="..." parameter left in the HTML export.)

<span class="underline">text</span> does not mean anything for
Markdown.

We could have org-md-underline to export to <u>text</u> but this tag
is deprecated in xhtml and html5.

As for using <span style="text-decoration: underline;">text</span> 
I think it goes against Markdown's philosophy to keep things light.

So on the overall, I find using `org-md-verbatim' a quite good
trade-off.

-- 
 Bastien

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-13 15:17       ` Nicolas Goaziou
  2013-03-13 15:43         ` Bastien
@ 2013-03-13 15:54         ` Eric Schulte
  2013-03-15 12:19           ` Rick Frankel
  1 sibling, 1 reply; 12+ messages in thread
From: Eric Schulte @ 2013-03-13 15:54 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Bastien, Rick Frankel, emacs-orgmode

Nicolas Goaziou <n.goaziou@gmail.com> writes:

> Hello,
>
> Bastien <bzg@altern.org> writes:
>
>> Rick Frankel <rick@rickster.com> writes:
>>
>>> On Tue, Mar 12, 2013 at 12:06:55AM +0100, Bastien wrote:
>>>> Hi Terry,
>>>> 
>>>> tftorrey@tftorrey.com (T.F. Torrey) writes:
>>>> 
>>>> > I'm not experienced with markdown, but this doesn't look right to
>>>> > me.
>>>> 
>>>
>>>> AFAIK there is no syntax for underlining in Markdown, so underlined
>>>> text in Org will be exported as plain text in Markdown.
>>>
>>> I would argue that underlining is a form of emphasis, so the leading
>>> and trailing underscores should be passed through verbatim to
>>> markdown (which, in markdown syntax is an emphasized span).
>>
>> Yes, I see your point -- it's now the case.
>
> AFAIU, one Markdown feature is to accept raw HTML as part of the syntax.
> So, what's wrong in writing in HTML code anything that is not directly
> supported by Markdown syntax (like tables)?
>

Pandoc supports tables in markdown documents, maybe this would be a good
syntax to target, as with pandoc markdown may be further exported to
either HTML or LaTeX.

  http://johnmacfarlane.net/pandoc/README.html#tables

FWIW, it looks like pandoc also supports Org-mode tables.

  http://johnmacfarlane.net/pandoc/README.html#pipe-tables

Just throwing out ideas, I don't personally use the markdown export.

Best,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-13 15:54         ` Eric Schulte
@ 2013-03-15 12:19           ` Rick Frankel
  2013-03-15 17:36             ` Nicolas Goaziou
  0 siblings, 1 reply; 12+ messages in thread
From: Rick Frankel @ 2013-03-15 12:19 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Mar 13, 2013 at 09:54:22AM -0600, Eric Schulte wrote:

> Pandoc supports tables in markdown documents, maybe this would be a good
> syntax to target, as with pandoc markdown may be further exported to
> either HTML or LaTeX.
> 
>   http://johnmacfarlane.net/pandoc/README.html#tables
> 
> FWIW, it looks like pandoc also supports Org-mode tables.
> 
>   http://johnmacfarlane.net/pandoc/README.html#pipe-tables
> 

There is a fairly standard set of extensions to the markdown syntax
called Markdown Extra, based on the extensions made for php:

      http://michelf.ca/projects/php-markdown/extra/

however, a number of markdown processors support it, including 

      multimarkdown: http://fletcherpenney.net/multimarkdown/

A couple of ruby processing libraries:

  http://kramdown.rubyforge.org/syntax.html
  http://maruku.rubyforge.org/maruku.html

Kramdown also support org table format.

and python: http://pythonhosted.org/Markdown/extensions/extra.html

I have used both ruby libraries extensively. It would be nice for the
markdown exporter to allow using the standard markdown extensions
(perhaps with a switch).

rick

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-15 12:19           ` Rick Frankel
@ 2013-03-15 17:36             ` Nicolas Goaziou
  2013-03-15 18:00               ` Rick Frankel
  0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Goaziou @ 2013-03-15 17:36 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

Rick Frankel <rick@rickster.com> writes:

> On Wed, Mar 13, 2013 at 09:54:22AM -0600, Eric Schulte wrote:
>
>> Pandoc supports tables in markdown documents, maybe this would be a good
>> syntax to target, as with pandoc markdown may be further exported to
>> either HTML or LaTeX.
>> 
>>   http://johnmacfarlane.net/pandoc/README.html#tables
>> 
>> FWIW, it looks like pandoc also supports Org-mode tables.
>> 
>>   http://johnmacfarlane.net/pandoc/README.html#pipe-tables
>> 
>
> There is a fairly standard set of extensions to the markdown syntax
> called Markdown Extra, based on the extensions made for php:
>
>       http://michelf.ca/projects/php-markdown/extra/
>
> however, a number of markdown processors support it, including 
>
>       multimarkdown: http://fletcherpenney.net/multimarkdown/
>
> A couple of ruby processing libraries:
>
>   http://kramdown.rubyforge.org/syntax.html
>   http://maruku.rubyforge.org/maruku.html
>
> Kramdown also support org table format.
>
> and python: http://pythonhosted.org/Markdown/extensions/extra.html
>
> I have used both ruby libraries extensively. It would be nice for the
> markdown exporter to allow using the standard markdown extensions
> (perhaps with a switch).

This should happen in a derived back-end. There are a few Markdown
flavours, ox-md.el is only "vanilla" Markdown.


Regards,

-- 
Nicolas Goaziou

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-15 17:36             ` Nicolas Goaziou
@ 2013-03-15 18:00               ` Rick Frankel
  2013-03-15 20:58                 ` Bastien
  0 siblings, 1 reply; 12+ messages in thread
From: Rick Frankel @ 2013-03-15 18:00 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode@gnu.org



On Mar 15, 2013, at 1:36 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:

> Hello,
> 
> Rick Frankel <rick@rickster.com> writes:
> 
>> On Wed, Mar 13, 2013 at 09:54:22AM -0600, Eric Schulte wrote:
>> 
>> I have used both ruby libraries extensively. It would be nice for the
>> markdown exporter to allow using the standard markdown extensions
>> (perhaps with a switch).
> 
> This should happen in a derived back-end. There are a few Markdown
> flavours, ox-md.el is only "vanilla" Markdown.
> 
> 
Agreed. 

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-15 18:00               ` Rick Frankel
@ 2013-03-15 20:58                 ` Bastien
  2013-03-16 19:27                   ` Rick Frankel
  0 siblings, 1 reply; 12+ messages in thread
From: Bastien @ 2013-03-15 20:58 UTC (permalink / raw)
  To: Rick Frankel; +Cc: emacs-orgmode@gnu.org, Nicolas Goaziou

Rick Frankel <rick@rickster.com> writes:

>> This should happen in a derived back-end. There are a few Markdown
>> flavours, ox-md.el is only "vanilla" Markdown.
>
> Agreed. 

Or maybe as a set of filters that people would grab from Worg?

It would be good to educate (power-)users about filters, this
may be a way to do it.

-- 
 Bastien

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

* Re: [bug] [new exporter] [markdown] Underline exports as HTML
  2013-03-15 20:58                 ` Bastien
@ 2013-03-16 19:27                   ` Rick Frankel
  0 siblings, 0 replies; 12+ messages in thread
From: Rick Frankel @ 2013-03-16 19:27 UTC (permalink / raw)
  To: Bastien; +Cc: Nicolas Goaziou, emacs-orgmode@gnu.org

On Fri, Mar 15, 2013 at 09:58:40PM +0100, Bastien wrote:
> Rick Frankel <rick@rickster.com> writes:
> 
> >> This should happen in a derived back-end. There are a few Markdown
> >> flavours, ox-md.el is only "vanilla" Markdown.
> >
> > Agreed. 
> 
> Or maybe as a set of filters that people would grab from Worg?
> 
> It would be good to educate (power-)users about filters, this
> may be a way to do it.

I looked at filters for the slideshow exporters, but my understanding
is that they are passed the converted text output, so, in the case of
table conversion, the column and row separators would already have
been remove by the markdown export function.

rick

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

end of thread, other threads:[~2013-03-16 19:27 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 22:47 [bug] [new exporter] [markdown] Underline exports as HTML T.F. Torrey
2013-03-11 23:06 ` Bastien
2013-03-12  0:42   ` Rick Frankel
2013-03-12  7:44     ` Bastien
2013-03-13 15:17       ` Nicolas Goaziou
2013-03-13 15:43         ` Bastien
2013-03-13 15:54         ` Eric Schulte
2013-03-15 12:19           ` Rick Frankel
2013-03-15 17:36             ` Nicolas Goaziou
2013-03-15 18:00               ` Rick Frankel
2013-03-15 20:58                 ` Bastien
2013-03-16 19:27                   ` Rick Frankel

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.