remark-review
v0.3.1
Published
wooorm/remark plugin for kmuto/review
Downloads
16
Readme
remark-review
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
| Field | Description |
| :----------: | :----------------------------------------------------- |
| baseTemplate | The document template |
| documentInfo | The data passed to the base template |
| imageConfigs | \includegraphics
configs |
| templatesDir | Template 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.