🚀 Big News:Socket Has Acquired Secure Annex.Learn More →
Socket
Book a DemoSign in
Socket

@paperist/remark-latex

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paperist/remark-latex

wooorm/remark plugin for latex

latest
npmnpm
Version
2.0.0
Version published
Maintainers
2
Created
Source

@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

Keywords

latex

FAQs

Package last updated on 28 Nov 2017

Did you know?

Socket

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.

Install

Related posts