[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Add option to export mixed Setext and ATX-style Markdown hea
From: |
Lee Thompson |
Subject: |
Re: [PATCH] Add option to export mixed Setext and ATX-style Markdown headlines |
Date: |
Sat, 11 May 2024 20:52:08 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Ihor,
> But isn't (setq org-md-headline-style 'setext) do exactly what you describe?
My apologies, I should have included an example. What I'm trying to
achieve is that instead of this: (set to setext)
> One
> ===
>
>
> Two
> ---
>
> 1. Three
>
> 1. Four
Or even something like this: (atx assuming #+options: h:4)
# One
## Two
### Three
#### Four
Setting `org-md-headline-style' to `'mixed' would produce the following:
(again assuming #+options: h:4)
One
===
Two
---
### Three
#### Four
> AFAIK, headlines below level 2 simply cannot be exported with setext
> style, so Org mode already falls back to atx in >2 levels.
Unless I'm doing something wrong or I've been hacking away with older
code I haven't observed this. It may be that I'm getting mixed up in
terminology and what you've demonstrated in your example is indeed
setext falling back to atx, but my understanding is that in your example
the first two headlines are in setext style and the third and
fourth-level headlines have been converted to Markdown lists.
What I am proposing is a style where setext-style underlined headlines
are generated for levels 1 and 2, atx-style repeated hash characters for
levels 3 to 6, and then converted to lists for deeper levels. To
demonstrate:
#+options: toc:nil h:6
* One
** Two
*** Three
**** Four
***** Five
****** Six
******* Seven
******** Eight
Exports to:
One
===
Two
---
### Three
#### Four
##### Five
###### Six
1. Seven
1. Eight
I hope this explains more clearly what I'm trying to achieve, do let me
know if not.