![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
.. This README is auto-generated from docs/README.md
. Do not edit this file directly.
:Author: Kolen Cheung :Date: April 5, 2019
.. 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.
Install using
.. code:: bash
pip install pancritic
pancritic provides a pandoc-like cli. Pandoc users will feel right at home. See help from
.. code:: bash
pancritic -h
A typical use of pancritic will be like
.. code:: bash
pancritic -s -o index.html index.md
See examples in HTML <tests.html>
__ and PDF <tests.pdf>
__.
--engine
The default engine is markdown
. Valid options are markdown
,
markdown2
, panflute
, pypandoc
. You need to install the
respective package in order to use them. markdown
and
markdown2
are pure Python, hence useful for other CPU
architechture. panflute
and pypandoc
both uses pandoc as
backend.
-m
\ |\ --critic-mode
a/accept, r/reject: accept/reject changes.
d/diff: generates a diff. In HTML output, JS is used for toggling
between diff, accept, reject.
m/markup: treat the CriticMarkup as Markup. i.e. in HTML output there
isn’t any toggles but the diff view only. In LaTeX output, diff and
markup modes are identical except for an additional nav. -m m
should be used with LaTeX output.
Previous Users of pandoc-criticmarkup
This is completely rewritten in Python. The cli has been completely
changed too. The former options of ``-a``, ``-r``, ``-d`` are replaced
with ``-m a``, ``-m r``, ``-m d``, and added a ``-m m``.
Previous Users of ``criticParser_CLI.py``
This is a heavy fork of criticParser_CLI.py
, with these differences:
#. CLI has changed, with a more pandoc-like interface. #. Python 3 (and 2) compatible. #. Bug fixes (formerly hightlight without comment are parsed incorrectly). #. It has much more input/output format options as well as engines.
Examples,
.. code:: bash
criticParser_CLI.py input.md -m2 -o output.html --css css.html
pancritic -o output.html input.md --critic-template css.html --engine markdown2
A somewhat surprising behavior is when the to-format and output extension is different. In pancritic, the to-format indicates the CriticMarkup parsing behavior (mainly tex vs. html). And the output extension controls the final output’s format (e.g. markdown, html, etc.)
An interesting use of this is to use pancritic as a pandoc preprocessor instead, like this
.. code:: bash
pancritic input.md -t markdown -m m | pandoc -s -o output.html
This will be useful if more advanced pandoc args are needed.
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>
__.
mainly tested with HTML and LaTeX output. RST output almost works,
but injecting CSS/JS into the output causes some problems. Currently,
it can be get arround with --critic-template
and injecting the
CSS/JS manually. See pancritic/template.py
for the template used.
Note that the LaTeX output requires the LaTeX packages
changes>=3
. [1]_
One can tell pandoc to use this package 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,changes ...
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]--}
\deleted{[text]}
{++[text]++}
\added{[text]}
{~~[text1]~>[text2]~~}
\replaced{[text2]}{[text1]}
{==[text]==}
\highlight{[text]}
{>>[text]<<}
\comment{[text]}
========================== ===============================
CriticMarkup Toolkit’s criticParser_CLI.py <http://criticmarkup.com/services.php>
__tests.md <tests.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>
__.. [1]
The version of the package in TeXLive 2018 is still v2. TeXLive 2019 should be available on 2019-4-30 <https://www.tug.org/texlive/>
__,
meanwhile you need to
.. code:: bash
# sudo is needed in most cases, depending on where you put it
sudo tlmgr update --self
sudo tlmgr update changes
# check it is >=3
tlmgr info changes
.. |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
FAQs
CriticMarkdup parser with optional pandoc backend
We found that pancritic demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.