0.3.1 • Published 5 years ago

remark-review v0.3.1

Weekly downloads
6
License
MIT
Repository
github
Last release
5 years ago

remark-review

npm LICENSE standard-readme compliant

wooorm/remark plugin for kmuto/review

Table of Contents

Install

npm i remark-cli remark-review

Usage

CLI

See here for more details.

remark --use remark-review document.md --output

If you configure via rc file, you should type below.

remark document.md

Syntax

Inspired by pandoc-crossref.

Image label

![Caption](file.ext){#fig:label}

Equation label

$$
x^2 + y^2 = r^2
$$

: Equation of a circle {#eq:label}

Table caption / label

|  a  |  b  |  c  |
| :-: | :-: | :-: |
|  1  |  2  |  3  |

: Caption {#tbl:label}

Section label

# Section {#sec:section}

Code block label

```js
console.log('Hello World!');
```

: Caption {#lst:label}

References

From label (e.g. Figure)
[@fig:label1] or [@fig:label1;@fig:label2;...]
BibTeX
[@jones99] or [@jones99;@smith06;...]

Raw comment

<!-- RAW: //indepimage[unixhistory2] -->

<!--
RAW:
//graph[sin_x][gnuplot][Gnuplotの使用]{
plot sin(x)
//}
-->

Configure

Fields

FieldDescription
baseTemplateThe document template
documentInfoThe data passed to the base template
imageConfigs\includegraphics configs
templatesDirTemplate folder for AST (See templates)
Templates

You can use ejs template. remark-review read baseTemplate and bind documentInfo to output.

#@# ReVIEW Template written by ejs format.
#@# Render results will be exported as `body`.

<%= body %>

remarkrc

You can configure via rc file (e.g. remarkrc.json, remarkrc.yml). See also here.

# Required
output: true
plugins:
  - remark-review

# Optional
# NOTE: You should put remark-review configs under `review`.
settings:
  review:
    baseTemplate: review/template.re
    imageConfigs:
      scale: 0.85

YAML Frontmatter

You can configure each files via YAML Frontmatter. See also here

---
baseTemplate: ./review/template.re
---

# Hello World

Lorem ipsum dolor sit amet...

Contribute

PRs accepted.

License

MIT (c) 3846masa