emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* ox-md conforming pandoc-markdown
@ 2014-01-21 11:00 Michel Kuhlmann
  2014-01-21 17:08 ` Nicolas Goaziou
  2014-01-23  6:13 ` Erik Hetzner
  0 siblings, 2 replies; 6+ messages in thread
From: Michel Kuhlmann @ 2014-01-21 11:00 UTC (permalink / raw)
  To: emacs-orgmode

Hi,
I often convert files with `pandoc`. Currently there is no
pandoc-org-mode-reader, so I'm using markdown as an intermediate step.

I'm aware of <https://github.com/robtillotson/org-pandoc.git>; this
also uses `ox-md`, so the issue applies also there.

I found these issues inconvenient:

- Listings create blank-lines in between
    + Currently
                        - uno
       - uno
       - dos    ->      - dos
       - tres
                        - tres
    + Desired
       - uno            - uno
       - dos    ->      - dos
       - tres           - tres

- Formulas are getting surrounded by \(  \); 
    + Currently
        $Q_{max}$  -> \(Q_{max}\)
    + Desired
        $Q_{max}$  -> $Q_{max}$

- customisable meta-data export (currently nothing exported) of, say,

    #+TITLE: myTitle
    #+KEYWORDS: cat1 cat2
    #+AUTHOR: meMyself
    #+DATE : 2014-01-21
    #+OPTIONS: toc:t

    + Desired
        * meta-yaml-block

            ---
            title:  myTitle
            author: meMyself
            catgories: cat1 cat2
            date: 2014-01-21
            toc: toc:t
            ...

        * pandoc header

            % myTitle
            % meMyself
            % 2014-01-21

Kind regards,
Michel

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

* Re: ox-md conforming pandoc-markdown
  2014-01-21 11:00 ox-md conforming pandoc-markdown Michel Kuhlmann
@ 2014-01-21 17:08 ` Nicolas Goaziou
  2014-01-23  6:13 ` Erik Hetzner
  1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Goaziou @ 2014-01-21 17:08 UTC (permalink / raw)
  To: Michel Kuhlmann; +Cc: emacs-orgmode

Hello,

Michel Kuhlmann <michel@kuhlmanns.info> writes:

> I often convert files with `pandoc`. Currently there is no
> pandoc-org-mode-reader, so I'm using markdown as an intermediate step.
>
> I'm aware of <https://github.com/robtillotson/org-pandoc.git>; this
> also uses `ox-md`, so the issue applies also there.
>
> I found these issues inconvenient:
>
> - Listings create blank-lines in between
>     + Currently
>                         - uno
>        - uno
>        - dos    ->      - dos
>        - tres
>                         - tres
>     + Desired
>        - uno            - uno
>        - dos    ->      - dos
>        - tres           - tres

I am aware of this. A patch should land in maint very soon.

> - Formulas are getting surrounded by \(  \); 
>     + Currently
>         $Q_{max}$  -> \(Q_{max}\)
>     + Desired
>         $Q_{max}$  -> $Q_{max}$
>
> - customisable meta-data export (currently nothing exported) of, say,
>
>     #+TITLE: myTitle
>     #+KEYWORDS: cat1 cat2
>     #+AUTHOR: meMyself
>     #+DATE : 2014-01-21
>     #+OPTIONS: toc:t
>
>     + Desired
>         * meta-yaml-block
>
>             ---
>             title:  myTitle
>             author: meMyself
>             catgories: cat1 cat2
>             date: 2014-01-21
>             toc: toc:t
>             ...
>
>         * pandoc header
>
>             % myTitle
>             % meMyself
>             % 2014-01-21

The goal of ox-md.el is to provide vanilla Mardown, so anyone can derive
a more specialized back-end out of it. Formulas (handled by ox-html) and
meta-data export do not belong to the vanilla flavour.


Regards,

-- 
Nicolas Goaziou

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

* Re: ox-md conforming pandoc-markdown
  2014-01-21 11:00 ox-md conforming pandoc-markdown Michel Kuhlmann
  2014-01-21 17:08 ` Nicolas Goaziou
@ 2014-01-23  6:13 ` Erik Hetzner
  2014-01-23  7:18   ` Michel Kuhlmann
  2014-01-23 11:12   ` Nicolas Goaziou
  1 sibling, 2 replies; 6+ messages in thread
From: Erik Hetzner @ 2014-01-23  6:13 UTC (permalink / raw)
  To: Michel Kuhlmann; +Cc: emacs-orgmode

Hi Michel,

