pandoc-quotes
is a filter for Pandoc that replaces
plain, that is, non-typographic, quotation marks with typographic ones.
You can define which typographic quotation marks to replace plain ones with
by setting either a document's quotation-marks
, quotation-language
,
or lang
metadata field. Typically, it should "just work".
See the manual page for more details.
If you are using Pandoc 2.0 or newer, you will want to use pandoc-quotes.lua instead; it's easier to install and faster.
pandoc
represents documents as abstract syntax trees, and quotations are
nodes in that tree. However, pandoc-quotes
replaces those nodes with the
content of the quotation, adding proper quotation marks. Put another way,
pandoc-quotes
pushes quotations from the syntax of a document's
representation into its semantics. As a consequence, pandoc
will no longer
recognise quotes. Also, filters running after pandoc-quotes
won't either.
Therefore, you should not use pandoc-quotes
with output formats that
represent quotes syntactically (e.g., HTML, LaTeX, ConTexT). Also, it should
be the last or one of the last filters you apply.
You use pandoc-quotes
at your own risk. You have been warned.
You need Python 2.7 or newer, panflute, and PyYAML.
Simply run:
pip install pandoc_quotes
This will try to install pandoc-quotes
manual page, but this
will only work on a limited number of systems.
Alternatively, you can also download the source for the current version.
Simply run:
curl https://codeload.github.com/odkr/pandoc-quotes/tar.gz/v0.6.0 | tar -xz cd pandoc-quotes-0.6.0 python setup.py install
See the manual page and the source for details.
If there's something wrong with pandoc-quotes
, open an issue.
Copyright 2018 Odin Kroeger
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.