2.0.0 • Published 6 years ago

@paperist/remark-latex v2.0.0

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

@paperist/remark-latex

LICENSE NPM standard-readme compliant

wooorm/remark plugin for latex

Table of Contents

Install

npm i remark remark-cli @paperist/remark-latex

Usage

CLI

See here for more details.

remark -u @paperist/remark-latex document.md -o document.tex

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

remark -r ./remarkrc.yml document.md -o document.tex

Syntax

Inspired by pandoc-crossref.

Image label

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

Equation label

$$ math $$ {#eq:label}

Table caption / label

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

: Caption {#tbl:label}

Section label

# Section {#sec:section}

Code block label

Not implemented

References

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

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-latex read baseTemplate and bind documentInfo to output.

%% TeX Template written by ejs format.

\author{<%= author %>}
\title{<%= title %>}

\begin{document}

\maketitle

%% Render results will be exported as `body`.
<%= body %>

\end{document}

remarkrc

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

# Required
output: true
plugins:
  - "@paperist/remark-latex"

# Optional
# NOTE: You should put remark-latex configs under `latex`.
settings:
  latex:
    baseTemplate: latex/template.tex
    imageConfigs:
      width: 0.9\linewidth
    documentInfo:
      title: A Survey on Markdown
      author:
        - John Smith

YAML Frontmatter

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

---
baseTemplate: ../latex/template.tex
---

# Hello World
Lorem ipsum dolor sit amet...

Contribute

PRs accepted.

License

3846masa MIT (c) 3846masa

2.0.0

6 years ago

1.1.0

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago