├── README.org └── ox-pandoc.el /README.org: -------------------------------------------------------------------------------- 1 | * ox-pandoc 2 | 3 | This is another exporter that translates Org-mode file to various 4 | other formats via Pandoc. 5 | 6 | * Description 7 | 8 | You can convert Org-mode file to various formats with simple commands. 9 | Following table shows the supported fromats. 10 | 11 | | format | extension | buffer | file | 12 | |-------------------+-----------+--------+------| 13 | | asciidoc | txt | yes | yes | 14 | | beamer | tex | yes | yes | 15 | | beamer-pdf | pdf | no | yes | 16 | | commonmark | md | yes | yes | 17 | | context | tex | yes | yes | 18 | | docbook | xml | yes | yes | 19 | | docx | | no | yes | 20 | | dzslides | html | yes | yes | 21 | | epub2 | epub | no | yes | 22 | | epub3 | epub | no | yes | 23 | | fb2 | fb2 | yes | yes | 24 | | gfm | md | yes | yes | 25 | | html4 | html | yes | yes | 26 | | html5 | html | yes | yes | 27 | | icml | | yes | yes | 28 | | json | | yes | yes | 29 | | latex | tex | yes | yes | 30 | | latex-pdf | pdf | no | yes | 31 | | man | | yes | yes | 32 | | markdown | md | yes | yes | 33 | | markdown_github | md | yes | yes | 34 | | markdown_mmd | md | yes | yes | 35 | | markdown_phpextra | md | yes | yes | 36 | | markdown_strict | md | yes | yes | 37 | | mediawiki | | yes | yes | 38 | | native | hs | yes | yes | 39 | | odt | | no | yes | 40 | | opendocument | xml | yes | yes | 41 | | opml | | yes | yes | 42 | | org | | yes | yes | 43 | | plain | txt | yes | yes | 44 | | pptx | | no | yes | 45 | | revealjs | html | yes | yes | 46 | | rst | | yes | yes | 47 | | rtf | | yes | yes | 48 | | s5 | html | yes | yes | 49 | | slideous | html | yes | yes | 50 | | slidy | html | yes | yes | 51 | | texinfo | texi | yes | yes | 52 | | textile | | yes | yes | 53 | 54 | * Requirements 55 | 56 | You need Emacs 24.2, org-mode 8.2, and Pandoc 2.0 (or later 57 | versions). Pandoc-Citeproc 0.3 (or later) may also be needed if you 58 | use bibliography features. 59 | 60 | Note that Org-mode equipped with Emacs 24.3 is version 7.9 and can not 61 | be used with this tool. It is recommended to install Pandoc via [[http://www.haskell.org/cabal/][Cabal]], 62 | or the installer directly downloaded from official web sites, as other 63 | package managers (such as Anaconda) sometimes install old versions of 64 | Pandoc. 65 | 66 | * Installation 67 | 68 | You can install this tool with [[www.melpa.org][MELPA]]. For example, 69 | 70 | #+BEGIN_SRC emacs-lisp 71 | (setq package-archives 72 | '(("gnu" . "http://elpa.gnu.org/packages/") 73 | ("melpa" . "http://melpa.milkbox.net/packages/"))) 74 | #+END_SRC 75 | 76 | : M-x package-install ⏎ 77 | : ox-pandoc ⏎ 78 | 79 | * Usage 80 | 81 | ** Running the Commands 82 | 83 | For example, to convert org-mode file to 'html5' format, you may run 84 | the following commands. 85 | 86 | - =org-pandoc-export-as-html5= :: Exports to the HTML5 text as a buffer. 87 | - =org-pandoc-export-to-html5= :: Exports to the HTML5 text file. 88 | - =org-pandoc-export-to-html5-and-open= :: Exports and open HTML5 file. 89 | 90 | Similar commands are prepared for various formats. 91 | 92 | ** Customizing User Option Variables 93 | 94 | You can specify the default options for each document format and 95 | hooks. 96 | 97 | - =org-pandoc-options= :: General Pandoc options. 98 | - =org-pandoc-options-for-FORMAT= :: Format-specific options. 99 | - =org-pandoc-after-processing-FORMAT-hook= :: Hook after processing 100 | =FORMAT=. This hook is only available to text-file =FORMAT=. 101 | - =org-pandoc-epub-rights= :: EPUB Copyright Statement. 102 | 103 | Options should be specified by an alist. List of valid options are 104 | defined in =org-pandoc-valid-options=. Only long-name options can be 105 | used. =after-processing= options can not be specified to =epub=, 106 | =docx= or =pdf= formats. For preprocessing hooks, use 107 | =org-export-before-processing-hook=. 108 | 109 | Multiple values can be specified to options defined in 110 | =org-pandoc-colon-separated-options=. They should be defined in 111 | colon-separated list. 112 | 113 | Values of options defined in =org-pandoc-file-options= will be 114 | expanded to full path if they begin with =~= (tilde) character. 115 | 116 | You can also specify output format extension with 117 | =org-pandoc-format-extensions= variable. 118 | 119 | For example: 120 | 121 | #+BEGIN_SRC emacs-lisp 122 | ;; default options for all output formats 123 | (setq org-pandoc-options '((standalone . t))) 124 | ;; cancel above settings only for 'docx' format 125 | (setq org-pandoc-options-for-docx '((standalone . nil))) 126 | ;; special settings for beamer-pdf and latex-pdf exporters 127 | (setq org-pandoc-options-for-beamer-pdf '((pdf-engine . "xelatex"))) 128 | (setq org-pandoc-options-for-latex-pdf '((pdf-engine . "pdflatex"))) 129 | ;; special extensions for markdown_github output 130 | (setq org-pandoc-format-extensions '(markdown_github+pipe_tables+raw_html)) 131 | #+END_SRC 132 | 133 | ** Document-Specific Options 134 | 135 | Following document-specific options can be specified. Value =nil= 136 | overrides preceding option setting. Value =t= means only specify 137 | option, but not its value. Options are delimited by space. 138 | =#+PANDOC_OPTIONS:= can be specified multiple times. If you want to 139 | specify the option value which include space character, quote /entire/ 140 | option-value pair. 141 | 142 | - =PANDOC_OPTIONS:= :: Add command line options to the Pandoc process. 143 | - =PANDOC_METADATA:= :: Metadata for Pandoc. 144 | - =PANDOC_EXTENSIONS:= :: Extensions for specific Pandoc output. 145 | - =PANDOC_VARIABLES:= :: Variables for Pandoc. 146 | - =EPUB_RIGHTS:= :: copyright info to be embedded to EPUB metadata. 147 | - =EPUB_CHAPTER_LEVEL:= :: same as 'epub-chapter-level' pandoc-option. 148 | - =EPUB_STYLESHEET:= :: same as 'epub-stylesheet' pandoc-option. 149 | - =EPUB_COVER:= :: same as 'epub-cover-image' pandoc-option. 150 | - =EPUB_FONT:= :: same as 'epub-embed-font' pandoc-option. Only one 151 | font can be specified in each line. Multiple fonts 152 | can be specified by repeatedly use this option. 153 | - =EPUB_META:= :: put contents into a temporary file and specify 154 | that file to 'epub-metadata' option. 155 | - =EPUB_CSS:= :: put contents into a temporary file and specify 156 | that file to 'epub-stylesheet' option. 157 | - =BIBLIOGRAPHY:= :: same as 'bibliography' pandoc-option. Only one 158 | bibliography can be specified in each line. Multiple 159 | bibliographies can be specified by repeatedly use this option. 160 | 161 | Following is an example: 162 | 163 | : # If you don't want author to be appeared, just leave it empty. 164 | : #+AUTHOR: 165 | : #+PANDOC_OPTIONS: standalone:t pdf-engine:pdflatex 166 | : ## When option value includes whitespace, entire name:value pair must be quoted. 167 | : #+PANDOC_OPTIONS: "epub-cover-image:/home/a/test file.png" standalone:nil 168 | : #+PANDOC_OPTIONS: number-sections:nil 169 | : #+PANDOC_OPTIONS: template:mytemplate.tex 170 | : #+BIBLIOGRAPHY: sample.bib 171 | : # Specifying Multiple values to single options by using colon-sparated lists. 172 | : #+PANDOC_OPTIONS: filter:pandoc-zotxt:pandoc-citeproc 173 | : #+PANDOC_OPTIONS: csl:IEEE.csl 174 | : #+PANDOC_EXTENSIONS: markdown-typography latex+auto_identifiers 175 | : #+PANDOC_VARIABLES: documentclass:IEEEtran 176 | : #+PANDOC_VARIABLES: classoption:10pt,conference 177 | : #+PANDOC_METADATA: page-progression-direction:ltr 178 | : #+latex_header: \author{\IEEEauthorblockN{John Smith} 179 | : #+latex_header: \IEEEauthorblockA{FooBar Institute\\ 180 | : #+latex_header: Email: john.smith@foo.bar} 181 | 182 | ** Customizing Shortcuts 183 | As pandoc supports many number of formats, initial 184 | =org-export-dispatch= shortcut menu does not show full of its 185 | supported formats. You can customize =org-pandoc-menu-entry= variable 186 | (and probably restart Emacs) to change its default menu entries. 187 | 188 | If you want delayed loading of `ox-pandoc' when 189 | =org-pandoc-menu-entry= is customized, please consider the following 190 | settings in your init file. 191 | 192 | #+BEGIN_SRC emacs-lisp 193 | (with-eval-after-load 'ox 194 | (require 'ox-pandoc)) 195 | #+END_SRC 196 | 197 | * VS. 198 | 199 | ** org-pandoc 200 | 201 | This file is inspired by [[https://github.com/robtillotson/org-pandoc][org-pandoc]], but entirely re-written. This 202 | tool prepares various export commands for all formats supported by 203 | pandoc. 204 | 205 | * Note 206 | 207 | ** Temporary Files 208 | 209 | This file creates and removes "XXXX.tmpZZZZ.org" and 210 | "XXXX.tmpZZZZ.css" (if necessary) temprary files in working directory. 211 | (ZZZZ is random string.) 212 | 213 | ** Obsolete In-File Options 214 | 215 | Following options are supported in previous version of =ox-pandoc=. 216 | They are no longer supported. 217 | 218 | - =EPUB_METADATA:= :: obsolete. Use =epub-metadata= in 219 | =PANDOC_OPTIONS:= instead. 220 | - =EPUB_STYLESHEET:= :: obsolete. Use =epub-stylesheet= in 221 | =PANDOC_OPTIONS:= instead. 222 | 223 | ** Citation 224 | 225 | Currently, Pandoc citation key is expressed as /@key/, rather than 226 | /{\cite key}/ . You may need some text converter if you want to use 227 | Pandoc citation styles in org document. 228 | 229 | * License 230 | 231 | GPLv2. 232 | 233 | * Author 234 | 235 | - [[http://github.com/kawabata][kawabata]] 236 | -------------------------------------------------------------------------------- /ox-pandoc.el: -------------------------------------------------------------------------------- 1 | ;;; ox-pandoc.el --- org exporter for pandoc. -*- lexical-binding: t; -*- 2 | 3 | ;; Copyright (C) 2014-2017 KAWABATA, Taichi 4 | 5 | ;; Filename: ox-pandoc.el 6 | ;; Description: Another org exporter for Pandoc 7 | ;; Author: KAWABATA, Taichi 8 | ;; Created: 2014-07-20 9 | ;; Version: 1.180510 10 | ;; Package-Requires: ((org "8.2") (emacs "24") (dash "2.8") (ht "2.0") (cl-lib "0.5")) 11 | ;; Keywords: tools 12 | ;; URL: https://github.com/kawabata/ox-pandoc 13 | 14 | ;; This program is free software; you can redistribute it and/or modify 15 | ;; it under the terms of the GNU General Public License as published by 16 | ;; the Free Software Foundation, either version 3 of the License, or 17 | ;; (at your option) any later version. 18 | 19 | ;; This program is distributed in the hope that it will be useful, 20 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 | ;; GNU General Public License for more details. 23 | 24 | ;; You should have received a copy of the GNU General Public License 25 | ;; along with this program. If not, see . 26 | 27 | ;;; Commentary: 28 | 29 | ;; This is another exporter for org-mode that translates Org-mode file 30 | ;; to various other formats via Pandoc. You need org-mode version 8.2 31 | ;; or later, and Pandoc 2.0 or later, to use this package. For 32 | ;; details, please refer https://github.com/kawabata/ox-pandoc. 33 | 34 | ;;; Code: 35 | 36 | (eval-when-compile 37 | (require 'cl)) 38 | (require 'ox-org) 39 | (require 'dash) 40 | (require 'ht) 41 | (require 'cl-lib) 42 | (require 'ox-html) ; from `org', needed for `org-html-standalone-image-p' 43 | 44 | (defgroup org-pandoc nil 45 | "Options specific to Pandoc export back-end." 46 | :tag "Org Pandoc" 47 | :group 'org-export) 48 | 49 | (defconst org-pandoc-valid-options 50 | '(abbreviations ascii atx-headers base-header-level bash-completion 51 | biblatex bibliography citation-abbreviations columns csl css 52 | data-dir default-image-extension dpi dump-args email-obfuscation eol 53 | epub-chapter-level epub-cover-image epub-embed-font epub-metadata 54 | epub-subdirectory extract-media fail-if-warnings file-scope filter 55 | highlight-style html-q-tags id-prefix ignore-args include-after-body 56 | include-before-body include-in-header incremental 57 | indented-code-classes katex list-extensions list-highlight-languages 58 | list-highlight-styles listings log lua-filter mathjax mathml 59 | metadata natbib no-highlight number-offset number-sections 60 | pdf-engine-opt pdf-engine preserve-tabs print-default-data-file 61 | print-default-template quiet reference-doc reference-links 62 | reference-location resource-path section-divs self-contained 63 | slide-level standalone strip-comments syntax-definition tab-stop 64 | table-of-contents template title-prefix toc top-level-division 65 | toc-depth trace track-changes variable verbose version webtex wrap)) 66 | 67 | (defconst org-pandoc-colon-separated-options 68 | '(abbreviations css include-in-header include-before-body 69 | include-after-body pdf-engine-opt epub-embed-font bibliography 70 | filter lua-filter)) 71 | 72 | (defconst org-pandoc-file-options 73 | '(abbreviations bibliography citation-abbreviations csl 74 | epub-cover-image epub-embed-font epub-metadata include-after-body 75 | include-before-body include-in-header log print-default-data-file 76 | reference-doc syntax-definition template )) 77 | 78 | (defconst org-pandoc-extensions 79 | '((asciidoc . txt) (beamer . tex) 80 | (commonmark . md) (context . tex) 81 | (docbook4 . dbk) (docbook5 . dbk) (dokuwiki . doku) 82 | (dzslides . html) (epub2 . epub) (epub3 . epub) (gfm . md) 83 | (haddock . hs) (html4 . html) (html5 . html) (latex . tex) 84 | (markdown . md) 85 | (markdown_mmd . md) (markdown_phpextra . md) 86 | (markdown_strict . md) (native . hs) 87 | (opendocument . xml) (plain . txt) (revealjs . html) (s5 . html) 88 | (slideous . html) (slidy . html) (texinfo . texi) 89 | (zimwiki . zim))) 90 | 91 | (defconst org-pandoc-option-type 92 | `(choice (const t) (const nil) 93 | (alist :key-type (choice ,@(--map `(const ,it) org-pandoc-valid-options)) 94 | :value-type (choice (const t) (const nil) string)))) 95 | 96 | (defcustom org-pandoc-options '((standalone . t)) ;; (mathjax . t) (parse-raw . t) 97 | "Pandoc options." 98 | :group 'org-pandoc 99 | :type org-pandoc-option-type) 100 | 101 | (defcustom org-pandoc-format-extensions nil 102 | "List of Pandoc format extensions for specific output format. 103 | For example, if you want to specify markdown to have footnotes extension, 104 | set as `(markdown_strict+footnotes)'." 105 | :group 'org-pandoc 106 | :type '(repeat symbol)) 107 | 108 | (defcustom org-pandoc-command "pandoc" 109 | "Pandoc command." 110 | :group 'org-pandoc 111 | :type 'string) 112 | 113 | (defcustom org-pandoc-menu-entry 114 | '( 115 | ;;(?0 "to jats." org-pandoc-export-to-jats) 116 | ;;(?0 "to jats and open." org-pandoc-export-to-jats-and-open) 117 | ;;(? "as jats." org-pandoc-export-as-jats) 118 | ;;(?1 "to epub2 and open." org-pandoc-export-to-epub2-and-open) 119 | ;;(?! "to epub2." org-pandoc-export-to-epub2) 120 | ;;(?2 "to tei." org-pandoc-export-to-tei) 121 | ;;(?2 "to tei and open." org-pandoc-export-to-tei-and-open) 122 | ;;(?" "as tei." org-pandoc-export-as-tei) 123 | ;;(?3 "to markdown_mmd." org-pandoc-export-to-markdown_mmd) 124 | ;;(?3 "to markdown_mmd and open." org-pandoc-export-to-markdown_mmd-and-open) 125 | ;;(?# "as markdown_mmd." org-pandoc-export-as-markdown_mmd) 126 | ;;(?4 "to html5." org-pandoc-export-to-html5) 127 | (?4 "to html5 and open." org-pandoc-export-to-html5-and-open) 128 | (?$ "as html5." org-pandoc-export-as-html5) 129 | (?5 "to html5-pdf and open." org-pandoc-export-to-html5-pdf-and-open) 130 | (?% "to html5-pdf." org-pandoc-export-to-html5-pdf) 131 | ;;(?6 "to markdown_phpextra." org-pandoc-export-to-markdown_phpextra) 132 | ;;(?6 "to markdown_phpextra and open." org-pandoc-export-to-markdown_phpextra-and-open) 133 | ;;(?& "as markdown_phpextra." org-pandoc-export-as-markdown_phpextra) 134 | ;;(?7 "to markdown_strict." org-pandoc-export-to-markdown_strict) 135 | ;;(?7 "to markdown_strict and open." org-pandoc-export-to-markdown_strict-and-open) 136 | ;;(?' "as markdown_strict." org-pandoc-export-as-markdown_strict) 137 | ;;(?8 "to opendocument." org-pandoc-export-to-opendocument) 138 | ;;(?8 "to opendocument and open." org-pandoc-export-to-opendocument-and-open) 139 | ;;(?( "as opendocument." org-pandoc-export-as-opendocument) 140 | ;;(?9 "to opml." org-pandoc-export-to-opml) 141 | ;;(?9 "to opml and open." org-pandoc-export-to-opml-and-open) 142 | ;;(?) "as opml." org-pandoc-export-as-opml) 143 | ;;(?: "to rst." org-pandoc-export-to-rst) 144 | ;;(?: "to rst and open." org-pandoc-export-to-rst-and-open) 145 | ;;(?* "as rst." org-pandoc-export-as-rst) 146 | ;;(?< "to slideous." org-pandoc-export-to-slideous) 147 | (?< "to slideous and open." org-pandoc-export-to-slideous-and-open) 148 | (?, "as slideous." org-pandoc-export-as-slideous) 149 | (?= "to ms-pdf and open." org-pandoc-export-to-ms-pdf-and-open) 150 | (?- "to ms-pdf." org-pandoc-export-to-ms-pdf) 151 | ;;(?> "to textile." org-pandoc-export-to-textile) 152 | ;;(?> "to textile and open." org-pandoc-export-to-textile-and-open) 153 | ;;(?. "as textile." org-pandoc-export-as-textile) 154 | ;;(?a "to asciidoc." org-pandoc-export-to-asciidoc) 155 | ;;(?a "to asciidoc and open." org-pandoc-export-to-asciidoc-and-open) 156 | ;;(?A "as asciidoc." org-pandoc-export-as-asciidoc) 157 | (?b "to beamer-pdf and open." org-pandoc-export-to-beamer-pdf-and-open) 158 | (?B "to beamer-pdf." org-pandoc-export-to-beamer-pdf) 159 | (?c "to context-pdf and open." org-pandoc-export-to-context-pdf-and-open) 160 | (?C "to context-pdf." org-pandoc-export-to-context-pdf) 161 | ;;(?d "to docbook5." org-pandoc-export-to-docbook5) 162 | (?d "to docbook5 and open." org-pandoc-export-to-docbook5-and-open) 163 | (?D "as docbook5." org-pandoc-export-as-docbook5) 164 | (?e "to epub3 and open." org-pandoc-export-to-epub3-and-open) 165 | (?E "to epub3." org-pandoc-export-to-epub3) 166 | ;;(?f "to fb2." org-pandoc-export-to-fb2) 167 | ;;(?f "to fb2 and open." org-pandoc-export-to-fb2-and-open) 168 | ;;(?F "as fb2." org-pandoc-export-as-fb2) 169 | ;;(?g "to gfm." org-pandoc-export-to-gfm) 170 | (?g "to gfm and open." org-pandoc-export-to-gfm-and-open) 171 | (?G "as gfm." org-pandoc-export-as-gfm) 172 | ;;(?h "to html4." org-pandoc-export-to-html4) 173 | (?h "to html4 and open." org-pandoc-export-to-html4-and-open) 174 | (?H "as html4." org-pandoc-export-as-html4) 175 | ;;(?i "to icml." org-pandoc-export-to-icml) 176 | (?i "to icml and open." org-pandoc-export-to-icml-and-open) 177 | (?I "as icml." org-pandoc-export-as-icml) 178 | ;;(?j "to json." org-pandoc-export-to-json) 179 | (?j "to json and open." org-pandoc-export-to-json-and-open) 180 | (?J "as json." org-pandoc-export-as-json) 181 | ;;(?k "to markdown." org-pandoc-export-to-markdown) 182 | ;;(?k "to markdown and open." org-pandoc-export-to-markdown-and-open) 183 | ;;(?K "as markdown." org-pandoc-export-as-markdown) 184 | (?l "to latex-pdf and open." org-pandoc-export-to-latex-pdf-and-open) 185 | (?L "to latex-pdf." org-pandoc-export-to-latex-pdf) 186 | ;;(?m "to man." org-pandoc-export-to-man) 187 | (?m "to man and open." org-pandoc-export-to-man-and-open) 188 | (?M "as man." org-pandoc-export-as-man) 189 | ;;(?n "to native." org-pandoc-export-to-native) 190 | (?n "to native and open." org-pandoc-export-to-native-and-open) 191 | (?N "as native." org-pandoc-export-as-native) 192 | (?o "to odt and open." org-pandoc-export-to-odt-and-open) 193 | (?O "to odt." org-pandoc-export-to-odt) 194 | (?p "to pptx and open." org-pandoc-export-to-pptx-and-open) 195 | (?P "to pptx." org-pandoc-export-to-pptx) 196 | ;;(?q "to commonmark." org-pandoc-export-to-commonmark) 197 | ;;(?q "to commonmark and open." org-pandoc-export-to-commonmark-and-open) 198 | ;;(?Q "as commonmark." org-pandoc-export-as-commonmark) 199 | ;;(?r "to rtf." org-pandoc-export-to-rtf) 200 | (?r "to rtf and open." org-pandoc-export-to-rtf-and-open) 201 | (?R "as rtf." org-pandoc-export-as-rtf) 202 | ;;(?s "to s5." org-pandoc-export-to-s5) 203 | ;;(?s "to s5 and open." org-pandoc-export-to-s5-and-open) 204 | ;;(?S "as s5." org-pandoc-export-as-s5) 205 | ;;(?t "to texinfo." org-pandoc-export-to-texinfo) 206 | ;;(?t "to texinfo and open." org-pandoc-export-to-texinfo-and-open) 207 | ;;(?T "as texinfo." org-pandoc-export-as-texinfo) 208 | ;;(?u "to dokuwiki." org-pandoc-export-to-dokuwiki) 209 | (?u "to dokuwiki and open." org-pandoc-export-to-dokuwiki-and-open) 210 | (?U "as dokuwiki." org-pandoc-export-as-dokuwiki) 211 | ;;(?v "to revealjs." org-pandoc-export-to-revealjs) 212 | (?v "to revealjs and open." org-pandoc-export-to-revealjs-and-open) 213 | (?V "as revealjs." org-pandoc-export-as-revealjs) 214 | ;;(?w "to mediawiki." org-pandoc-export-to-mediawiki) 215 | (?w "to mediawiki and open." org-pandoc-export-to-mediawiki-and-open) 216 | (?W "as mediawiki." org-pandoc-export-as-mediawiki) 217 | (?x "to docx and open." org-pandoc-export-to-docx-and-open) 218 | (?X "to docx." org-pandoc-export-to-docx) 219 | ;;(?y "to slidy." org-pandoc-export-to-slidy) 220 | (?y "to slidy and open." org-pandoc-export-to-slidy-and-open) 221 | (?Y "as slidy." org-pandoc-export-as-slidy) 222 | ;;(?z "to dzslides." org-pandoc-export-to-dzslides) 223 | (?z "to dzslides and open." org-pandoc-export-to-dzslides-and-open) 224 | (?Z "as dzslides." org-pandoc-export-as-dzslides) 225 | ;;(?{ "to muse." org-pandoc-export-to-muse) 226 | ;;(?{ "to muse and open." org-pandoc-export-to-muse-and-open) 227 | ;;(?[ "as muse." org-pandoc-export-as-muse) 228 | ;;(?} "to zimwiki." org-pandoc-export-to-zimwiki) 229 | ;;(?} "to zimwiki and open." org-pandoc-export-to-zimwiki-and-open) 230 | ;;(?] "as zimwiki." org-pandoc-export-as-zimwiki) 231 | ;;(?~ "to haddock." org-pandoc-export-to-haddock) 232 | ;;(?~ "to haddock and open." org-pandoc-export-to-haddock-and-open) 233 | ;;(?^ "as haddock." org-pandoc-export-as-haddock) 234 | ) 235 | "Pandoc menu-entry." 236 | :group 'org-pandoc 237 | :type 'list) 238 | 239 | (org-export-define-derived-backend 'pandoc 'org 240 | :translate-alist '((latex-environment . org-pandoc-latex-environ) 241 | (link . org-pandoc-link) 242 | (table . org-pandoc-table) 243 | (template . org-pandoc-template) 244 | (paragraph . org-pandoc-paragraph) 245 | (src-block . org-pandoc-src-block)) 246 | ;; :export-block "PANDOC" 247 | :menu-entry 248 | `(?p "export via pandoc" 249 | ,org-pandoc-menu-entry) 250 | :options-alist 251 | '((:pandoc-options "PANDOC_OPTIONS" nil nil space) 252 | (:pandoc-extensions "PANDOC_EXTENSIONS" nil nil space) 253 | (:pandoc-metadata "PANDOC_METADATA" nil nil space) 254 | (:pandoc-variables "PANDOC_VARIABLES" nil nil space) 255 | (:epub-chapter-level "EPUB_CHAPTER_LEVEL" nil nil t) 256 | (:epub-cover-image "EPUB_COVER" nil nil t) 257 | (:epub-stylesheet "EPUB_STYLESHEET" nil nil t) 258 | (:epub-embed-font "EPUB_EMBED_FONT" nil nil newline) 259 | (:epub-meta "EPUB_META" nil nil newline) 260 | (:epub-css "EPUB_CSS" nil nil newline) 261 | (:epub-rights "EPUB_RIGHTS" nil nil newline) 262 | (:bibliography "BIBLIOGRAPHY"))) 263 | 264 | (defcustom org-pandoc-epub-rights 265 | (concat "Copyright " (format-time-string "%Y") 266 | (if user-full-name (concat " " user-full-name)) 267 | (if user-mail-address (concat " <" user-mail-address ">"))) 268 | "Pandoc option for EPUB copyrihgt statement." 269 | :group 'org-pandoc 270 | :type 'string) 271 | 272 | ;;; each backend processor 273 | 274 | (defcustom org-pandoc-options-for-asciidoc nil 275 | "Pandoc options for asciidoc." 276 | :group 'org-pandoc 277 | :type org-pandoc-option-type) 278 | 279 | (defcustom org-pandoc-after-processing-asciidoc-hook nil 280 | "Hook called after processing asciidoc." 281 | :group 'org-pandoc 282 | :type 'hook) 283 | 284 | ;;;###autoload 285 | (defun org-pandoc-export-to-asciidoc (&optional a s v b e) 286 | "Export to asciidoc." 287 | (interactive) (org-pandoc-export 'asciidoc a s v b e)) 288 | 289 | ;;;###autoload 290 | (defun org-pandoc-export-to-asciidoc-and-open (&optional a s v b e) 291 | "Export to asciidoc and open." 292 | (interactive) (org-pandoc-export 'asciidoc a s v b e 0)) 293 | 294 | ;;;###autoload 295 | (defun org-pandoc-export-as-asciidoc (&optional a s v b e) 296 | "Export as asciidoc." 297 | (interactive) (org-pandoc-export 'asciidoc a s v b e t)) 298 | 299 | (defcustom org-pandoc-options-for-beamer nil 300 | "Pandoc options for beamer." 301 | :group 'org-pandoc 302 | :type org-pandoc-option-type) 303 | 304 | (defcustom org-pandoc-after-processing-beamer-hook nil 305 | "Hook called after processing beamer." 306 | :group 'org-pandoc 307 | :type 'hook) 308 | 309 | ;;;###autoload 310 | (defun org-pandoc-export-to-beamer (&optional a s v b e) 311 | "Export to beamer." 312 | (interactive) (org-pandoc-export 'beamer a s v b e)) 313 | 314 | ;;;###autoload 315 | (defun org-pandoc-export-to-beamer-and-open (&optional a s v b e) 316 | "Export to beamer and open." 317 | (interactive) (org-pandoc-export 'beamer a s v b e 0)) 318 | 319 | ;;;###autoload 320 | (defun org-pandoc-export-as-beamer (&optional a s v b e) 321 | "Export as beamer." 322 | (interactive) (org-pandoc-export 'beamer a s v b e t)) 323 | 324 | (defcustom org-pandoc-options-for-beamer-pdf nil 325 | "Pandoc options for beamer-pdf." 326 | :group 'org-pandoc 327 | :type org-pandoc-option-type) 328 | 329 | ;;;###autoload 330 | (defun org-pandoc-export-to-beamer-pdf (&optional a s v b e) 331 | "Export to beamer-pdf." 332 | (interactive) (org-pandoc-export 'beamer-pdf a s v b e)) 333 | 334 | ;;;###autoload 335 | (defun org-pandoc-export-to-beamer-pdf-and-open (&optional a s v b e) 336 | "Export to beamer-pdf and open." 337 | (interactive) (org-pandoc-export 'beamer-pdf a s v b e 0)) 338 | 339 | (defcustom org-pandoc-options-for-commonmark nil 340 | "Pandoc options for commonmark." 341 | :group 'org-pandoc 342 | :type org-pandoc-option-type) 343 | 344 | (defcustom org-pandoc-after-processing-commonmark-hook nil 345 | "Hook called after processing commonmark." 346 | :group 'org-pandoc 347 | :type 'hook) 348 | 349 | ;;;###autoload 350 | (defun org-pandoc-export-to-commonmark (&optional a s v b e) 351 | "Export to commonmark." 352 | (interactive) (org-pandoc-export 'commonmark a s v b e)) 353 | 354 | ;;;###autoload 355 | (defun org-pandoc-export-to-commonmark-and-open (&optional a s v b e) 356 | "Export to commonmark and open." 357 | (interactive) (org-pandoc-export 'commonmark a s v b e 0)) 358 | 359 | ;;;###autoload 360 | (defun org-pandoc-export-as-commonmark (&optional a s v b e) 361 | "Export as commonmark." 362 | (interactive) (org-pandoc-export 'commonmark a s v b e t)) 363 | 364 | (defcustom org-pandoc-options-for-context nil 365 | "Pandoc options for context." 366 | :group 'org-pandoc 367 | :type org-pandoc-option-type) 368 | 369 | (defcustom org-pandoc-after-processing-context-hook nil 370 | "Hook called after processing context." 371 | :group 'org-pandoc 372 | :type 'hook) 373 | 374 | ;;;###autoload 375 | (defun org-pandoc-export-to-context (&optional a s v b e) 376 | "Export to context." 377 | (interactive) (org-pandoc-export 'context a s v b e)) 378 | 379 | ;;;###autoload 380 | (defun org-pandoc-export-to-context-and-open (&optional a s v b e) 381 | "Export to context and open." 382 | (interactive) (org-pandoc-export 'context a s v b e 0)) 383 | 384 | ;;;###autoload 385 | (defun org-pandoc-export-as-context (&optional a s v b e) 386 | "Export as context." 387 | (interactive) (org-pandoc-export 'context a s v b e t)) 388 | 389 | (defcustom org-pandoc-options-for-context-pdf nil 390 | "Pandoc options for context-pdf." 391 | :group 'org-pandoc 392 | :type org-pandoc-option-type) 393 | 394 | ;;;###autoload 395 | (defun org-pandoc-export-to-context-pdf (&optional a s v b e) 396 | "Export to context-pdf." 397 | (interactive) (org-pandoc-export 'context-pdf a s v b e)) 398 | 399 | ;;;###autoload 400 | (defun org-pandoc-export-to-context-pdf-and-open (&optional a s v b e) 401 | "Export to context-pdf and open." 402 | (interactive) (org-pandoc-export 'context-pdf a s v b e 0)) 403 | 404 | (defcustom org-pandoc-options-for-docbook4 nil 405 | "Pandoc options for docbook4." 406 | :group 'org-pandoc 407 | :type org-pandoc-option-type) 408 | 409 | (defcustom org-pandoc-after-processing-docbook4-hook nil 410 | "Hook called after processing docbook4." 411 | :group 'org-pandoc 412 | :type 'hook) 413 | 414 | ;;;###autoload 415 | (defun org-pandoc-export-to-docbook4 (&optional a s v b e) 416 | "Export to docbook4." 417 | (interactive) (org-pandoc-export 'docbook4 a s v b e)) 418 | 419 | ;;;###autoload 420 | (defun org-pandoc-export-to-docbook4-and-open (&optional a s v b e) 421 | "Export to docbook4 and open." 422 | (interactive) (org-pandoc-export 'docbook4 a s v b e 0)) 423 | 424 | ;;;###autoload 425 | (defun org-pandoc-export-as-docbook4 (&optional a s v b e) 426 | "Export as docbook4." 427 | (interactive) (org-pandoc-export 'docbook4 a s v b e t)) 428 | 429 | (defcustom org-pandoc-options-for-docbook5 nil 430 | "Pandoc options for docbook5." 431 | :group 'org-pandoc 432 | :type org-pandoc-option-type) 433 | 434 | (defcustom org-pandoc-after-processing-docbook5-hook nil 435 | "Hook called after processing docbook5." 436 | :group 'org-pandoc 437 | :type 'hook) 438 | 439 | ;;;###autoload 440 | (defun org-pandoc-export-to-docbook5 (&optional a s v b e) 441 | "Export to docbook5." 442 | (interactive) (org-pandoc-export 'docbook5 a s v b e)) 443 | 444 | ;;;###autoload 445 | (defun org-pandoc-export-to-docbook5-and-open (&optional a s v b e) 446 | "Export to docbook5 and open." 447 | (interactive) (org-pandoc-export 'docbook5 a s v b e 0)) 448 | 449 | ;;;###autoload 450 | (defun org-pandoc-export-as-docbook5 (&optional a s v b e) 451 | "Export as docbook5." 452 | (interactive) (org-pandoc-export 'docbook5 a s v b e t)) 453 | 454 | (defcustom org-pandoc-options-for-docx nil 455 | "Pandoc options for docx." 456 | :group 'org-pandoc 457 | :type org-pandoc-option-type) 458 | 459 | ;;;###autoload 460 | (defun org-pandoc-export-to-docx (&optional a s v b e) 461 | "Export to docx." 462 | (interactive) (org-pandoc-export 'docx a s v b e)) 463 | 464 | ;;;###autoload 465 | (defun org-pandoc-export-to-docx-and-open (&optional a s v b e) 466 | "Export to docx and open." 467 | (interactive) (org-pandoc-export 'docx a s v b e 0)) 468 | 469 | (defcustom org-pandoc-options-for-dokuwiki nil 470 | "Pandoc options for dokuwiki." 471 | :group 'org-pandoc 472 | :type org-pandoc-option-type) 473 | 474 | (defcustom org-pandoc-after-processing-dokuwiki-hook nil 475 | "Hook called after processing dokuwiki." 476 | :group 'org-pandoc 477 | :type 'hook) 478 | 479 | ;;;###autoload 480 | (defun org-pandoc-export-to-dokuwiki (&optional a s v b e) 481 | "Export to dokuwiki." 482 | (interactive) (org-pandoc-export 'dokuwiki a s v b e)) 483 | 484 | ;;;###autoload 485 | (defun org-pandoc-export-to-dokuwiki-and-open (&optional a s v b e) 486 | "Export to dokuwiki and open." 487 | (interactive) (org-pandoc-export 'dokuwiki a s v b e 0)) 488 | 489 | ;;;###autoload 490 | (defun org-pandoc-export-as-dokuwiki (&optional a s v b e) 491 | "Export as dokuwiki." 492 | (interactive) (org-pandoc-export 'dokuwiki a s v b e t)) 493 | 494 | (defcustom org-pandoc-options-for-dzslides nil 495 | "Pandoc options for dzslides." 496 | :group 'org-pandoc 497 | :type org-pandoc-option-type) 498 | 499 | (defcustom org-pandoc-after-processing-dzslides-hook nil 500 | "Hook called after processing dzslides." 501 | :group 'org-pandoc 502 | :type 'hook) 503 | 504 | ;;;###autoload 505 | (defun org-pandoc-export-to-dzslides (&optional a s v b e) 506 | "Export to dzslides." 507 | (interactive) (org-pandoc-export 'dzslides a s v b e)) 508 | 509 | ;;;###autoload 510 | (defun org-pandoc-export-to-dzslides-and-open (&optional a s v b e) 511 | "Export to dzslides and open." 512 | (interactive) (org-pandoc-export 'dzslides a s v b e 0)) 513 | 514 | ;;;###autoload 515 | (defun org-pandoc-export-as-dzslides (&optional a s v b e) 516 | "Export as dzslides." 517 | (interactive) (org-pandoc-export 'dzslides a s v b e t)) 518 | 519 | (defcustom org-pandoc-options-for-epub2 nil 520 | "Pandoc options for epub2." 521 | :group 'org-pandoc 522 | :type org-pandoc-option-type) 523 | 524 | ;;;###autoload 525 | (defun org-pandoc-export-to-epub2 (&optional a s v b e) 526 | "Export to epub2." 527 | (interactive) (org-pandoc-export 'epub2 a s v b e)) 528 | 529 | ;;;###autoload 530 | (defun org-pandoc-export-to-epub2-and-open (&optional a s v b e) 531 | "Export to epub2 and open." 532 | (interactive) (org-pandoc-export 'epub2 a s v b e 0)) 533 | 534 | (defcustom org-pandoc-options-for-epub3 nil 535 | "Pandoc options for epub3." 536 | :group 'org-pandoc 537 | :type org-pandoc-option-type) 538 | 539 | ;;;###autoload 540 | (defun org-pandoc-export-to-epub3 (&optional a s v b e) 541 | "Export to epub3." 542 | (interactive) (org-pandoc-export 'epub3 a s v b e)) 543 | 544 | ;;;###autoload 545 | (defun org-pandoc-export-to-epub3-and-open (&optional a s v b e) 546 | "Export to epub3 and open." 547 | (interactive) (org-pandoc-export 'epub3 a s v b e 0)) 548 | 549 | (defcustom org-pandoc-options-for-fb2 nil 550 | "Pandoc options for fb2." 551 | :group 'org-pandoc 552 | :type org-pandoc-option-type) 553 | 554 | (defcustom org-pandoc-after-processing-fb2-hook nil 555 | "Hook called after processing fb2." 556 | :group 'org-pandoc 557 | :type 'hook) 558 | 559 | ;;;###autoload 560 | (defun org-pandoc-export-to-fb2 (&optional a s v b e) 561 | "Export to fb2." 562 | (interactive) (org-pandoc-export 'fb2 a s v b e)) 563 | 564 | ;;;###autoload 565 | (defun org-pandoc-export-to-fb2-and-open (&optional a s v b e) 566 | "Export to fb2 and open." 567 | (interactive) (org-pandoc-export 'fb2 a s v b e 0)) 568 | 569 | ;;;###autoload 570 | (defun org-pandoc-export-as-fb2 (&optional a s v b e) 571 | "Export as fb2." 572 | (interactive) (org-pandoc-export 'fb2 a s v b e t)) 573 | 574 | (defcustom org-pandoc-options-for-gfm nil 575 | "Pandoc options for gfm." 576 | :group 'org-pandoc 577 | :type org-pandoc-option-type) 578 | 579 | (defcustom org-pandoc-after-processing-gfm-hook nil 580 | "Hook called after processing gfm." 581 | :group 'org-pandoc 582 | :type 'hook) 583 | 584 | ;;;###autoload 585 | (defun org-pandoc-export-to-gfm (&optional a s v b e) 586 | "Export to gfm." 587 | (interactive) (org-pandoc-export 'gfm a s v b e)) 588 | 589 | ;;;###autoload 590 | (defun org-pandoc-export-to-gfm-and-open (&optional a s v b e) 591 | "Export to gfm and open." 592 | (interactive) (org-pandoc-export 'gfm a s v b e 0)) 593 | 594 | ;;;###autoload 595 | (defun org-pandoc-export-as-gfm (&optional a s v b e) 596 | "Export as gfm." 597 | (interactive) (org-pandoc-export 'gfm a s v b e t)) 598 | 599 | (defcustom org-pandoc-options-for-haddock nil 600 | "Pandoc options for haddock." 601 | :group 'org-pandoc 602 | :type org-pandoc-option-type) 603 | 604 | (defcustom org-pandoc-after-processing-haddock-hook nil 605 | "Hook called after processing haddock." 606 | :group 'org-pandoc 607 | :type 'hook) 608 | 609 | ;;;###autoload 610 | (defun org-pandoc-export-to-haddock (&optional a s v b e) 611 | "Export to haddock." 612 | (interactive) (org-pandoc-export 'haddock a s v b e)) 613 | 614 | ;;;###autoload 615 | (defun org-pandoc-export-to-haddock-and-open (&optional a s v b e) 616 | "Export to haddock and open." 617 | (interactive) (org-pandoc-export 'haddock a s v b e 0)) 618 | 619 | ;;;###autoload 620 | (defun org-pandoc-export-as-haddock (&optional a s v b e) 621 | "Export as haddock." 622 | (interactive) (org-pandoc-export 'haddock a s v b e t)) 623 | 624 | (defcustom org-pandoc-options-for-html4 nil 625 | "Pandoc options for html4." 626 | :group 'org-pandoc 627 | :type org-pandoc-option-type) 628 | 629 | (defcustom org-pandoc-after-processing-html4-hook nil 630 | "Hook called after processing html4." 631 | :group 'org-pandoc 632 | :type 'hook) 633 | 634 | ;;;###autoload 635 | (defun org-pandoc-export-to-html4 (&optional a s v b e) 636 | "Export to html4." 637 | (interactive) (org-pandoc-export 'html4 a s v b e)) 638 | 639 | ;;;###autoload 640 | (defun org-pandoc-export-to-html4-and-open (&optional a s v b e) 641 | "Export to html4 and open." 642 | (interactive) (org-pandoc-export 'html4 a s v b e 0)) 643 | 644 | ;;;###autoload 645 | (defun org-pandoc-export-as-html4 (&optional a s v b e) 646 | "Export as html4." 647 | (interactive) (org-pandoc-export 'html4 a s v b e t)) 648 | 649 | (defcustom org-pandoc-options-for-html5 nil 650 | "Pandoc options for html5." 651 | :group 'org-pandoc 652 | :type org-pandoc-option-type) 653 | 654 | (defcustom org-pandoc-after-processing-html5-hook nil 655 | "Hook called after processing html5." 656 | :group 'org-pandoc 657 | :type 'hook) 658 | 659 | ;;;###autoload 660 | (defun org-pandoc-export-to-html5 (&optional a s v b e) 661 | "Export to html5." 662 | (interactive) (org-pandoc-export 'html5 a s v b e)) 663 | 664 | ;;;###autoload 665 | (defun org-pandoc-export-to-html5-and-open (&optional a s v b e) 666 | "Export to html5 and open." 667 | (interactive) (org-pandoc-export 'html5 a s v b e 0)) 668 | 669 | ;;;###autoload 670 | (defun org-pandoc-export-as-html5 (&optional a s v b e) 671 | "Export as html5." 672 | (interactive) (org-pandoc-export 'html5 a s v b e t)) 673 | 674 | (defcustom org-pandoc-options-for-html5-pdf nil 675 | "Pandoc options for html5-pdf." 676 | :group 'org-pandoc 677 | :type org-pandoc-option-type) 678 | 679 | ;;;###autoload 680 | (defun org-pandoc-export-to-html5-pdf (&optional a s v b e) 681 | "Export to html5-pdf." 682 | (interactive) (org-pandoc-export 'html5-pdf a s v b e)) 683 | 684 | ;;;###autoload 685 | (defun org-pandoc-export-to-html5-pdf-and-open (&optional a s v b e) 686 | "Export to html5-pdf and open." 687 | (interactive) (org-pandoc-export 'html5-pdf a s v b e 0)) 688 | 689 | (defcustom org-pandoc-options-for-icml nil 690 | "Pandoc options for icml." 691 | :group 'org-pandoc 692 | :type org-pandoc-option-type) 693 | 694 | (defcustom org-pandoc-after-processing-icml-hook nil 695 | "Hook called after processing icml." 696 | :group 'org-pandoc 697 | :type 'hook) 698 | 699 | ;;;###autoload 700 | (defun org-pandoc-export-to-icml (&optional a s v b e) 701 | "Export to icml." 702 | (interactive) (org-pandoc-export 'icml a s v b e)) 703 | 704 | ;;;###autoload 705 | (defun org-pandoc-export-to-icml-and-open (&optional a s v b e) 706 | "Export to icml and open." 707 | (interactive) (org-pandoc-export 'icml a s v b e 0)) 708 | 709 | ;;;###autoload 710 | (defun org-pandoc-export-as-icml (&optional a s v b e) 711 | "Export as icml." 712 | (interactive) (org-pandoc-export 'icml a s v b e t)) 713 | 714 | (defcustom org-pandoc-options-for-jats nil 715 | "Pandoc options for jats." 716 | :group 'org-pandoc 717 | :type org-pandoc-option-type) 718 | 719 | (defcustom org-pandoc-after-processing-jats-hook nil 720 | "Hook called after processing jats." 721 | :group 'org-pandoc 722 | :type 'hook) 723 | 724 | ;;;###autoload 725 | (defun org-pandoc-export-to-jats (&optional a s v b e) 726 | "Export to jats." 727 | (interactive) (org-pandoc-export 'jats a s v b e)) 728 | 729 | ;;;###autoload 730 | (defun org-pandoc-export-to-jats-and-open (&optional a s v b e) 731 | "Export to jats and open." 732 | (interactive) (org-pandoc-export 'jats a s v b e 0)) 733 | 734 | ;;;###autoload 735 | (defun org-pandoc-export-as-jats (&optional a s v b e) 736 | "Export as jats." 737 | (interactive) (org-pandoc-export 'jats a s v b e t)) 738 | 739 | (defcustom org-pandoc-options-for-json nil 740 | "Pandoc options for json." 741 | :group 'org-pandoc 742 | :type org-pandoc-option-type) 743 | 744 | (defcustom org-pandoc-after-processing-json-hook nil 745 | "Hook called after processing json." 746 | :group 'org-pandoc 747 | :type 'hook) 748 | 749 | ;;;###autoload 750 | (defun org-pandoc-export-to-json (&optional a s v b e) 751 | "Export to json." 752 | (interactive) (org-pandoc-export 'json a s v b e)) 753 | 754 | ;;;###autoload 755 | (defun org-pandoc-export-to-json-and-open (&optional a s v b e) 756 | "Export to json and open." 757 | (interactive) (org-pandoc-export 'json a s v b e 0)) 758 | 759 | ;;;###autoload 760 | (defun org-pandoc-export-as-json (&optional a s v b e) 761 | "Export as json." 762 | (interactive) (org-pandoc-export 'json a s v b e t)) 763 | 764 | (defcustom org-pandoc-options-for-latex nil 765 | "Pandoc options for latex." 766 | :group 'org-pandoc 767 | :type org-pandoc-option-type) 768 | 769 | (defcustom org-pandoc-after-processing-latex-hook nil 770 | "Hook called after processing latex." 771 | :group 'org-pandoc 772 | :type 'hook) 773 | 774 | ;;;###autoload 775 | (defun org-pandoc-export-to-latex (&optional a s v b e) 776 | "Export to latex." 777 | (interactive) (org-pandoc-export 'latex a s v b e)) 778 | 779 | ;;;###autoload 780 | (defun org-pandoc-export-to-latex-and-open (&optional a s v b e) 781 | "Export to latex and open." 782 | (interactive) (org-pandoc-export 'latex a s v b e 0)) 783 | 784 | ;;;###autoload 785 | (defun org-pandoc-export-as-latex (&optional a s v b e) 786 | "Export as latex." 787 | (interactive) (org-pandoc-export 'latex a s v b e t)) 788 | 789 | (defcustom org-pandoc-options-for-latex-pdf nil 790 | "Pandoc options for latex-pdf." 791 | :group 'org-pandoc 792 | :type org-pandoc-option-type) 793 | 794 | ;;;###autoload 795 | (defun org-pandoc-export-to-latex-pdf (&optional a s v b e) 796 | "Export to latex-pdf." 797 | (interactive) (org-pandoc-export 'latex-pdf a s v b e)) 798 | 799 | ;;;###autoload 800 | (defun org-pandoc-export-to-latex-pdf-and-open (&optional a s v b e) 801 | "Export to latex-pdf and open." 802 | (interactive) (org-pandoc-export 'latex-pdf a s v b e 0)) 803 | 804 | (defcustom org-pandoc-options-for-man nil 805 | "Pandoc options for man." 806 | :group 'org-pandoc 807 | :type org-pandoc-option-type) 808 | 809 | (defcustom org-pandoc-after-processing-man-hook nil 810 | "Hook called after processing man." 811 | :group 'org-pandoc 812 | :type 'hook) 813 | 814 | ;;;###autoload 815 | (defun org-pandoc-export-to-man (&optional a s v b e) 816 | "Export to man." 817 | (interactive) (org-pandoc-export 'man a s v b e)) 818 | 819 | ;;;###autoload 820 | (defun org-pandoc-export-to-man-and-open (&optional a s v b e) 821 | "Export to man and open." 822 | (interactive) (org-pandoc-export 'man a s v b e 0)) 823 | 824 | ;;;###autoload 825 | (defun org-pandoc-export-as-man (&optional a s v b e) 826 | "Export as man." 827 | (interactive) (org-pandoc-export 'man a s v b e t)) 828 | 829 | (defcustom org-pandoc-options-for-markdown nil 830 | "Pandoc options for markdown." 831 | :group 'org-pandoc 832 | :type org-pandoc-option-type) 833 | 834 | (defcustom org-pandoc-after-processing-markdown-hook nil 835 | "Hook called after processing markdown." 836 | :group 'org-pandoc 837 | :type 'hook) 838 | 839 | ;;;###autoload 840 | (defun org-pandoc-export-to-markdown (&optional a s v b e) 841 | "Export to markdown." 842 | (interactive) (org-pandoc-export 'markdown a s v b e)) 843 | 844 | ;;;###autoload 845 | (defun org-pandoc-export-to-markdown-and-open (&optional a s v b e) 846 | "Export to markdown and open." 847 | (interactive) (org-pandoc-export 'markdown a s v b e 0)) 848 | 849 | ;;;###autoload 850 | (defun org-pandoc-export-as-markdown (&optional a s v b e) 851 | "Export as markdown." 852 | (interactive) (org-pandoc-export 'markdown a s v b e t)) 853 | 854 | (defcustom org-pandoc-options-for-markdown_mmd nil 855 | "Pandoc options for markdown_mmd." 856 | :group 'org-pandoc 857 | :type org-pandoc-option-type) 858 | 859 | (defcustom org-pandoc-after-processing-markdown_mmd-hook nil 860 | "Hook called after processing markdown_mmd." 861 | :group 'org-pandoc 862 | :type 'hook) 863 | 864 | ;;;###autoload 865 | (defun org-pandoc-export-to-markdown_mmd (&optional a s v b e) 866 | "Export to markdown_mmd." 867 | (interactive) (org-pandoc-export 'markdown_mmd a s v b e)) 868 | 869 | ;;;###autoload 870 | (defun org-pandoc-export-to-markdown_mmd-and-open (&optional a s v b e) 871 | "Export to markdown_mmd and open." 872 | (interactive) (org-pandoc-export 'markdown_mmd a s v b e 0)) 873 | 874 | ;;;###autoload 875 | (defun org-pandoc-export-as-markdown_mmd (&optional a s v b e) 876 | "Export as markdown_mmd." 877 | (interactive) (org-pandoc-export 'markdown_mmd a s v b e t)) 878 | 879 | (defcustom org-pandoc-options-for-markdown_phpextra nil 880 | "Pandoc options for markdown_phpextra." 881 | :group 'org-pandoc 882 | :type org-pandoc-option-type) 883 | 884 | (defcustom org-pandoc-after-processing-markdown_phpextra-hook nil 885 | "Hook called after processing markdown_phpextra." 886 | :group 'org-pandoc 887 | :type 'hook) 888 | 889 | ;;;###autoload 890 | (defun org-pandoc-export-to-markdown_phpextra (&optional a s v b e) 891 | "Export to markdown_phpextra." 892 | (interactive) (org-pandoc-export 'markdown_phpextra a s v b e)) 893 | 894 | ;;;###autoload 895 | (defun org-pandoc-export-to-markdown_phpextra-and-open (&optional a s v b e) 896 | "Export to markdown_phpextra and open." 897 | (interactive) (org-pandoc-export 'markdown_phpextra a s v b e 0)) 898 | 899 | ;;;###autoload 900 | (defun org-pandoc-export-as-markdown_phpextra (&optional a s v b e) 901 | "Export as markdown_phpextra." 902 | (interactive) (org-pandoc-export 'markdown_phpextra a s v b e t)) 903 | 904 | (defcustom org-pandoc-options-for-markdown_strict nil 905 | "Pandoc options for markdown_strict." 906 | :group 'org-pandoc 907 | :type org-pandoc-option-type) 908 | 909 | (defcustom org-pandoc-after-processing-markdown_strict-hook nil 910 | "Hook called after processing markdown_strict." 911 | :group 'org-pandoc 912 | :type 'hook) 913 | 914 | ;;;###autoload 915 | (defun org-pandoc-export-to-markdown_strict (&optional a s v b e) 916 | "Export to markdown_strict." 917 | (interactive) (org-pandoc-export 'markdown_strict a s v b e)) 918 | 919 | ;;;###autoload 920 | (defun org-pandoc-export-to-markdown_strict-and-open (&optional a s v b e) 921 | "Export to markdown_strict and open." 922 | (interactive) (org-pandoc-export 'markdown_strict a s v b e 0)) 923 | 924 | ;;;###autoload 925 | (defun org-pandoc-export-as-markdown_strict (&optional a s v b e) 926 | "Export as markdown_strict." 927 | (interactive) (org-pandoc-export 'markdown_strict a s v b e t)) 928 | 929 | (defcustom org-pandoc-options-for-mediawiki nil 930 | "Pandoc options for mediawiki." 931 | :group 'org-pandoc 932 | :type org-pandoc-option-type) 933 | 934 | (defcustom org-pandoc-after-processing-mediawiki-hook nil 935 | "Hook called after processing mediawiki." 936 | :group 'org-pandoc 937 | :type 'hook) 938 | 939 | ;;;###autoload 940 | (defun org-pandoc-export-to-mediawiki (&optional a s v b e) 941 | "Export to mediawiki." 942 | (interactive) (org-pandoc-export 'mediawiki a s v b e)) 943 | 944 | ;;;###autoload 945 | (defun org-pandoc-export-to-mediawiki-and-open (&optional a s v b e) 946 | "Export to mediawiki and open." 947 | (interactive) (org-pandoc-export 'mediawiki a s v b e 0)) 948 | 949 | ;;;###autoload 950 | (defun org-pandoc-export-as-mediawiki (&optional a s v b e) 951 | "Export as mediawiki." 952 | (interactive) (org-pandoc-export 'mediawiki a s v b e t)) 953 | 954 | (defcustom org-pandoc-options-for-ms nil 955 | "Pandoc options for ms." 956 | :group 'org-pandoc 957 | :type org-pandoc-option-type) 958 | 959 | (defcustom org-pandoc-after-processing-ms-hook nil 960 | "Hook called after processing ms." 961 | :group 'org-pandoc 962 | :type 'hook) 963 | 964 | ;;;###autoload 965 | (defun org-pandoc-export-to-ms (&optional a s v b e) 966 | "Export to ms." 967 | (interactive) (org-pandoc-export 'ms a s v b e)) 968 | 969 | ;;;###autoload 970 | (defun org-pandoc-export-to-ms-and-open (&optional a s v b e) 971 | "Export to ms and open." 972 | (interactive) (org-pandoc-export 'ms a s v b e 0)) 973 | 974 | ;;;###autoload 975 | (defun org-pandoc-export-as-ms (&optional a s v b e) 976 | "Export as ms." 977 | (interactive) (org-pandoc-export 'ms a s v b e t)) 978 | 979 | (defcustom org-pandoc-options-for-ms-pdf nil 980 | "Pandoc options for ms-pdf." 981 | :group 'org-pandoc 982 | :type org-pandoc-option-type) 983 | 984 | ;;;###autoload 985 | (defun org-pandoc-export-to-ms-pdf (&optional a s v b e) 986 | "Export to ms-pdf." 987 | (interactive) (org-pandoc-export 'ms-pdf a s v b e)) 988 | 989 | ;;;###autoload 990 | (defun org-pandoc-export-to-ms-pdf-and-open (&optional a s v b e) 991 | "Export to ms-pdf and open." 992 | (interactive) (org-pandoc-export 'ms-pdf a s v b e 0)) 993 | 994 | (defcustom org-pandoc-options-for-muse nil 995 | "Pandoc options for muse." 996 | :group 'org-pandoc 997 | :type org-pandoc-option-type) 998 | 999 | (defcustom org-pandoc-after-processing-muse-hook nil 1000 | "Hook called after processing muse." 1001 | :group 'org-pandoc 1002 | :type 'hook) 1003 | 1004 | ;;;###autoload 1005 | (defun org-pandoc-export-to-muse (&optional a s v b e) 1006 | "Export to muse." 1007 | (interactive) (org-pandoc-export 'muse a s v b e)) 1008 | 1009 | ;;;###autoload 1010 | (defun org-pandoc-export-to-muse-and-open (&optional a s v b e) 1011 | "Export to muse and open." 1012 | (interactive) (org-pandoc-export 'muse a s v b e 0)) 1013 | 1014 | ;;;###autoload 1015 | (defun org-pandoc-export-as-muse (&optional a s v b e) 1016 | "Export as muse." 1017 | (interactive) (org-pandoc-export 'muse a s v b e t)) 1018 | 1019 | (defcustom org-pandoc-options-for-native nil 1020 | "Pandoc options for native." 1021 | :group 'org-pandoc 1022 | :type org-pandoc-option-type) 1023 | 1024 | (defcustom org-pandoc-after-processing-native-hook nil 1025 | "Hook called after processing native." 1026 | :group 'org-pandoc 1027 | :type 'hook) 1028 | 1029 | ;;;###autoload 1030 | (defun org-pandoc-export-to-native (&optional a s v b e) 1031 | "Export to native." 1032 | (interactive) (org-pandoc-export 'native a s v b e)) 1033 | 1034 | ;;;###autoload 1035 | (defun org-pandoc-export-to-native-and-open (&optional a s v b e) 1036 | "Export to native and open." 1037 | (interactive) (org-pandoc-export 'native a s v b e 0)) 1038 | 1039 | ;;;###autoload 1040 | (defun org-pandoc-export-as-native (&optional a s v b e) 1041 | "Export as native." 1042 | (interactive) (org-pandoc-export 'native a s v b e t)) 1043 | 1044 | (defcustom org-pandoc-options-for-odt nil 1045 | "Pandoc options for odt." 1046 | :group 'org-pandoc 1047 | :type org-pandoc-option-type) 1048 | 1049 | ;;;###autoload 1050 | (defun org-pandoc-export-to-odt (&optional a s v b e) 1051 | "Export to odt." 1052 | (interactive) (org-pandoc-export 'odt a s v b e)) 1053 | 1054 | ;;;###autoload 1055 | (defun org-pandoc-export-to-odt-and-open (&optional a s v b e) 1056 | "Export to odt and open." 1057 | (interactive) (org-pandoc-export 'odt a s v b e 0)) 1058 | 1059 | (defcustom org-pandoc-options-for-opendocument nil 1060 | "Pandoc options for opendocument." 1061 | :group 'org-pandoc 1062 | :type org-pandoc-option-type) 1063 | 1064 | (defcustom org-pandoc-after-processing-opendocument-hook nil 1065 | "Hook called after processing opendocument." 1066 | :group 'org-pandoc 1067 | :type 'hook) 1068 | 1069 | ;;;###autoload 1070 | (defun org-pandoc-export-to-opendocument (&optional a s v b e) 1071 | "Export to opendocument." 1072 | (interactive) (org-pandoc-export 'opendocument a s v b e)) 1073 | 1074 | ;;;###autoload 1075 | (defun org-pandoc-export-to-opendocument-and-open (&optional a s v b e) 1076 | "Export to opendocument and open." 1077 | (interactive) (org-pandoc-export 'opendocument a s v b e 0)) 1078 | 1079 | ;;;###autoload 1080 | (defun org-pandoc-export-as-opendocument (&optional a s v b e) 1081 | "Export as opendocument." 1082 | (interactive) (org-pandoc-export 'opendocument a s v b e t)) 1083 | 1084 | (defcustom org-pandoc-options-for-opml nil 1085 | "Pandoc options for opml." 1086 | :group 'org-pandoc 1087 | :type org-pandoc-option-type) 1088 | 1089 | (defcustom org-pandoc-after-processing-opml-hook nil 1090 | "Hook called after processing opml." 1091 | :group 'org-pandoc 1092 | :type 'hook) 1093 | 1094 | ;;;###autoload 1095 | (defun org-pandoc-export-to-opml (&optional a s v b e) 1096 | "Export to opml." 1097 | (interactive) (org-pandoc-export 'opml a s v b e)) 1098 | 1099 | ;;;###autoload 1100 | (defun org-pandoc-export-to-opml-and-open (&optional a s v b e) 1101 | "Export to opml and open." 1102 | (interactive) (org-pandoc-export 'opml a s v b e 0)) 1103 | 1104 | ;;;###autoload 1105 | (defun org-pandoc-export-as-opml (&optional a s v b e) 1106 | "Export as opml." 1107 | (interactive) (org-pandoc-export 'opml a s v b e t)) 1108 | 1109 | (defcustom org-pandoc-options-for-org nil 1110 | "Pandoc options for org." 1111 | :group 'org-pandoc 1112 | :type org-pandoc-option-type) 1113 | 1114 | (defcustom org-pandoc-after-processing-org-hook nil 1115 | "Hook called after processing org." 1116 | :group 'org-pandoc 1117 | :type 'hook) 1118 | 1119 | ;;;###autoload 1120 | (defun org-pandoc-export-to-org (&optional a s v b e) 1121 | "Export to org." 1122 | (interactive) (org-pandoc-export 'org a s v b e)) 1123 | 1124 | ;;;###autoload 1125 | (defun org-pandoc-export-to-org-and-open (&optional a s v b e) 1126 | "Export to org and open." 1127 | (interactive) (org-pandoc-export 'org a s v b e 0)) 1128 | 1129 | ;;;###autoload 1130 | (defun org-pandoc-export-as-org (&optional a s v b e) 1131 | "Export as org." 1132 | (interactive) (org-pandoc-export 'org a s v b e t)) 1133 | 1134 | (defcustom org-pandoc-options-for-plain nil 1135 | "Pandoc options for plain." 1136 | :group 'org-pandoc 1137 | :type org-pandoc-option-type) 1138 | 1139 | (defcustom org-pandoc-after-processing-plain-hook nil 1140 | "Hook called after processing plain." 1141 | :group 'org-pandoc 1142 | :type 'hook) 1143 | 1144 | ;;;###autoload 1145 | (defun org-pandoc-export-to-plain (&optional a s v b e) 1146 | "Export to plain." 1147 | (interactive) (org-pandoc-export 'plain a s v b e)) 1148 | 1149 | ;;;###autoload 1150 | (defun org-pandoc-export-to-plain-and-open (&optional a s v b e) 1151 | "Export to plain and open." 1152 | (interactive) (org-pandoc-export 'plain a s v b e 0)) 1153 | 1154 | ;;;###autoload 1155 | (defun org-pandoc-export-as-plain (&optional a s v b e) 1156 | "Export as plain." 1157 | (interactive) (org-pandoc-export 'plain a s v b e t)) 1158 | 1159 | (defcustom org-pandoc-options-for-pptx nil 1160 | "Pandoc options for pptx." 1161 | :group 'org-pandoc 1162 | :type org-pandoc-option-type) 1163 | 1164 | ;;;###autoload 1165 | (defun org-pandoc-export-to-pptx (&optional a s v b e) 1166 | "Export to pptx." 1167 | (interactive) (org-pandoc-export 'pptx a s v b e)) 1168 | 1169 | ;;;###autoload 1170 | (defun org-pandoc-export-to-pptx-and-open (&optional a s v b e) 1171 | "Export to pptx and open." 1172 | (interactive) (org-pandoc-export 'pptx a s v b e 0)) 1173 | 1174 | (defcustom org-pandoc-options-for-revealjs nil 1175 | "Pandoc options for revealjs." 1176 | :group 'org-pandoc 1177 | :type org-pandoc-option-type) 1178 | 1179 | (defcustom org-pandoc-after-processing-revealjs-hook nil 1180 | "Hook called after processing revealjs." 1181 | :group 'org-pandoc 1182 | :type 'hook) 1183 | 1184 | ;;;###autoload 1185 | (defun org-pandoc-export-to-revealjs (&optional a s v b e) 1186 | "Export to revealjs." 1187 | (interactive) (org-pandoc-export 'revealjs a s v b e)) 1188 | 1189 | ;;;###autoload 1190 | (defun org-pandoc-export-to-revealjs-and-open (&optional a s v b e) 1191 | "Export to revealjs and open." 1192 | (interactive) (org-pandoc-export 'revealjs a s v b e 0)) 1193 | 1194 | ;;;###autoload 1195 | (defun org-pandoc-export-as-revealjs (&optional a s v b e) 1196 | "Export as revealjs." 1197 | (interactive) (org-pandoc-export 'revealjs a s v b e t)) 1198 | 1199 | (defcustom org-pandoc-options-for-rst nil 1200 | "Pandoc options for rst." 1201 | :group 'org-pandoc 1202 | :type org-pandoc-option-type) 1203 | 1204 | (defcustom org-pandoc-after-processing-rst-hook nil 1205 | "Hook called after processing rst." 1206 | :group 'org-pandoc 1207 | :type 'hook) 1208 | 1209 | ;;;###autoload 1210 | (defun org-pandoc-export-to-rst (&optional a s v b e) 1211 | "Export to rst." 1212 | (interactive) (org-pandoc-export 'rst a s v b e)) 1213 | 1214 | ;;;###autoload 1215 | (defun org-pandoc-export-to-rst-and-open (&optional a s v b e) 1216 | "Export to rst and open." 1217 | (interactive) (org-pandoc-export 'rst a s v b e 0)) 1218 | 1219 | ;;;###autoload 1220 | (defun org-pandoc-export-as-rst (&optional a s v b e) 1221 | "Export as rst." 1222 | (interactive) (org-pandoc-export 'rst a s v b e t)) 1223 | 1224 | (defcustom org-pandoc-options-for-rtf nil 1225 | "Pandoc options for rtf." 1226 | :group 'org-pandoc 1227 | :type org-pandoc-option-type) 1228 | 1229 | (defcustom org-pandoc-after-processing-rtf-hook nil 1230 | "Hook called after processing rtf." 1231 | :group 'org-pandoc 1232 | :type 'hook) 1233 | 1234 | ;;;###autoload 1235 | (defun org-pandoc-export-to-rtf (&optional a s v b e) 1236 | "Export to rtf." 1237 | (interactive) (org-pandoc-export 'rtf a s v b e)) 1238 | 1239 | ;;;###autoload 1240 | (defun org-pandoc-export-to-rtf-and-open (&optional a s v b e) 1241 | "Export to rtf and open." 1242 | (interactive) (org-pandoc-export 'rtf a s v b e 0)) 1243 | 1244 | ;;;###autoload 1245 | (defun org-pandoc-export-as-rtf (&optional a s v b e) 1246 | "Export as rtf." 1247 | (interactive) (org-pandoc-export 'rtf a s v b e t)) 1248 | 1249 | (defcustom org-pandoc-options-for-s5 nil 1250 | "Pandoc options for s5." 1251 | :group 'org-pandoc 1252 | :type org-pandoc-option-type) 1253 | 1254 | (defcustom org-pandoc-after-processing-s5-hook nil 1255 | "Hook called after processing s5." 1256 | :group 'org-pandoc 1257 | :type 'hook) 1258 | 1259 | ;;;###autoload 1260 | (defun org-pandoc-export-to-s5 (&optional a s v b e) 1261 | "Export to s5." 1262 | (interactive) (org-pandoc-export 's5 a s v b e)) 1263 | 1264 | ;;;###autoload 1265 | (defun org-pandoc-export-to-s5-and-open (&optional a s v b e) 1266 | "Export to s5 and open." 1267 | (interactive) (org-pandoc-export 's5 a s v b e 0)) 1268 | 1269 | ;;;###autoload 1270 | (defun org-pandoc-export-as-s5 (&optional a s v b e) 1271 | "Export as s5." 1272 | (interactive) (org-pandoc-export 's5 a s v b e t)) 1273 | 1274 | (defcustom org-pandoc-options-for-slideous nil 1275 | "Pandoc options for slideous." 1276 | :group 'org-pandoc 1277 | :type org-pandoc-option-type) 1278 | 1279 | (defcustom org-pandoc-after-processing-slideous-hook nil 1280 | "Hook called after processing slideous." 1281 | :group 'org-pandoc 1282 | :type 'hook) 1283 | 1284 | ;;;###autoload 1285 | (defun org-pandoc-export-to-slideous (&optional a s v b e) 1286 | "Export to slideous." 1287 | (interactive) (org-pandoc-export 'slideous a s v b e)) 1288 | 1289 | ;;;###autoload 1290 | (defun org-pandoc-export-to-slideous-and-open (&optional a s v b e) 1291 | "Export to slideous and open." 1292 | (interactive) (org-pandoc-export 'slideous a s v b e 0)) 1293 | 1294 | ;;;###autoload 1295 | (defun org-pandoc-export-as-slideous (&optional a s v b e) 1296 | "Export as slideous." 1297 | (interactive) (org-pandoc-export 'slideous a s v b e t)) 1298 | 1299 | (defcustom org-pandoc-options-for-slidy nil 1300 | "Pandoc options for slidy." 1301 | :group 'org-pandoc 1302 | :type org-pandoc-option-type) 1303 | 1304 | (defcustom org-pandoc-after-processing-slidy-hook nil 1305 | "Hook called after processing slidy." 1306 | :group 'org-pandoc 1307 | :type 'hook) 1308 | 1309 | ;;;###autoload 1310 | (defun org-pandoc-export-to-slidy (&optional a s v b e) 1311 | "Export to slidy." 1312 | (interactive) (org-pandoc-export 'slidy a s v b e)) 1313 | 1314 | ;;;###autoload 1315 | (defun org-pandoc-export-to-slidy-and-open (&optional a s v b e) 1316 | "Export to slidy and open." 1317 | (interactive) (org-pandoc-export 'slidy a s v b e 0)) 1318 | 1319 | ;;;###autoload 1320 | (defun org-pandoc-export-as-slidy (&optional a s v b e) 1321 | "Export as slidy." 1322 | (interactive) (org-pandoc-export 'slidy a s v b e t)) 1323 | 1324 | (defcustom org-pandoc-options-for-tei nil 1325 | "Pandoc options for tei." 1326 | :group 'org-pandoc 1327 | :type org-pandoc-option-type) 1328 | 1329 | (defcustom org-pandoc-after-processing-tei-hook nil 1330 | "Hook called after processing tei." 1331 | :group 'org-pandoc 1332 | :type 'hook) 1333 | 1334 | ;;;###autoload 1335 | (defun org-pandoc-export-to-tei (&optional a s v b e) 1336 | "Export to tei." 1337 | (interactive) (org-pandoc-export 'tei a s v b e)) 1338 | 1339 | ;;;###autoload 1340 | (defun org-pandoc-export-to-tei-and-open (&optional a s v b e) 1341 | "Export to tei and open." 1342 | (interactive) (org-pandoc-export 'tei a s v b e 0)) 1343 | 1344 | ;;;###autoload 1345 | (defun org-pandoc-export-as-tei (&optional a s v b e) 1346 | "Export as tei." 1347 | (interactive) (org-pandoc-export 'tei a s v b e t)) 1348 | 1349 | (defcustom org-pandoc-options-for-texinfo nil 1350 | "Pandoc options for texinfo." 1351 | :group 'org-pandoc 1352 | :type org-pandoc-option-type) 1353 | 1354 | (defcustom org-pandoc-after-processing-texinfo-hook nil 1355 | "Hook called after processing texinfo." 1356 | :group 'org-pandoc 1357 | :type 'hook) 1358 | 1359 | ;;;###autoload 1360 | (defun org-pandoc-export-to-texinfo (&optional a s v b e) 1361 | "Export to texinfo." 1362 | (interactive) (org-pandoc-export 'texinfo a s v b e)) 1363 | 1364 | ;;;###autoload 1365 | (defun org-pandoc-export-to-texinfo-and-open (&optional a s v b e) 1366 | "Export to texinfo and open." 1367 | (interactive) (org-pandoc-export 'texinfo a s v b e 0)) 1368 | 1369 | ;;;###autoload 1370 | (defun org-pandoc-export-as-texinfo (&optional a s v b e) 1371 | "Export as texinfo." 1372 | (interactive) (org-pandoc-export 'texinfo a s v b e t)) 1373 | 1374 | (defcustom org-pandoc-options-for-textile nil 1375 | "Pandoc options for textile." 1376 | :group 'org-pandoc 1377 | :type org-pandoc-option-type) 1378 | 1379 | (defcustom org-pandoc-after-processing-textile-hook nil 1380 | "Hook called after processing textile." 1381 | :group 'org-pandoc 1382 | :type 'hook) 1383 | 1384 | ;;;###autoload 1385 | (defun org-pandoc-export-to-textile (&optional a s v b e) 1386 | "Export to textile." 1387 | (interactive) (org-pandoc-export 'textile a s v b e)) 1388 | 1389 | ;;;###autoload 1390 | (defun org-pandoc-export-to-textile-and-open (&optional a s v b e) 1391 | "Export to textile and open." 1392 | (interactive) (org-pandoc-export 'textile a s v b e 0)) 1393 | 1394 | ;;;###autoload 1395 | (defun org-pandoc-export-as-textile (&optional a s v b e) 1396 | "Export as textile." 1397 | (interactive) (org-pandoc-export 'textile a s v b e t)) 1398 | 1399 | (defcustom org-pandoc-options-for-zimwiki nil 1400 | "Pandoc options for zimwiki." 1401 | :group 'org-pandoc 1402 | :type org-pandoc-option-type) 1403 | 1404 | (defcustom org-pandoc-after-processing-zimwiki-hook nil 1405 | "Hook called after processing zimwiki." 1406 | :group 'org-pandoc 1407 | :type 'hook) 1408 | 1409 | ;;;###autoload 1410 | (defun org-pandoc-export-to-zimwiki (&optional a s v b e) 1411 | "Export to zimwiki." 1412 | (interactive) (org-pandoc-export 'zimwiki a s v b e)) 1413 | 1414 | ;;;###autoload 1415 | (defun org-pandoc-export-to-zimwiki-and-open (&optional a s v b e) 1416 | "Export to zimwiki and open." 1417 | (interactive) (org-pandoc-export 'zimwiki a s v b e 0)) 1418 | 1419 | ;;;###autoload 1420 | (defun org-pandoc-export-as-zimwiki (&optional a s v b e) 1421 | "Export as zimwiki." 1422 | (interactive) (org-pandoc-export 'zimwiki a s v b e t)) 1423 | 1424 | 1425 | ;;; ox-pandoc main routine 1426 | 1427 | (defvar org-pandoc-format nil) 1428 | (defvar org-pandoc-option-table nil) 1429 | (defvar org-pandoc-format-extensions-str nil) 1430 | (defvar org-pandoc-epub-meta nil) 1431 | (defvar org-pandoc-epub-css nil) 1432 | 1433 | (defun org-pandoc-export (format a s v b e &optional buf-or-open) 1434 | "General interface for Pandoc Export. 1435 | If BUF-OR-OPEN is nil, output to file. 0, then open the file. 1436 | t means output to buffer." 1437 | (unless (equal major-mode 'org-mode) 1438 | (error "You must run this command in org-mode.")) 1439 | (unless (executable-find org-pandoc-command) 1440 | (error "Pandoc (version 1.12.4 or later) can not be found.")) 1441 | (setq org-pandoc-format format) 1442 | (org-export-to-file 'pandoc (org-export-output-file-name 1443 | (concat (make-temp-name ".tmp") ".org") s) 1444 | a s v b e (lambda (f) (org-pandoc-run-to-buffer-or-file f format s buf-or-open)))) 1445 | 1446 | (defun org-pandoc--has-caption-p (element _info) 1447 | "Non-nil when ELEMENT has a caption affiliated keyword. 1448 | INFO is a plist used as a communication channel. This function 1449 | is meant to be used as a predicate for `org-export-get-ordinal'." 1450 | (org-element-property :caption element)) 1451 | 1452 | (defun org-pandoc-set-caption-title (element info fmt pred) 1453 | "Manually sets a numbered leader for the caption. 1454 | Works around a bug in pandoc (present in at least up-to and 1455 | including pandoc 1.18) which doesn't number things like Tables 1456 | and Figures. ELEMENT is the org-mode element. INFO is a plist 1457 | holding contextual information. FMT is the format of the caption 1458 | label, e.g., \"Table %d:\", or \"Figure %d:\". PRED is a 1459 | predicate function used by org-mode to keep track of 1460 | table/figure/etc. numbers." 1461 | (let* ((caption (org-element-property :caption element)) 1462 | (name (org-element-property :name element)) 1463 | (name-target (when name (concat "<<" name ">>")))) 1464 | ;; caption is, e.g. "(((#("Testing table" 0 13 (:parent #8)))))" 1465 | ;; name is a link target, e.g., tab:test-table 1466 | ;; (cl-caaar caption) is then, e.g., "Testing table" 1467 | ;; name-target would be, e.g., "<>" 1468 | (when caption 1469 | (if (member org-pandoc-format '(beamer beamer-pdf latex latex-pdf)) 1470 | (push name-target (caar caption)) 1471 | ;; Get sequence number of current src-block among every 1472 | ;; src-block with a caption. Additionally translate the caption 1473 | ;; label into the local language. 1474 | (let* ((reference (org-export-get-ordinal element info nil pred)) 1475 | (title-fmt (org-export-translate fmt :utf-8 info)) 1476 | (new-name-target (concat (format title-fmt reference) " " name-target))) 1477 | ;; Set the text of the caption to have, e.g., 'Table : 1478 | ;; ' prepended. Also add a target for any hyperlinks to this 1479 | ;; table. Pandoc doesn't pick up #+LABEL: or #+NAME: elements. 1480 | (push new-name-target (caar caption))))))) 1481 | 1482 | (defun org-pandoc--numbered-equation-p (element _info) 1483 | "Non-nil when ELEMENT is a numbered latex equation environment. 1484 | INFO is a plist used as a communication channel. This function 1485 | is meant to be used as a predicate for `org-export-get-ordinal'." 1486 | (let ((raw-value (org-element-property :value element)) 1487 | (case-fold-search t)) 1488 | (string-match-p 1489 | (rx "\\begin{" 1490 | (group-n 1 (or "align" "alignat" "eqnarray" "equation" 1491 | "flalign" "gather" "multline")) 1492 | "}" (*? anything) 1493 | "\\end{" (backref 1) "}" ) 1494 | raw-value))) 1495 | 1496 | (defun org-pandoc-latex-environ (latex-env contents info) 1497 | "Transcode a latex environment for export with pandoc. 1498 | Works around a bug in 1499 | pandoc (https://github.com/jgm/pandoc/issues/1764, present in at 1500 | least up-to and including pandoc 1.18) to surround an AMSMath 1501 | latex environment in BLOB with plain TeX equation block 1502 | delimiters, '$$ .. $$' in order for pandoc to properly recognise 1503 | the maths environment as a latex equation. Also adds surrounding 1504 | line-breaks so that pandoc treats the math environment as its own 1505 | paragraph. This avoids having text before or after the math 1506 | environment ending up on the same line as the equation. 1507 | Additionally, adds a fake equation number if the environment 1508 | should have one. CONTENTS is its contents, as a string or nil. 1509 | INFO is a plist holding contextual information." 1510 | (let ((raw-value (org-export-expand latex-env contents t)) 1511 | (case-fold-search t) 1512 | (replacement-str "\n$$\\1$$") 1513 | (output nil)) 1514 | ;; If we're exporting to a TeX-based format, there's no need for 1515 | ;; this hack 1516 | (if (member org-pandoc-format '(beamer beamer-pdf latex latex-pdf)) 1517 | raw-value 1518 | ;; Otherwise, add '$$' elements before and after the block to get 1519 | ;; pandoc to process it. 1520 | ;; 1521 | ;; For numbered equation environments, we need to fake the 1522 | ;; equation numbering before sending it to pandoc. Fake equation 1523 | ;; numbers are typeset as "(%d)", offset from the main equation by 1524 | ;; a "\qquad" space, ala pandoc-crossref 1525 | ;; (https://github.com/lierdakil/pandoc-crossref) 1526 | (when (org-pandoc--numbered-equation-p latex-env info) 1527 | (let ((reference (org-export-get-ordinal 1528 | latex-env info nil 1529 | #'org-pandoc--numbered-equation-p))) 1530 | (setq replacement-str 1531 | (format "\n$$\\1 \\\\qquad (%d)$$" reference)))) 1532 | 1533 | ;; For equations with a named links target (`#+NAME:' block), add 1534 | ;; the target to the top of the equation 1535 | (let ((name (org-element-property :name latex-env))) 1536 | (when name 1537 | (setq replacement-str 1538 | (concat "\n<<" name ">>" replacement-str)))) 1539 | 1540 | ;; Add '$$' elements before and after the block to get pandoc to 1541 | ;; process it. 1542 | (setq output 1543 | (replace-regexp-in-string 1544 | (rx (group-n 1 "\\begin{" 1545 | (group-n 2 (or "align" "alignat" "eqnarray" 1546 | "equation" "flalign" "gather" 1547 | "multline") 1548 | (zero-or-one "*" )) 1549 | "}" (*? anything) 1550 | "\\end{" (backref 2) "}" )) 1551 | replacement-str 1552 | raw-value)) 1553 | 1554 | ;; If we've added the '$$' delimiters, then also set the 1555 | ;; :post-blank property to add a blank line after this current 1556 | ;; latex equation environment 1557 | (let ((post-blank (org-element-property :post-blank latex-env))) 1558 | (unless (or (>= post-blank 1) (string-equal raw-value output)) 1559 | (org-element-put-property latex-env :post-blank 1))) 1560 | 1561 | ;; Return the latex equation with '$$' delimiters and possible 1562 | ;; (faked) equation numbering. 1563 | output))) 1564 | 1565 | (defun org-pandoc-link (link contents info) 1566 | "Transcode LINK object using the registered formatter for the 1567 | 'pandoc backend. If none exists, transcode using the registered 1568 | formatter for the 'org export backend. For fuzzy (internal) 1569 | links, resolve the link destination in order to determine the 1570 | appropriate reference number of the target Table/Figure/Equation 1571 | etc. CONTENTS is the description of the link, as a string, or 1572 | nil. INFO is a plist holding contextual information." 1573 | (let ((type (org-element-property :type link))) 1574 | (cond 1575 | ;; Try exporting with a registered formatter for 'pandoc 1576 | ((org-export-custom-protocol-maybe link contents 'pandoc)) 1577 | ;; Try exporting with a registered formatter for 'org 1578 | ((org-export-custom-protocol-maybe link contents 'org)) 1579 | 1580 | ;; Otherwise, override fuzzy (internal) links that point to 1581 | ;; numbered items such as Tables, Figures, Sections, etc. 1582 | ((string= type "fuzzy") 1583 | (let* ((path (org-element-property :path link)) 1584 | (destination (org-export-resolve-fuzzy-link link info)) 1585 | (dest-type (when destination (org-element-type destination))) 1586 | (number nil)) 1587 | ;; Different link targets require different predicates to the 1588 | ;; `org-export-get-ordinal' function in order to resolve to 1589 | ;; the correct number. NOTE: Should be the same predicate 1590 | ;; function as used to generate the number in the 1591 | ;; caption/label/listing etc. 1592 | (cond 1593 | ((eq dest-type 'paragraph) ; possible figure 1594 | (setq number (org-export-get-ordinal 1595 | destination info nil #'org-html-standalone-image-p))) 1596 | 1597 | ((eq dest-type 'latex-environment) 1598 | (setq number (org-export-get-ordinal 1599 | destination info nil #'org-pandoc--numbered-equation-p))) 1600 | 1601 | (t ; captioned items 1602 | (setq number (org-export-get-ordinal 1603 | destination info nil #'org-pandoc--has-caption-p)))) 1604 | 1605 | ;; Numbered items have the number listed in the link 1606 | ;; description, , fall back on the text in `contents' 1607 | ;; if there's no resolvable destination 1608 | (cond 1609 | ;; Numbered items have the number listed in the link description 1610 | (number 1611 | (format "[[#%s][%s]]" path 1612 | (if (atom number) (number-to-string number) 1613 | (mapconcat #'number-to-string number ".")))) 1614 | 1615 | ;; Unnumbered headlines have the heading name in the link 1616 | ;; description 1617 | ((eq dest-type 'headline) 1618 | (format "[[#%s][%s]]" path 1619 | (org-export-data 1620 | (org-element-property :title destination) info))) 1621 | 1622 | ;; No resolvable destination, fallback on the text in `contents' 1623 | ((eq destination nil) 1624 | (when (org-string-nw-p contents) contents)) 1625 | 1626 | ;; Valid destination, but without a numbered caption/equation 1627 | ;; and not a heading, fallback to standard org-mode link format 1628 | (t 1629 | (org-element-link-interpreter link contents)) 1630 | ))) 1631 | 1632 | ;; Otherwise, fallback to standard org-mode link format 1633 | ((org-element-link-interpreter link contents))))) 1634 | 1635 | (defun org-pandoc-table (table contents info) 1636 | "Transcode a TABLE element from Org to Pandoc. 1637 | CONTENTS is the contents of the table. INFO is a plist holding 1638 | contextual information." 1639 | (org-pandoc-set-caption-title table info "Table %d:" 1640 | #'org-pandoc--has-caption-p) 1641 | ;; Export the table with it's modified caption 1642 | (org-export-expand table contents t)) 1643 | 1644 | (defun org-pandoc-template (contents info) 1645 | "Template processor for CONTENTS and INFO. 1646 | Option table is created in this stage." 1647 | (setq org-pandoc-option-table (make-hash-table)) 1648 | ;; default options 1649 | (org-pandoc-put-options org-pandoc-options) 1650 | (org-pandoc-put-options 1651 | (symbol-value (intern (format "org-pandoc-options-for-%s" org-pandoc-format)))) 1652 | ;; file options 1653 | (-when-let (pandoc-options (plist-get info :pandoc-options)) 1654 | (org-pandoc-put-options 1655 | (--map (let* ((_match (string-match "^\\([^:]+\\):\\(.+\\)$" it)) 1656 | (name (intern (match-string 1 it))) 1657 | (value (match-string 2 it))) 1658 | (cons name value)) 1659 | (split-string-and-unquote pandoc-options)))) 1660 | (setq org-pandoc-format-extensions-str 1661 | (mapcar 'symbol-name org-pandoc-format-extensions)) 1662 | (-when-let (pandoc-extensions (plist-get info :pandoc-extensions)) 1663 | (dolist (extension (split-string pandoc-extensions)) 1664 | (push extension org-pandoc-format-extensions-str))) 1665 | (setq org-pandoc-epub-css (plist-get info :epub-css)) 1666 | (setq org-pandoc-epub-meta 1667 | (or (plist-get info :epub-meta) 1668 | (concat 1669 | (-when-let (epub-rights (or (plist-get info :epub-rights) 1670 | org-pandoc-epub-rights)) 1671 | (concat "" (url-insert-entities-in-string 1672 | epub-rights) "\n")) 1673 | (-when-let (description (plist-get info :description)) 1674 | (concat "" description "\n")) 1675 | (-when-let (keywords (plist-get info :keywords)) 1676 | (concat "" keywords "\n"))))) 1677 | (org-pandoc-put-options 1678 | (--mapcat (-when-let (val (plist-get info (cdr it))) 1679 | (list (cons (car it) (split-string-and-unquote val)))) 1680 | '((metadata . :pandoc-metadata) 1681 | (variable . :pandoc-variables)))) 1682 | (org-pandoc-put-options 1683 | (--mapcat (-when-let (val (plist-get info (cdr it))) 1684 | (list (cons (car it) (split-string val "\n")))) 1685 | '((epub-embed-font . :epub-embed-font) 1686 | (epub-chapter-level . :epub-chapter-level) 1687 | (epub-cover-image . :epub-cover-image) 1688 | (epub-stylesheet . :epub-stylesheet) 1689 | (bibliography . :bibliography)))) 1690 | ;; 'ox-pandoc' is derived from 'ox-org'. If 'ox-org' defines its own 1691 | ;; template, then this template function (org-pandoc-template) calls 1692 | ;; original ox-org template at the end. 1693 | (let ((org-template 1694 | (cdr (assoc 'template 1695 | (org-export-get-all-transcoders 'org))))) 1696 | (if org-template 1697 | (funcall org-template contents info) 1698 | contents))) 1699 | 1700 | (defun org-pandoc-paragraph (paragraph contents info) 1701 | "Transcode a PARAGRAPH element from Org to Pandoc. 1702 | CONTENTS is the contents of the paragraph, as a string. INFO is 1703 | the plist used as a communication channel." 1704 | (when (org-html-standalone-image-p paragraph info) 1705 | ;; Standalone image. 1706 | (org-pandoc-set-caption-title paragraph info "Figure %d:" 1707 | #'org-html-standalone-image-p)) 1708 | ;; Export the paragraph verbatim. Like `org-org-identity', but also 1709 | ;; preserves #+ATTR_* tags in the output. 1710 | (org-export-expand paragraph contents t)) 1711 | 1712 | (defun org-pandoc-src-block (src-block contents info) 1713 | "Transcode a SRC-BLOCK element from Org to Pandoc. 1714 | CONTENTS is the contents of the table. INFO is a plist holding 1715 | contextual information." 1716 | (org-pandoc-set-caption-title src-block info "Listing %d:" 1717 | #'org-pandoc--has-caption-p) 1718 | ;; Export the src-block with it's modified caption 1719 | (org-export-expand src-block contents t)) 1720 | 1721 | (defun org-pandoc-identity (blob contents _info) 1722 | "Transcode BLOB element or object back into Org syntax. 1723 | CONTENTS is its contents, as a string or nil. INFO is ignored. 1724 | Like `org-org-identity', but also preserves #+ATTR_* tags in the 1725 | output." 1726 | (org-export-expand blob contents t)) 1727 | 1728 | (defun org-pandoc-put-options (options) 1729 | "Put alist OPTIONS to `org-pandoc-option-table'." 1730 | (dolist (option options) 1731 | (let* ((name (car option)) 1732 | (value (cdr option)) 1733 | (values 1734 | (cond ((not (memq name org-pandoc-valid-options)) 1735 | (error "Org-Pandoc: Improper Option Name! %s" name)) 1736 | ((equal "t" value) t) 1737 | ((equal "nil" value) nil) 1738 | ((listp value) value) 1739 | ((memq name org-pandoc-colon-separated-options) 1740 | (split-string value ":")) 1741 | (t (list value))))) 1742 | (if (memq name org-pandoc-file-options) 1743 | (setq values 1744 | (--map (if (file-exists-p it) 1745 | (if (= ?~ (string-to-char it)) (expand-file-name it) it) 1746 | (error "File (%s) can not be found" it)) values))) 1747 | (puthash name values org-pandoc-option-table)))) 1748 | 1749 | (defun org-pandoc-run-to-buffer-or-file 1750 | (input-file format subtreep &optional buffer-or-open) 1751 | "Run pandoc to convert on org INPUT-FILE or buffer to FORMAT with SUBTREEP. 1752 | 1753 | If BUFFER-OR-OPEN is t then target is current buffer. If nil, target is file. 1754 | If 0, target is file and converted file will automatically be opend." 1755 | (let* ((pdf-p (string-match "-pdf$" (symbol-name format))) 1756 | (output-file 1757 | (unless (equal t buffer-or-open) 1758 | (org-export-output-file-name 1759 | (concat "." 1760 | (if pdf-p "pdf" 1761 | (symbol-name 1762 | (or (assoc-default format org-pandoc-extensions) 1763 | format)))) 1764 | subtreep))) 1765 | (local-hook-symbol (intern (format "org-pandoc-after-processing-%s-hook" 1766 | format))) 1767 | css-temp-file meta-temp-file) 1768 | ;; convert format "XXX-pdf" to "XXX" 1769 | (when pdf-p (setq format (intern (substring (symbol-name format) 0 -4)))) 1770 | ;; special treatment for epub2/epub3 1771 | (when (or (equal org-pandoc-format 'epub2) 1772 | (equal org-pandoc-format 'epub3)) 1773 | (when org-pandoc-epub-css 1774 | (setq css-temp-file (make-temp-file "org-pandoc" nil ".css")) 1775 | (puthash 'epub-stylesheet 1776 | (append (gethash 'epub-stylesheet org-pandoc-option-table) 1777 | (list css-temp-file)) 1778 | org-pandoc-option-table) 1779 | (with-temp-file css-temp-file 1780 | (insert org-pandoc-epub-css))) 1781 | (when org-pandoc-epub-meta 1782 | (setq meta-temp-file (make-temp-file "org-pandoc" nil ".xml")) 1783 | (org-pandoc-put-options `((epub-metadata ,meta-temp-file))) 1784 | (with-temp-file meta-temp-file 1785 | (insert org-pandoc-epub-meta)))) 1786 | (let ((process 1787 | (org-pandoc-run input-file output-file format 1788 | 'org-pandoc-sentinel org-pandoc-option-table))) 1789 | (process-put process 'files (list input-file meta-temp-file css-temp-file)) 1790 | (process-put process 'output-file output-file) 1791 | (process-put process 'local-hook-symbol local-hook-symbol) 1792 | (process-put process 'buffer-or-open buffer-or-open)))) 1793 | 1794 | (defun org-pandoc-sentinel (process message) 1795 | "PROCESS sentinel with MESSAGE." 1796 | (message "debug :: sentinel enter!") 1797 | (cl-case (process-status process) 1798 | (run) 1799 | (signal 1800 | ;; Warning. Temporary files not removed (for now.) 1801 | (display-warning 'ox-pandoc (format "Signal Received. %s" message))) 1802 | (exit 1803 | (dolist (file (process-get process 'files)) 1804 | (if (and file (file-exists-p file)) (delete-file file))) 1805 | (let ((exit-status (process-exit-status process)) 1806 | (buffer (process-buffer process)) 1807 | (output-file (process-get process 'output-file)) 1808 | (local-hook-symbol (process-get process 'local-hook-symbol)) 1809 | (buffer-or-open (process-get process 'buffer-or-open))) 1810 | (if (/= exit-status 0) 1811 | (message "Error occured. \n%s" 1812 | (with-current-buffer buffer (buffer-string))) 1813 | (if output-file 1814 | (progn 1815 | (kill-buffer buffer) 1816 | (message "Exported to %s." output-file) 1817 | (if (and (boundp local-hook-symbol) 1818 | (symbol-value local-hook-symbol)) 1819 | (with-temp-file output-file 1820 | (insert-file-contents output-file) 1821 | (run-hooks local-hook-symbol))) 1822 | (when (equal 0 buffer-or-open) 1823 | (org-open-file output-file))) 1824 | ;; output to buffer 1825 | (pop-to-buffer buffer) 1826 | (run-hooks local-hook-symbol) 1827 | (set-auto-mode))))))) 1828 | 1829 | (defun org-pandoc-run (input-file output-file format sentinel &optional options) 1830 | "Run pandoc command with INPUT-FILE (org), OUTPUT-FILE, FORMAT and OPTIONS. 1831 | If BUFFER-OR-FILE is buffer, then output to specified buffer. 1832 | OPTIONS is a hashtable. It runs asynchronously." 1833 | (let* ((format (symbol-name format)) 1834 | (output-format 1835 | (car (--filter (string-prefix-p format it) 1836 | org-pandoc-format-extensions-str))) 1837 | (args 1838 | `("-f" "org" 1839 | "-t" ,(or output-format format) 1840 | ,@(and output-file 1841 | (list "-o" (expand-file-name output-file))) 1842 | ,@(-mapcat (lambda (key) 1843 | (-when-let (vals (gethash key options)) 1844 | (if (equal vals t) (setq vals (list t))) 1845 | (--map (concat "--" (symbol-name key) 1846 | (when (not (equal it t)) (format "=%s" it))) 1847 | vals))) 1848 | (ht-keys options)) 1849 | ,(expand-file-name input-file)))) 1850 | (message "Running pandoc with args: %s" args) 1851 | (let ((process 1852 | (apply 'start-process 1853 | `("pandoc" ,(generate-new-buffer "*Pandoc*") 1854 | ,org-pandoc-command ,@args)))) 1855 | (set-process-sentinel process sentinel) 1856 | process))) 1857 | 1858 | (defun org-pandoc-startup-check () 1859 | "Check the current pandoc version." 1860 | (interactive) 1861 | (if (not (executable-find org-pandoc-command)) 1862 | (display-warning 'ox-pandoc "Pandoc command is not installed.") 1863 | (let ((version (with-temp-buffer 1864 | (call-process org-pandoc-command nil t nil "-v") 1865 | (buffer-string)))) 1866 | (if (not (string-match "^pandoc.*? \\([0-9]+\\)\\.\\([0-9]+\\)" version)) 1867 | (display-warning 'ox-pandoc "Pandoc version number can not be retrieved.") 1868 | (let ((major (string-to-number (match-string 1 version))) 1869 | (_minor (string-to-number (match-string 2 version)))) 1870 | (unless (or (< 1 major) 1871 | ;;(and (= 1 major) 1872 | ;; (< 12 minor)) 1873 | ) 1874 | (display-warning 'ox-pandoc "This Pandoc (1.x) may not support new pandoc features."))))))) 1875 | 1876 | (org-pandoc-startup-check) 1877 | 1878 | (provide 'ox-pandoc) 1879 | 1880 | ;;; ox-pandoc.el ends here 1881 | 1882 | ;; Local Variables: 1883 | ;; time-stamp-pattern: "10/Version:\\\\?[ \t]+1.%02y%02m%02d\\\\?\n" 1884 | ;; End: 1885 | --------------------------------------------------------------------------------