pandoc-interface-yaml

Export markdown or other files via Pandoc using YAML front-matter

akstuhl

207

1

1.4.2

MIT

GitHub

This package consumes the following services:

A file converter with in-document settings

Quickly export markdown or other text files in Atom to Word, PDF, or any other format supported by Pandoc. pandoc-interface-yaml is derived from pandoc-convert-plus. The main differences in this package are:

Installation

On Mac:

> brew install pandoc
> apm install pandoc-interface-yaml

See the Pandoc site for other installation methods.

Usage

Add any of these optional keys to a document's front-matter prior to running Pandoc Interface > Export (available in the right-click contextual menu, Packages menu, or command palette):

For example, the start of file draft.md might look like:

---
export-path: 'blog-post.html'
export-format: 'html5'
export-options: '--filter=pandoc-citeproc'
title: 'A Well-Evidenced Screed'
bibliography: library.bib
csl: chicago-note-bibliography-with-ibid.csl
---

As has been well established...

Package settings

The rest of this readme is from pandoc-convert-plus:


A plugin for the Atom text editor to unleash the full power of Pandoc, and quickly convert your documents in style

pandoc-convert-plus is a fork of the pandoc-convert plugin for Atom that gives more flexibility to the user, by allowing them to invoke pandoc with additional arguments.

The original pandoc-convert plugin allowed a user to quickly use pandoc to convert their documents to many different formats with the Ctrl + P command in atom.

However, pandoc-convert had one limitation : it didn't allow users to use a set of arguments with the pandoc command that the plugin executed.

With pandoc-convert-plus, you can now use any arguments that you want with pandoc. This allows you to customize how pandoc will convert your document.

Is there a particular syntax for the arguments ?

No ! Just add them like you would in a Pandoc command through a terminal/command prompt.

Here is an example of some arguments to use a bibliography file, to remove the label of figures, and to use the xelatex engine to generate .pdf files :

--citeproc --bibliography=C:/User/Bibliography/Bibliography_file.bib -fmarkdown-implicit_figures --pdf-engine=xelatex

⚠️ Be careful about spaces and special characters in the file paths present in your arguments. They might lead to issues with Pandoc.

Some examples of useful arguments to use with pandoc-convert-plus

Bibliography

Do you have a single bibliography database that you use in many markdown (.md) notes ?

If that's so, you can use pandoc-convert-plus to automatically use the citeproc plugin of pandoc along with a .bib file containing your bibliography for all of your conversions.

Here is an example of the arguments that you might use to that end :

--citeproc --bibliography=C:/User/Bibliography/Bibliography_file.bib

Removing the label of figures

Just use -fmarkdown-implicit_figures, et voila !

Using another pdf engine

For example, you can use xelatex with the argument --pdf-engine=xelatex.

Other arguments

Pandoc have an incredible number of options, allowing you to use LaTeX templates among many other things. If you want to know more, just check the manual of Pandoc.

Other infomations about the plugin

Since pandoc-convert-plus is just a tiny modification of the original pandoc-convert, please check the repository page of pandoc-convert for more information about its functioning.