At Tue, 21 Jan 2014 12:00:01 +0100,
Michel Kuhlmann wrote:
> 
> Hi,
> I often convert files with `pandoc`. Currently there is no
> pandoc-org-mode-reader, so I'm using markdown as an intermediate step.
> 
> I'm aware of <https://github.com/robtillotson/org-pandoc.git>; this
> also uses `ox-md`, so the issue applies also there.
> 
> I found these issues inconvenient:
> 
> - Listings create blank-lines in between
>     + Currently
>                         - uno
>        - uno
>        - dos    ->      - dos
>        - tres
>                         - tres
>     + Desired
>        - uno            - uno
>        - dos    ->      - dos
>        - tres           - tres

This seems easy enough to fix, we simply need to add:

  (org-element-put-property item :post-blank nil)

to the org-md-item function. Can anybody tell me if this is a bad
idea? Otherwise I will send a patch.

> - customisable meta-data export (currently nothing exported) of, say,
>
> […]
>         * pandoc header
> 
>             % myTitle
>             % meMyself
>             % 2014-01-21

Basic support for this is in the org-pandoc project, which bases its
export on ox-md but adds some additional features.

I’d like to expand org-pandoc to support more pandoc features,
including those you mention. I just pushed up a (very rudimentary)
change to my fork of this project to support proper table export for
pandoc as well.

  https://github.com/egh/org-pandoc

best, Erik
-- 
Sent from my free software system <http://fsf.org/>.

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

* Re: ox-md conforming pandoc-markdown
  2014-01-23  6:13 ` Erik Hetzner
@ 2014-01-23  7:18   ` Michel Kuhlmann
  2014-01-23 11:12   ` Nicolas Goaziou
  1 sibling, 0 replies; 6+ messages in thread
From: Michel Kuhlmann @ 2014-01-23  7:18 UTC (permalink / raw)
  To: Erik Hetzner; +Cc: emacs-orgmode

> > - customisable meta-data export (currently nothing exported) of, say,
> >
> > […]
> >         * pandoc header
> > 
> >             % myTitle
> >             % meMyself
> >             % 2014-01-21
> 
> Basic support for this is in the org-pandoc project, which bases its
> export on ox-md but adds some additional features.
> 
> I’d like to expand org-pandoc to support more pandoc features,
> including those you mention. I just pushed up a (very rudimentary)
> change to my fork of this project to support proper table export for
> pandoc as well.
> 
>   https://github.com/egh/org-pandoc

This sounds great, thanks.

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

* Re: ox-md conforming pandoc-markdown
  2014-01-23  6:13 ` Erik Hetzner
  2014-01-23  7:18   ` Michel Kuhlmann
@ 2014-01-23 11:12   ` Nicolas Goaziou
  2014-01-23 12:02     ` Michel Kuhlmann
  1 sibling, 1 reply; 6+ messages in thread
From: Nicolas Goaziou @ 2014-01-23 11:12 UTC (permalink / raw)
  To: Erik Hetzner; +Cc: Michel Kuhlmann, emacs-orgmode

Hello,

Erik Hetzner <egh@e6h.org> writes:

> Michel Kuhlmann wrote:
>> I found these issues inconvenient:
>> 
>> - Listings create blank-lines in between
>>     + Currently
>>                         - uno
>>        - uno
>>        - dos    ->      - dos
>>        - tres
>>                         - tres
>>     + Desired
>>        - uno            - uno
>>        - dos    ->      - dos
>>        - tres           - tres
>
> This seems easy enough to fix, we simply need to add:
>
>   (org-element-put-property item :post-blank nil)
>
> to the org-md-item function. Can anybody tell me if this is a bad
> idea? Otherwise I will send a patch.

This should be already fixed in maint branch.


Regards,

-- 
Nicolas Goaziou

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

* Re: ox-md conforming pandoc-markdown
  2014-01-23 11:12   ` Nicolas Goaziou
@ 2014-01-23 12:02     ` Michel Kuhlmann
  0 siblings, 0 replies; 6+ messages in thread
From: Michel Kuhlmann @ 2014-01-23 12:02 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Erik Hetzner, emacs-orgmode

On Thu, Jan 23, 2014 at 12:12:30PM +0100, Nicolas Goaziou wrote:
> >
> > This seems easy enough to fix, we simply need to add:
> >
> >   (org-element-put-property item :post-blank nil)
> >
> > to the org-md-item function. Can anybody tell me if this is a bad
> > idea? Otherwise I will send a patch.
> 
> This should be already fixed in maint branch.
> 

Great, thanks

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

end of thread, other threads:[~2014-01-23 12:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-21 11:00 ox-md conforming pandoc-markdown Michel Kuhlmann
2014-01-21 17:08 ` Nicolas Goaziou
2014-01-23  6:13 ` Erik Hetzner
2014-01-23  7:18   ` Michel Kuhlmann
2014-01-23 11:12   ` Nicolas Goaziou
2014-01-23 12:02     ` Michel Kuhlmann

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