Skip to main content

CriticMarkdup parser with optional pandoc backend

Project description

Author:

Kolen Cheung

Date:
March 11, 2018

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.

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:

---
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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pancritic-0.1.tar.gz (9.2 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page