* orgmode to markdown
@ 2015-05-31 9:36 flow
2015-05-31 22:12 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: flow @ 2015-05-31 9:36 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
Hi
I would like to ask you about how org-mode exports title and headlines
to markdow
org-mode to markdown doesn't export title as md heading one # and
org-mode heading one as heading one but heading two
I think it should work as org-mode to html:
org-mode title to md heading one #
org-mode heading one * to md heading two (##)
What do you think about it?
Best
--
"La tradición de los oprimidos nos enseña que la regla es el «estado de
excepción» en el que vivimos." Walter Benjamin, Tesis de Filosofía de la
historia
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: orgmode to markdown
2015-05-31 9:36 orgmode to markdown flow
@ 2015-05-31 22:12 ` Nicolas Goaziou
2015-06-02 9:34 ` flow
0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2015-05-31 22:12 UTC (permalink / raw)
To: flow; +Cc: emacs-orgmode
Hello,
flow <adolflow@sindominio.net> writes:
> I would like to ask you about how org-mode exports title and headlines
> to markdow
>
> org-mode to markdown doesn't export title as md heading one # and
> org-mode heading one as heading one but heading two
>
> I think it should work as org-mode to html:
>
> org-mode title to md heading one #
> org-mode heading one * to md heading two (##)
>
> What do you think about it?
"ox-md" supports Setext-type headlines, which are limited to 2 levels.
Using a title as the first level leaves only one level for regular
headlines.
Also, it doesn't solve the problem of author, date and email, which do
not appear either in the output. I think they are part of the same
problem: (vanilla) markdown has no real support for meta-data.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: orgmode to markdown
2015-05-31 22:12 ` Nicolas Goaziou
@ 2015-06-02 9:34 ` flow
2015-06-03 22:18 ` Nicolas Goaziou
0 siblings, 1 reply; 6+ messages in thread
From: flow @ 2015-06-02 9:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 1847 bytes --]
Hello Nicolas
El lun, 01-06-2015 a las 00:12 +0200, Nicolas Goaziou escribió:
> Hello,
>
> flow <adolflow@sindominio.net> writes:
>
> > I would like to ask you about how org-mode exports title and headlines
> > to markdow
> >
> > org-mode to markdown doesn't export title as md heading one # and
> > org-mode heading one as heading one but heading two
> >
> > I think it should work as org-mode to html:
> >
> > org-mode title to md heading one #
> > org-mode heading one * to md heading two (##)
> >
> > What do you think about it?
>
> "ox-md" supports Setext-type headlines, which are limited to 2 levels.
> Using a title as the first level leaves only one level for regular
> headlines.
I guessed setext support 6 levels so I don't know why ox-md supprot just
2 levels although my exporter seems to support 3 levels. Why? That's a
good question but not what I wanted to know. What I want -and I would
like to know whay ox-md doesn't- is to export org as org-mode to html
does:
- The title becomes h1, so the org title becomes # or ===, I don't mind
- The * becomes h2, so the org * becomes ## or ----
- The ** becomes h3, so the org ** becomes ### (in case it supports 3
leveles)
- etc.
What do you think about it?
> Also, it doesn't solve the problem of author, date and email, which do
> not appear either in the output. I think they are part of the same
> problem: (vanilla) markdown has no real support for meta-data.
I wasn't considering that it is very interesting though. However in the
scenarios I would like to use widely orgmode to markdown it is not
necessary metadata.
>
> Regards,
Best
--
"La tradición de los oprimidos nos enseña que la regla es el «estado de
excepción» en el que vivimos." Walter Benjamin, Tesis de Filosofía de la
historia
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: orgmode to markdown
2015-06-02 9:34 ` flow
@ 2015-06-03 22:18 ` Nicolas Goaziou
2015-06-04 9:54 ` Rasmus
2015-06-04 13:26 ` flow
0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2015-06-03 22:18 UTC (permalink / raw)
To: flow; +Cc: emacs-orgmode
flow <adolflow@sindominio.net> writes:
> I guessed setext support 6 levels so I don't know why ox-md supprot just
> 2 levels although my exporter seems to support 3 levels. Why?
Setext style supports only 2 levels. Atx supports 6 of them, per
<http://daringfireball.net/projects/markdown/syntax#header>.
> That's a good question but not what I wanted to know. What I want -and
> I would like to know whay ox-md doesn't- is to export org as org-mode
> to html does:
>
> - The title becomes h1, so the org title becomes # or ===, I don't mind
> - The * becomes h2, so the org * becomes ## or ----
> - The ** becomes h3, so the org ** becomes ### (in case it supports 3
> leveles)
> - etc.
>
> What do you think about it?
I think it is very opinionated and may be undesirable in the general
case. It means that every headline would be numbered 1.xxx.
Also some Markdown extensions provide meta-data keywords to specify,
e.g., the title of the document. This behaviour would just get in the
way for them since headlines would get one too many level with no real
reason.
There are several workarounds:
- you can define filters to add another level to each headline and
title at the beginning of the document.
- you can use a {{{title}}} macro, e.g.,
@@md:#@@ {{{title}}}
and shift other headlines
If this is common enough, we could also add a defcustom to toggle this
behaviour (yet, off by default). But is it common enough?
Regards,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: orgmode to markdown
2015-06-03 22:18 ` Nicolas Goaziou
@ 2015-06-04 9:54 ` Rasmus
2015-06-04 13:26 ` flow
1 sibling, 0 replies; 6+ messages in thread
From: Rasmus @ 2015-06-04 9:54 UTC (permalink / raw)
To: emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> If this is common enough, we could also add a defcustom to toggle this
> behaviour (yet, off by default). But is it common enough?
I never use the md exporter, and I'd never use md for a complex documents.
So to me it would be wasted effort.
That being said, I guess it would be not too much work. Essentially it'd
be a mapping of a keyword-type (title, subtitle, author, date...) to a
format string, I guess.
Rasmus
--
Hooray!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: orgmode to markdown
2015-06-03 22:18 ` Nicolas Goaziou
2015-06-04 9:54 ` Rasmus
@ 2015-06-04 13:26 ` flow
1 sibling, 0 replies; 6+ messages in thread
From: flow @ 2015-06-04 13:26 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2860 bytes --]
Hi Nicolas!
El jue, 04-06-2015 a las 00:18 +0200, Nicolas Goaziou escribió:
> flow <adolflow@sindominio.net> writes:
>
> > I guessed setext support 6 levels so I don't know why ox-md supprot just
> > 2 levels although my exporter seems to support 3 levels. Why?
>
> Setext style supports only 2 levels. Atx supports 6 of them, per
> <http://daringfireball.net/projects/markdown/syntax#header>.
I'm sorry I mixed between setext and atx :)
> > That's a good question but not what I wanted to know. What I want -and
> > I would like to know whay ox-md doesn't- is to export org as org-mode
> > to html does:
> >
> > - The title becomes h1, so the org title becomes # or ===, I don't mind
> > - The * becomes h2, so the org * becomes ## or ----
> > - The ** becomes h3, so the org ** becomes ### (in case it supports 3
> > leveles)
> > - etc.
> >
> > What do you think about it?
>
> I think it is very opinionated and may be undesirable in the general
> case. It means that every headline would be numbered 1.xxx.
I wasn't talking about numbering headings but creating headings :)
> Also some Markdown extensions provide meta-data keywords to specify,
> e.g., the title of the document. This behaviour would just get in the
> way for them since headlines would get one too many level with no real
> reason.
>
> There are several workarounds:
>
> - you can define filters to add another level to each headline and
> title at the beginning of the document.
>
> - you can use a {{{title}}} macro, e.g.,
>
> @@md:#@@ {{{title}}}
>
> and shift other headlines
>
> If this is common enough, we could also add a defcustom to toggle this
> behaviour (yet, off by default). But is it common enough?
That's a good question and also why ox.md works in this way.
I probably didn't explain it properly and it is because I'm used to
write #+title header in org-mode. #+title it is exported to html as h1
what is great.
I think that's a common header when you write org-mode, isn't it?
So I guess if orgmode to html exports title-orgmode as h1-html, I think
it could be exported also to md because it alrealdy exists.
The exporter then could look for both title options:
1. the org-mode header and if there is a #+title, it could be h1 and the
others org-mode headings (* ** ***, etc) md headings (## ### ###).
2. or {{{title}}
If none of them are included, it should keep the behaviour it already
has. If not, it could translate it to markdown heading1
If you think this is an uncommon use of org-mode, then I should use you
suggestion or make something different ;)
Best!
>
> Regards,
--
"La tradición de los oprimidos nos enseña que la regla es el «estado de
excepción» en el que vivimos." Walter Benjamin, Tesis de Filosofía de la
historia
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-06-04 13:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-31 9:36 orgmode to markdown flow
2015-05-31 22:12 ` Nicolas Goaziou
2015-06-02 9:34 ` flow
2015-06-03 22:18 ` Nicolas Goaziou
2015-06-04 9:54 ` Rasmus
2015-06-04 13:26 ` flow
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).