emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to get "clean" markdown export
@ 2017-03-09 17:44 stefano franchi
  0 siblings, 0 replies; 5+ messages in thread
From: stefano franchi @ 2017-03-09 17:44 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2241 bytes --]

Hi all,

I 'm just beginning with org-mode and I' trying to understand how to get a
clean export to markdown. By "clean" I mean: no extraneous html code should
be inserted or interspersed with the markdown code. Using the
installation-provided exporter, I get very different results, with a lot of
extraneous stuff being exported. (See example below)
Apologies if this question has been asked before. Searching the manual and
the list's archives did not provided any enlightenment.

Cheers,

Stefano

P.S. I am on emacs 25  and org-mode 9.0.2 on archlinux, if that matters:


Example: this simple file from a tutorial:

------------------------------
*Welcome to org-mode


Welcome, and thanks for trying out Org-mode. Making outlines in org is very
simple. It is just text! Just start typing.

* This is a headline, it starts with one or more stars

A heading has one star, a sub-heading two, etc.

* Working with lists
** Moving around in our outline
*** A level three headline
** Moving around headlines
------------------------------


Produced this file when exported to markdown:


-------------------------------
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#org1736896">1. This is a headline, it starts with one or more
stars</a></li>
<li><a href="#org26c7f46">2. Working with lists</a>
<ul>
<li><a href="#orgb68e966">2.1. Moving around in our outline</a>
<ul>
<li><a href="#orgc435d16">2.1.1. A level three headline</a></li>
</ul>
</li>
<li><a href="#org292de22">2.2. Moving around headlines</a></li>
</ul>
</li>
</ul>
</div>
</div>
\*Welcome to org-mode

Welcome, and thanks for trying out Org-mode. Making outlines in org is very
simple. It is just text! Just start typing.


<a id="org1736896"></a>

# This is a headline, it starts with one or more stars

A heading has one star, a sub-heading two, etc.


<a id="org26c7f46"></a>

# Working with lists


<a id="orgb68e966"></a>

## Moving around in our outline


<a id="orgc435d16"></a>

### A level three headline


<a id="org292de22"></a>

## Moving around headlines


-- 
__________________________________________________
Stefano Franchi

stefano.franchi@gmail.com <stefano@tamu.edu>
http://stefano.cleinias.org

[-- Attachment #2: Type: text/html, Size: 3315 bytes --]

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

* Re: How to get "clean" markdown export
       [not found] <dab02a661af34644b46246817e633d96@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
@ 2017-03-09 18:28 ` Eric S Fraga
  2017-03-09 18:30 ` Eric S Fraga
  1 sibling, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2017-03-09 18:28 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 471 bytes --]

On Thursday,  9 Mar 2017 at 17:44, stefano franchi wrote:
> Hi all,
>
> I 'm just beginning with org-mode and I' trying to understand how to
> get a clean export to markdown. By "clean" I mean: no extraneous html

One bit that will help is adding

#+options: toc:nil

to your org file to not request the table of contents.  Not sure if you
can remove the id entries however.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: How to get "clean" markdown export
       [not found] <dab02a661af34644b46246817e633d96@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
  2017-03-09 18:28 ` Eric S Fraga
@ 2017-03-09 18:30 ` Eric S Fraga
  2017-03-09 18:32   ` stefano franchi
  1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2017-03-09 18:30 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 419 bytes --]

On Thursday,  9 Mar 2017 at 17:44, stefano franchi wrote:
> Hi all,
>
> I 'm just beginning with org-mode and I' trying to understand how to
> get a clean export to markdown. By "clean" I mean: no extraneous html

Just tested what I suggested and, actually, adding

#+options: toc:nil

removes all the cruft you don't want!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 194 bytes --]

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

* Re: How to get "clean" markdown export
  2017-03-09 18:30 ` Eric S Fraga
@ 2017-03-09 18:32   ` stefano franchi
  2017-03-11 14:24     ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: stefano franchi @ 2017-03-09 18:32 UTC (permalink / raw)
  To: Eric S Fraga, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

On Thu, Mar 9, 2017 at 12:30 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:

> On Thursday,  9 Mar 2017 at 17:44, stefano franchi wrote:
> > Hi all,
> >
> > I 'm just beginning with org-mode and I' trying to understand how to
> > get a clean export to markdown. By "clean" I mean: no extraneous html
>
> Just tested what I suggested and, actually, adding
>
> #+options: toc:nil
>
> removes all the cruft you don't want!
>
>

Indeed! Thanks a lot, problem solved.



Cheers,

S.


-- 
__________________________________________________
Stefano Franchi

stefano.franchi@gmail.com <stefano@tamu.edu>
http://stefano.cleinias.org

[-- Attachment #2: Type: text/html, Size: 1402 bytes --]

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

* Re: How to get "clean" markdown export
  2017-03-09 18:32   ` stefano franchi
@ 2017-03-11 14:24     ` Nicolas Goaziou
  0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2017-03-11 14:24 UTC (permalink / raw)
  To: stefano franchi; +Cc: emacs-orgmode

Hello,

stefano franchi <stefano.franchi@gmail.com> writes:

> On Thu, Mar 9, 2017 at 12:30 PM, Eric S Fraga <e.fraga@ucl.ac.uk> wrote:
>
>> On Thursday,  9 Mar 2017 at 17:44, stefano franchi wrote:
>> > Hi all,
>> >
>> > I 'm just beginning with org-mode and I' trying to understand how to
>> > get a clean export to markdown. By "clean" I mean: no extraneous html
>>
>> Just tested what I suggested and, actually, adding
>>
>> #+options: toc:nil
>>
>> removes all the cruft you don't want!
>>
>>
>
> Indeed! Thanks a lot, problem solved.

Speaking of which, I just implemented native table of contents in
Markdown export back-end.

It supports global table of contents, and local ones, e.g.

  #+TOC: headlines local 3

Regards,

-- 
Nicolas Goaziou

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

end of thread, other threads:[~2017-03-11 14:24 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-09 17:44 How to get "clean" markdown export stefano franchi
     [not found] <dab02a661af34644b46246817e633d96@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-03-09 18:28 ` Eric S Fraga
2017-03-09 18:30 ` Eric S Fraga
2017-03-09 18:32   ` stefano franchi
2017-03-11 14:24     ` Nicolas Goaziou

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).