emacs-orgmode
[Top][All Lists]
Advanced

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

[O] problem with ox-pandoc export


From: Alan Schmitt
Subject: [O] problem with ox-pandoc export
Date: Fri, 26 Jun 2015 14:59:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin)

Hello,

I’m having some issues with the ox-pandoc export and I would like to
have some help from people who understand derived backends to debug it.
Here is the github issue about it: 
https://github.com/kawabata/ox-pandoc/issues/3

The problem is that file metadata (author, date, title) is not present
in the export.

The main function of the exporter looks like this:

#+begin_src emacs-lisp
  (org-export-to-file 'pandoc (org-export-output-file-name
                               (concat (make-temp-name ".tmp") ".org") s)
    a s v b e (lambda (f) (org-pandoc-run-to-buffer-or-file f format s 
buf-or-open)))
#+end_src

If I read this correctly, it exports the org file to a temporary file
(which happens to be in org format), and then calls another function to
actually call pandoc. I think the problem is that the temporary file
created does not have the metadata in it.

For instance, this file

--8<---------------cut here---------------start------------->8---
#+title: This is a title
#+date: 1/2/3

* First section
foo

* Second section
bar
--8<---------------cut here---------------end--------------->8---

results in this temporary file

--8<---------------cut here---------------start------------->8---


* First section
foo

* Second section
bar
--8<---------------cut here---------------end--------------->8---

The derived backend is defined like this:

#+begin_src emacs-lisp
(org-export-define-derived-backend 'pandoc 'org
  :translate-alist '((template . org-pandoc-template))
  :export-block "PANDOC"
  :menu-entry
  `(?p "export via pandoc"
       ,org-pandoc-menu-entry)
  :options-alist
  '((:pandoc-options "PANDOC_OPTIONS" nil nil space)
    (:pandoc-metadata "PANDOC_METADATA" nil nil space)
    (:pandoc-variables "PANDOC_VARIABLES" nil nil space)
    (:epub-chapter-level "EPUB_CHAPTER_LEVEL" nil nil t)
    (:epub-cover-image "EPUB_COVER" nil nil t)
    (:epub-embed-font "EPUB_EMBED_FONT" nil nil newline)
    (:epub-meta "EPUB_META" nil nil newline)
    (:epub-css "EPUB_CSS" nil nil newline)
    (:epub-rights "EPUB_RIGHTS" nil nil newline)
    (:bibliography "BIBLIOGRAPHY")))
#+end_src

Is there any reason why the options would disappear during export?

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Athmospheric CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm

Attachment: signature.asc
Description: PGP signature


reply via email to

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