Skip to content

Commit

Permalink
fix: #2
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Sprevak committed May 25, 2015
1 parent d7e54e2 commit 5f5dc90
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 16 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ styledef:
numbersections: true
fontsize: 12pt
commandline:
smart: true
columns: "`75`"
filter:
- run: deemph.py
Expand All @@ -58,6 +57,7 @@ Installation
- [pandoc](http://johnmacfarlane.net/pandoc/index.html)
- [Python 3](https://www.python.org/downloads/)
- [setuptools for Python3](http://stackoverflow.com/questions/14426491/python-3-importerror-no-module-named-setuptools) (included in some Python 3 distributions)
*To upgrade an existing installation:*
Expand Down Expand Up @@ -133,7 +133,7 @@ Notes:
numbersections: true
fontsize: 12pt
commandline:
smart: true
no-wrap: true
filter:
- run: deemph.py
postflight:
Expand All @@ -150,7 +150,7 @@ style: Notes
...
```

it would run pandoc with filter `deemph.py` and command line option `--smart` on the following input and then execute `latexmk.py`.
it would run pandoc with filter `deemph.py` and command line option `--no-wrap` on the following input and then execute `latexmk.py`.

``` yaml
---
Expand Down Expand Up @@ -252,20 +252,20 @@ Arbitrary pandoc command line options can be set using metadata via `commandline

`commandline` contains one field for each pandoc command line option. The field name is the unabbreviated name of the relevant pandoc command line option (e.g. `standalone`).

- For pandoc flags, the value should be boolean (`true`, `false`), e.g. `smart: true`.
- For pandoc flags, the value should be boolean (`true`, `false`), e.g. `no-wrap: true`.
- For pandoc key-values, the value should be a quoted inline code span, e.g. `` include-in-header: "`path/to/my/header`" ``.

`false` plays a special role. `false` means that the pandoc command line option with the field's name, if set, should be unset. `false` can be used for both flags and key-value options (e.g. `include-in-header: false`).

Example:

commandline:
smart: true
no-wrap: true
slide-level: "`3`"
no-wrap: false
number-sections: false
include-in-header: false

This passes the following options to pandoc `--smart --slide-level=3` and removes any `--no-wrap` and `--include-in-header=...` options.
This passes the following options to pandoc `--no-wrap --slide-level=3` and removes any `--number-sections` and `--include-in-header=...` options.

These pandoc command line options cannot be set via `commandline`:

Expand All @@ -276,6 +276,9 @@ These pandoc command line options cannot be set via `commandline`:
- `filter`
- `template`
- `output`
- `help`
- `version`
- *pandoc reader options* -- fix in progress

Passing messages to external processes
======================================
Expand Down
24 changes: 15 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ panzer user guide
=================

:Author: Mark Sprevak
:Date: 24 May 2015
:Date: 25 May 2015

panzer
======
Expand Down Expand Up @@ -59,7 +59,6 @@ Styles can also be defined locally inside the document:
numbersections: true
fontsize: 12pt
commandline:
smart: true
columns: "`75`"
filter:
- run: deemph.py
Expand All @@ -85,6 +84,9 @@ Installation

- `pandoc <http://johnmacfarlane.net/pandoc/index.html>`__
- `Python 3 <https://www.python.org/downloads/>`__
- `setuptools for
Python3 <http://stackoverflow.com/questions/14426491/python-3-importerror-no-module-named-setuptools>`__
(included in some Python 3 distributions)

*To upgrade an existing installation:*

Expand Down Expand Up @@ -202,7 +204,7 @@ Example:
numbersections: true
fontsize: 12pt
commandline:
smart: true
no-wrap: true
filter:
- run: deemph.py
postflight:
Expand All @@ -220,7 +222,7 @@ selected,
...
it would run pandoc with filter ``deemph.py`` and command line option
``--smart`` on the following input and then execute ``latexmk.py``.
``--no-wrap`` on the following input and then execute ``latexmk.py``.

.. code:: yaml
Expand Down Expand Up @@ -377,7 +379,7 @@ The field name is the unabbreviated name of the relevant pandoc command
line option (e.g. ``standalone``).

- For pandoc flags, the value should be boolean (``true``, ``false``),
e.g. ``smart: true``.
e.g. ``no-wrap: true``.
- For pandoc key-values, the value should be a quoted inline code span,
e.g. ``include-in-header: "`path/to/my/header`"``.

Expand All @@ -391,13 +393,14 @@ Example:
::

commandline:
smart: true
no-wrap: true
slide-level: "`3`"
no-wrap: false
number-sections: false
include-in-header: false

This passes the following options to pandoc ``--smart --slide-level=3``
and removes any ``--no-wrap`` and ``--include-in-header=...`` options.
This passes the following options to pandoc
``--no-wrap --slide-level=3`` and removes any ``--number-sections`` and
``--include-in-header=...`` options.

These pandoc command line options cannot be set via ``commandline``:

Expand All @@ -408,6 +411,9 @@ These pandoc command line options cannot be set via ``commandline``:
- ``filter``
- ``template``
- ``output``
- ``help``
- ``version``
- *pandoc reader options* -- fix in progress

Passing messages to external processes
======================================
Expand Down

0 comments on commit 5f5dc90

Please sign in to comment.