-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
349 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
<!--This README is auto-generated from `docs/README.md`. Do not edit this file directly.--> | ||
|
||
[![Build | ||
Status](https://travis-ci.org/ickc/pancritic.svg?branch=master)](https://travis-ci.org/ickc/pancritic) | ||
[![GitHub | ||
Releases](https://img.shields.io/github/tag/ickc/pancritic.svg?label=github+release)](https://github.com/ickc/pancritic/releases) | ||
[![PyPI | ||
version](https://img.shields.io/pypi/v/pancritic.svg)](https://pypi.python.org/pypi/pancritic/) | ||
[![Development | ||
Status](https://img.shields.io/pypi/status/pancritic.svg)](https://pypi.python.org/pypi/pancritic/) | ||
[![Python | ||
version](https://img.shields.io/pypi/pyversions/pancritic.svg)](https://pypi.python.org/pypi/pancritic/) | ||
<!-- [![Downloads](https://img.shields.io/pypi/dm/pancritic.svg)](https://pypi.python.org/pypi/pancritic/) --> | ||
![License](https://img.shields.io/pypi/l/pancritic.svg) | ||
[![Coveralls](https://img.shields.io/coveralls/ickc/pancritic.svg)](https://coveralls.io/github/ickc/pancritic) | ||
<!-- [![Scrutinizer](https://img.shields.io/scrutinizer/g/ickc/pancritic.svg)](https://scrutinizer-ci.com/g/ickc/pancritic/) --> | ||
|
||
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</sub>\>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: | ||
|
||
``` 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). | ||
|
||
| CriticMarkup | LaTeX | | ||
| ------------------------ | --------------------------------- | | ||
| `{--[text]--}` | `\st{[text]}` | | ||
| `{++[text]++}` | `\underline{[text]}` | | ||
| `{~~[text1]~>[text2]~~}` | `\st{[text1]}\underline{[text2]}` | | ||
| `{==[text]==}` | `\hl{[text]}` | | ||
| `{>>[text]<<}` | `\marginpar{[text]}` | | ||
|
||
Translation from CriticMarkup to LaTeX. | ||
|
||
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
.. 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang=""> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="generator" content="pandoc" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" /> | ||
<meta name="author" content="Kolen Cheung" /> | ||
<meta name="dcterms.date" content="2018-03-11" /> | ||
<title>Using CriticMarkup with pandoc</title> | ||
<style type="text/css"> | ||
code{white-space: pre-wrap;} | ||
span.smallcaps{font-variant: small-caps;} | ||
span.underline{text-decoration: underline;} | ||
div.column{display: inline-block; vertical-align: top; width: 50%;} | ||
</style> | ||
<style type="text/css"> | ||
a.sourceLine { display: inline-block; line-height: 1.25; } | ||
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; } | ||
a.sourceLine:empty { height: 1.2em; position: absolute; } | ||
.sourceCode { overflow: visible; } | ||
code.sourceCode { white-space: pre; position: relative; } | ||
div.sourceCode { margin: 1em 0; } | ||
pre.sourceCode { margin: 0; } | ||
@media screen { | ||
div.sourceCode { overflow: auto; } | ||
} | ||
@media print { | ||
code.sourceCode { white-space: pre-wrap; } | ||
a.sourceLine { text-indent: -1em; padding-left: 1em; } | ||
} | ||
pre.numberSource a.sourceLine | ||
{ position: relative; } | ||
pre.numberSource a.sourceLine:empty | ||
{ position: absolute; } | ||
pre.numberSource a.sourceLine::before | ||
{ content: attr(data-line-number); | ||
position: absolute; left: -5em; text-align: right; vertical-align: baseline; | ||
border: none; pointer-events: all; | ||
-webkit-touch-callout: none; -webkit-user-select: none; | ||
-khtml-user-select: none; -moz-user-select: none; | ||
-ms-user-select: none; user-select: none; | ||
padding: 0 4px; width: 4em; | ||
color: #aaaaaa; | ||
} | ||
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } | ||
div.sourceCode | ||
{ } | ||
@media screen { | ||
a.sourceLine::before { text-decoration: underline; } | ||
} | ||
code span.al { color: #ff0000; font-weight: bold; } /* Alert */ | ||
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ | ||
code span.at { color: #7d9029; } /* Attribute */ | ||
code span.bn { color: #40a070; } /* BaseN */ | ||
code span.bu { } /* BuiltIn */ | ||
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ | ||
code span.ch { color: #4070a0; } /* Char */ | ||
code span.cn { color: #880000; } /* Constant */ | ||
code span.co { color: #60a0b0; font-style: italic; } /* Comment */ | ||
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ | ||
code span.do { color: #ba2121; font-style: italic; } /* Documentation */ | ||
code span.dt { color: #902000; } /* DataType */ | ||
code span.dv { color: #40a070; } /* DecVal */ | ||
code span.er { color: #ff0000; font-weight: bold; } /* Error */ | ||
code span.ex { } /* Extension */ | ||
code span.fl { color: #40a070; } /* Float */ | ||
code span.fu { color: #06287e; } /* Function */ | ||
code span.im { } /* Import */ | ||
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ | ||
code span.kw { color: #007020; font-weight: bold; } /* Keyword */ | ||
code span.op { color: #666666; } /* Operator */ | ||
code span.ot { color: #007020; } /* Other */ | ||
code span.pp { color: #bc7a00; } /* Preprocessor */ | ||
code span.sc { color: #4070a0; } /* SpecialChar */ | ||
code span.ss { color: #bb6688; } /* SpecialString */ | ||
code span.st { color: #4070a0; } /* String */ | ||
code span.va { color: #19177c; } /* Variable */ | ||
code span.vs { color: #4070a0; } /* VerbatimString */ | ||
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ | ||
</style> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ickc/markdown-latex-css/css/common.min.css"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/ickc/markdown-latex-css/fonts/fonts.min.css"> | ||
<!--[if lt IE 9]> | ||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script> | ||
<![endif]--> | ||
</head> | ||
<body> | ||
<header> | ||
<h1 class="title">Using CriticMarkup with pandoc</h1> | ||
<p class="author">Kolen Cheung</p> | ||
<p class="date">March 11, 2018</p> | ||
</header> | ||
<nav id="TOC"> | ||
<ul> | ||
<li><a href="#definition-of-criticmarkup"><span class="toc-section-number">1</span> Definition of CriticMarkup</a></li> | ||
<li><a href="#usage-pancritic-as-a-markdown-wrapper-including-but-not-limited-to-pandoc"><span class="toc-section-number">2</span> Usage: pancritic as a markdown wrapper (including but not limited to pandoc)</a><ul> | ||
<li><a href="#advanced-usage-pancritic-as-a-pandoc-preprocessor"><span class="toc-section-number">2.1</span> Advanced Usage: pancritic as a pandoc preprocessor</a></li> | ||
</ul></li> | ||
<li><a href="#caveats"><span class="toc-section-number">3</span> Caveats</a><ul> | ||
<li><a href="#latex-ouptut"><span class="toc-section-number">3.1</span> LaTeX Ouptut</a></li> | ||
</ul></li> | ||
<li><a href="#credits"><span class="toc-section-number">4</span> Credits</a></li> | ||
</ul> | ||
</nav> | ||
<p><a href="https://travis-ci.org/ickc/pancritic"><img src="https://travis-ci.org/ickc/pancritic.svg?branch=master" alt="Build Status" /></a> <a href="https://github.com/ickc/pancritic/releases"><img src="https://img.shields.io/github/tag/ickc/pancritic.svg?label=github+release" alt="GitHub Releases" /></a> <a href="https://pypi.python.org/pypi/pancritic/"><img src="https://img.shields.io/pypi/v/pancritic.svg" alt="PyPI version" /></a> <a href="https://pypi.python.org/pypi/pancritic/"><img src="https://img.shields.io/pypi/status/pancritic.svg" alt="Development Status" /></a> <a href="https://pypi.python.org/pypi/pancritic/"><img src="https://img.shields.io/pypi/pyversions/pancritic.svg" alt="Python version" /></a> <!-- [![Downloads](https://img.shields.io/pypi/dm/pancritic.svg)](https://pypi.python.org/pypi/pancritic/) --> <img src="https://img.shields.io/pypi/l/pancritic.svg" alt="License" /> <a href="https://coveralls.io/github/ickc/pancritic"><img src="https://img.shields.io/coveralls/ickc/pancritic.svg" alt="Coveralls" /></a> <!-- [![Scrutinizer](https://img.shields.io/scrutinizer/g/ickc/pancritic.svg)](https://scrutinizer-ci.com/g/ickc/pancritic/) --></p> | ||
<p>Using CriticMarkup with pandoc. It serves both as a wrapper and a pre-processor.</p> | ||
<h1 id="definition-of-criticmarkup"><span class="header-section-number">1</span> Definition of CriticMarkup</h1> | ||
<ul> | ||
<li>Deletions: This is {–is –}a test.</li> | ||
<li>Additions: This {++is ++}a test.</li> | ||
<li>Substitutions: This {~<sub>isn’t</sub>>is~~} a test.</li> | ||
<li>Highlighting: This is a {==test==}.</li> | ||
<li>Comments: This is a test{>>What is a test for?<<}.</li> | ||
</ul> | ||
<h1 id="usage-pancritic-as-a-markdown-wrapper-including-but-not-limited-to-pandoc"><span class="header-section-number">2</span> Usage: pancritic as a markdown wrapper (including but not limited to pandoc)</h1> | ||
<p>TODO</p> | ||
<h2 id="advanced-usage-pancritic-as-a-pandoc-preprocessor"><span class="header-section-number">2.1</span> Advanced Usage: pancritic as a pandoc preprocessor</h2> | ||
<p>TODO</p> | ||
<h1 id="caveats"><span class="header-section-number">3</span> Caveats</h1> | ||
<p>Nesting CriticMarkup might have unexpected behavior, especially in LaTeX output. See <a href="http://criticmarkup.com/spec.php#caveats">the caveats section in the spec of CriticMarkup</a>.</p> | ||
<h2 id="latex-ouptut"><span class="header-section-number">3.1</span> LaTeX Ouptut</h2> | ||
<p>Note that the LaTeX output requires the LaTeX packages <code>color</code> and <code>soul</code>.</p> | ||
<p>One can achieve this by either using a custom template or <code>--include-in-header</code> option. Or you can use the trick of putting the following in your YAML front matter, like this file:</p> | ||
<div class="sourceCode" id="cb1"><pre class="sourceCode yaml"><code class="sourceCode yaml"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="ot">---</span></a> | ||
<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="fu">fontfamily:</span><span class="at"> lmodern,color,soul</span></a> | ||
<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="co">...</span></a></code></pre></div> | ||
<p>Markdown within the CriticMarkup will not be rendered in LaTeX output. If you want to change this behavior, you can take a look at: <a href="https://gist.github.com/mpickering/f1718fcdc4c56273ed52">LaTeX Argument Parser</a>.</p> | ||
<table> | ||
<caption>Translation from CriticMarkup to LaTeX.</caption> | ||
<thead> | ||
<tr class="header"> | ||
<th>CriticMarkup</th> | ||
<th>LaTeX</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr class="odd"> | ||
<td><code>{--[text]--}</code></td> | ||
<td><code>\st{[text]}</code></td> | ||
</tr> | ||
<tr class="even"> | ||
<td><code>{++[text]++}</code></td> | ||
<td><code>\underline{[text]}</code></td> | ||
</tr> | ||
<tr class="odd"> | ||
<td><code>{~~[text1]~>[text2]~~}</code></td> | ||
<td><code>\st{[text1]}\underline{[text2]}</code></td> | ||
</tr> | ||
<tr class="even"> | ||
<td><code>{==[text]==}</code></td> | ||
<td><code>\hl{[text]}</code></td> | ||
</tr> | ||
<tr class="odd"> | ||
<td><code>{>>[text]<<}</code></td> | ||
<td><code>\marginpar{[text]}</code></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<h1 id="credits"><span class="header-section-number">4</span> Credits</h1> | ||
<ul> | ||
<li>Heavily modified from <a href="http://criticmarkup.com/services.php">CriticMarkup Toolkit’s criticParser_CLI.py</a></li> | ||
<li><a href="test.md" class="uri">test.md</a> is modified from <a href="https://github.com/fletcher/MMD-Test-Suite/blob/master/CriticMarkup/Critic.text">MMD-Test-Suite/Critic.text at master · fletcher/MMD-Test-Suite</a></li> | ||
</ul> | ||
</body> | ||
</html> |