wooorm/remark plugin for latex
npm i remark remark-cli @paperist/remark-latex
See here for more details.
remark -u @paperist/remark-latex document.md -o document.texIf you configure via rc file, you should type below.
remark -r ./remarkrc.yml document.md -o document.texInspired by pandoc-crossref.
{#fig:label}$$ math $$ {#eq:label}| a | b | c |
|:---:|:---:|:---:|
| 1 | 2 | 3 |
: Caption {#tbl:label}# Section {#sec:section}Not implemented
[@fig:label1] or [@fig:label1;@fig:label2;...][@jones99] or [@jones99;@smith06;...]| Field | Description |
|---|---|
| baseTemplate | The document template |
| documentInfo | The data passed to the base template |
| imageConfigs | \includegraphics configs |
| templatesDir | Template folder for AST (See 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}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 SmithYou can configure each files via YAML Frontmatter. See also here
---
baseTemplate: ../latex/template.tex
---
# Hello World
Lorem ipsum dolor sit amet...PRs accepted.