CriticMarkdup parser with optional pandoc backend
Project description
- Date:
- March 11, 2018
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.
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
test.md is modified from MMD-Test-Suite/Critic.text at master · fletcher/MMD-Test-Suite
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
File details
Details for the file pancritic-0.1.tar.gz
.
File metadata
- Download URL: pancritic-0.1.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79c7e6b68ee82dfde23d3506f1df2860257f0997639b5ebdb2caab29fc1bf281 |
|
MD5 | 0c30e74359f43231ed4d522e01de7cf7 |
|
BLAKE2b-256 | f31aedb7a87e537aaaa53dd85e0c6e246815faca4f44e646f97328f30fcf26fa |