From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefano franchi Subject: How to get "clean" markdown export Date: Thu, 9 Mar 2017 11:44:01 -0600 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113f5780652eb3054a4fcaef Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57438) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cm26g-0000Ca-99 for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 12:44:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cm26e-0000hD-Ll for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 12:44:06 -0500 Received: from mail-qk0-x229.google.com ([2607:f8b0:400d:c09::229]:33201) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cm26e-0000gA-Ed for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 12:44:04 -0500 Received: by mail-qk0-x229.google.com with SMTP id y76so130950089qkb.0 for ; Thu, 09 Mar 2017 09:44:03 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --001a113f5780652eb3054a4fcaef Content-Type: text/plain; charset=UTF-8 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: ------------------------------- \*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 -- __________________________________________________ Stefano Franchi stefano.franchi@gmail.com http://stefano.cleinias.org --001a113f5780652eb3054a4fcaef Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi all,

I 'm just be= ginning with org-mode and I' trying to understand how to get a clean ex= port to markdown. By "clean" I mean: no extraneous html code shou= ld be inserted or interspersed with the markdown code. Using the installati= on-provided exporter, I get very different results, with a lot of extraneou= s stuff being exported. (See example below)
Apologies if this ques= tion has been asked before. Searching the manual and the list's archive= s did not provided any enlightenment.

Cheers,

Ste= fano

P.S. I am on emacs 25=C2=A0 and org-mode 9= .0.2 on archlinux, if that matters:


Example: th= is simple file from a tutorial:

------------------------------
*W= elcome 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.<= br>
* This is a headline, it starts with one or more stars

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

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


Produced this file when exported to markdown:
<= /div>


-------------------------------
<div id=3D"tab= le-of-contents">
<h2>Table of Contents</h2>
<d= iv id=3D"text-table-of-contents">
<ul>
<li>&= lt;a href=3D"#org1736896">1. This is a headline, it starts wit= h one or more stars</a></li>
<li><a href=3D"#o= rg26c7f46">2. Working with lists</a>
<ul>
<li&= gt;<a href=3D"#orgb68e966">2.1. Moving around in our outlin= e</a>
<ul>
<li><a href=3D"#orgc435d16"= >2.1.1. A level three headline</a></li>
</ul>
&l= t;/li>
<li><a href=3D"#org292de22">2.2. Moving = around headlines</a></li>
</ul>
</li>
<= /ul>
</div>
</div>
\*Welcome to org-mode

Wel= come, and thanks for trying out Org-mode. Making outlines in org is very si= mple. It is just text! Just start typing.


<a id=3D"org17= 36896"></a>

# This is a headline, it starts with one o= r more stars

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

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

# Working with l= ists


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

## M= oving around in our outline


<a id=3D"orgc435d16">= ;</a>

### A level three headline


<a id=3D"o= rg292de22"></a>

## Moving around headlines


= --
__________________________________________________<= br>Stefano Franchi

stefano.franchi@gmail.com
http://stefano.cleinias.org
<= /div>
--001a113f5780652eb3054a4fcaef-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: How to get "clean" markdown export Date: Thu, 9 Mar 2017 18:28:14 +0000 Message-ID: <87bmtauwxt.fsf@ucl.ac.uk> References: Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cm2nW-0006RT-S9 for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:28:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cm2nS-0007UU-UC for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:28:22 -0500 Received: from mail-db5eur01on0131.outbound.protection.outlook.com ([104.47.2.131]:15642 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cm2nS-0007UJ-Ii for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:28:18 -0500 In-Reply-To: (stefano franchi's message of "Thu, 9 Mar 2017 17:44:01 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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. =2D-=20 : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWMGevgAKCRDIkZPY//z2 feCqAJwJhrG3wVDLT9nc0uesZqc3XWySrACfa1gniTkkAKhOWULKptIWikATVwk= =x4lT -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: How to get "clean" markdown export Date: Thu, 9 Mar 2017 18:30:21 +0000 Message-ID: <877f3yuwua.fsf@ucl.ac.uk> References: Reply-To: Eric S Fraga Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42550) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cm2pZ-0007I0-2C for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:30:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cm2pV-0007wA-5g for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:30:29 -0500 Received: from mail-db5eur01on0106.outbound.protection.outlook.com ([104.47.2.106]:37568 helo=EUR01-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cm2pU-0007vg-R0 for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:30:25 -0500 In-Reply-To: (stefano franchi's message of "Thu, 9 Mar 2017 17:44:01 +0000") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable 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! =2D-=20 : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50.1, Org release_9.0.4-242-g2c27b8 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQSPXCedOQfhSlwpVw3IkZPY//z2fQUCWMGfPQAKCRDIkZPY//z2 ff/HAJ9+mUDfHMx6Vplka1pu/6U1ZiFHRACffxF0iryNR5IUSdr0J4+2R4kDSNA= =Ti8D -----END PGP SIGNATURE----- --=-=-=-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: stefano franchi Subject: Re: How to get "clean" markdown export Date: Thu, 9 Mar 2017 12:32:12 -0600 Message-ID: References: <877f3yuwua.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a114a732eb6a9ea054a507610 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43017) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cm2rH-0008Js-5u for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:32:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cm2rF-0000Uw-SH for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:32:15 -0500 Received: from mail-qk0-x235.google.com ([2607:f8b0:400d:c09::235]:33246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cm2rF-0000UY-O2 for emacs-orgmode@gnu.org; Thu, 09 Mar 2017 13:32:13 -0500 Received: by mail-qk0-x235.google.com with SMTP id y76so133209020qkb.0 for ; Thu, 09 Mar 2017 10:32:13 -0800 (PST) In-Reply-To: <877f3yuwua.fsf@ucl.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Eric S Fraga , emacs-orgmode@gnu.org --001a114a732eb6a9ea054a507610 Content-Type: text/plain; charset=UTF-8 On Thu, Mar 9, 2017 at 12:30 PM, Eric S Fraga 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 http://stefano.cleinias.org --001a114a732eb6a9ea054a507610 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Thu, Mar 9, 2017 at 12:30 PM, Eric S Fraga <e.fraga@ucl.ac.uk&g= t; wrote:
On Thur= sday,=C2=A0 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 extran= eous html

Just tested what I suggested and, actually, adding

#+options: toc:nil

removes all the cruft you don't want!

<= br>
Indeed! Thanks a lot, problem solved.

<= br>
Cheers,

S.


--
_____________________________= _____________________
Stefano Franchi

stefano.franchi@gmail.com
http://stefano.cleinias.org<= br>
--001a114a732eb6a9ea054a507610-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: How to get "clean" markdown export Date: Sat, 11 Mar 2017 15:24:20 +0100 Message-ID: <87h92z7uy3.fsf@nicolasgoaziou.fr> References: <877f3yuwua.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46721) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cmhwW-0007UH-5l for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 09:24:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cmhwV-0003R6-Ay for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 09:24:24 -0500 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:39210) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cmhwV-0003QT-4s for emacs-orgmode@gnu.org; Sat, 11 Mar 2017 09:24:23 -0500 In-Reply-To: (stefano franchi's message of "Thu, 9 Mar 2017 12:32:12 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: stefano franchi Cc: emacs-orgmode@gnu.org Hello, stefano franchi writes: > On Thu, Mar 9, 2017 at 12:30 PM, Eric S Fraga 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