Hot answers tagged

5

Figured it out myself. Turns out with the latest pandoc and pandoc-crossref you can do this: #+CAPTION: Google NGrams Viewer Searches #+LABEL: fig:ngrams [[file:ngrams.png]] Then: Please refer to [@fig:ngrams].


3

You can also use org-ref. Then you can use ref:ngrams to reference a figure. This works well with LaTeX export. It probably works with pandoc too.


3

Download the Emacs source from a GNU mirror and unpack it with tar xf. Run makeinfo --docbook doc/emacs/emacs.texi -o emacs.docbook to create an intermediate DocBook. Run pandoc --from docbook --to org --out emacs.org emacs.docbook to create your org file. Note that you really should add the document types explicitly, at least for the input type. Otherwise ...


2

If you don't mind using a shell script to accomplish what you want, you can try: pandoc -t org file.md | sed -E "/^[[:space:]]+:/ d" > file.org This will remove all lines starting with one (or more) spaces followed by a semicolon. I believe you can fit it into your script by doing the following: function pandoc2org () { basename=${1%%.*} ...


2

From the solution linked to by ista (direct link to the solution), you can create a pandoc filter, say in file nodivs-filter.hs import Text.Pandoc.JSON main = toJSONFilter nodivs where nodivs (Div _ bs) = bs nodivs b = [b] You then compile the filter with ghc: ghc nodivs-filter.hs. Finally, you use the filter when converting, as follows:...


2

You can try to implement a function like this: (defun pandoc-md2html () "Compile markdown file to HTML, using pandoc." (interactive) (when buffer-file-name (message "Pandoc markdown to HTML compilation...") (shell-command (concat "pandoc" " -o " (concat (file-name-base) ".html") " " ...


1

This works for me. (defface pandoc-citation-face '((t :foreground "yellow")) "Face for pandoc citation syntax") (font-lock-add-keywords nil '(("\\[@.+?\\]" 0 'pandoc-citation-face)))


1

...only keep what's important to remember... This doesn't answer your question directly, but it suggests some alternatives you might want to consider. If you use library Info+ then you can easily create a virtual manual of nodes you want "save". In Info mode: . (Info-save-current-node) adds the name of the current node to the list value of option Info-...


1

The markdown exported in org is generic: it does not handle the many flavors that are extant. You are probably better off using pandoc to do conversions to markdown: pandoc -r org -w markdown_github foo.org > foo.md You can find what formats pandoc supports with the --list-input-formats and --list-output-formats options.


1

This happens as ox-pandoc tries to work around some of pandoc's missing org-mode features by first exporting via the org-mode org exporter and calling pandoc on the result. The org exporter discards all non-org snippets. I'm not aware of any way to prevent this; calling pandoc directly is probably the only option.


1

You can replace those blocks like this: (replace-regexp (rx (optional "\n") "#+BEGIN_HTML" (minimal-match (1+ anything)) "#+END_HTML" (optional "\n")) "")


Only top voted, non community-wiki answers of a minimum length are eligible