.. This README is auto-generated from `docs/README.md`. Do not edit this file directly.

==============================
Using CriticMarkup with pandoc
==============================

:Author: Kolen Cheung
:Date:   March 11, 2018

.. contents::
   :depth: 3
..

|Build Status| |GitHub Releases| |PyPI version| |Development Status|
|Python version| |License| |Coveralls|

Using CriticMarkup with pandoc. It serves both as a wrapper and a
pre-processor.

Definition of CriticMarkup
==========================

-  Deletions: This is {–is –}a test.
-  Additions: This {++is ++}a test.
-  Substitutions: This {~:sub:`isn’t`>is~~} a test.
-  Highlighting: This is a {==test==}.
-  Comments: This is a test{>>What is a test for?<<}.

Usage: pancritic as a markdown wrapper (including but not limited to pandoc)
============================================================================

TODO

Advanced Usage: pancritic as a pandoc preprocessor
--------------------------------------------------

TODO

Caveats
=======

Nesting CriticMarkup might have unexpected behavior, especially in LaTeX
output. See `the caveats section in the spec of
CriticMarkup <http://criticmarkup.com/spec.php#caveats>`__.

LaTeX Ouptut
------------

Note that the LaTeX output requires the LaTeX packages ``color`` and
``soul``.

One can achieve this by either using a custom template or
``--include-in-header`` option. Or you can use the trick of putting the
following in your YAML front matter, like this file:

.. code:: yaml

    ---
    fontfamily: lmodern,color,soul
    ...

Markdown within the CriticMarkup will not be rendered in LaTeX output.
If you want to change this behavior, you can take a look at: `LaTeX
Argument
Parser <https://gist.github.com/mpickering/f1718fcdc4c56273ed52>`__.

.. table:: Translation from CriticMarkup to LaTeX.

   +----------------------------+-------------------------------------+
   | CriticMarkup               | LaTeX                               |
   +============================+=====================================+
   | ``{--[text]--}``           | ``\st{[text]}``                     |
   +----------------------------+-------------------------------------+
   | ``{++[text]++}``           | ``\underline{[text]}``              |
   +----------------------------+-------------------------------------+
   | ``{~~[text1]~>[text2]~~}`` | ``\st{[text1]}\underline{[text2]}`` |
   +----------------------------+-------------------------------------+
   | ``{==[text]==}``           | ``\hl{[text]}``                     |
   +----------------------------+-------------------------------------+
   | ``{>>[text]<<}``           | ``\marginpar{[text]}``              |
   +----------------------------+-------------------------------------+

Credits
=======

-  Heavily modified from `CriticMarkup Toolkit’s
   criticParser_CLI.py <http://criticmarkup.com/services.php>`__
-  `test.md <test.md>`__ is modified from `MMD-Test-Suite/Critic.text at
   master ·
   fletcher/MMD-Test-Suite <https://github.com/fletcher/MMD-Test-Suite/blob/master/CriticMarkup/Critic.text>`__

.. |Build Status| image:: https://travis-ci.org/ickc/pancritic.svg?branch=master
   :target: https://travis-ci.org/ickc/pancritic
.. |GitHub Releases| image:: https://img.shields.io/github/tag/ickc/pancritic.svg?label=github+release
   :target: https://github.com/ickc/pancritic/releases
.. |PyPI version| image:: https://img.shields.io/pypi/v/pancritic.svg
   :target: https://pypi.python.org/pypi/pancritic/
.. |Development Status| image:: https://img.shields.io/pypi/status/pancritic.svg
   :target: https://pypi.python.org/pypi/pancritic/
.. |Python version| image:: https://img.shields.io/pypi/pyversions/pancritic.svg
   :target: https://pypi.python.org/pypi/pancritic/
.. |License| image:: https://img.shields.io/pypi/l/pancritic.svg
.. |Coveralls| image:: https://img.shields.io/coveralls/ickc/pancritic.svg
   :target: https://coveralls.io/github/ickc/pancritic
