emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] orgmode to markdown


From: flow
Subject: Re: [O] orgmode to markdown
Date: Thu, 04 Jun 2015 15:26:24 +0200

Hi Nicolas!

El jue, 04-06-2015 a las 00:18 +0200, Nicolas Goaziou escribió:
> flow <address@hidden> 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: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]