Repository navigation
Markdown and Citations
Leafmark reads Pandoc Markdown. Standard Markdown works as expected, while Pandoc adds citations, attributes, footnotes, definition lists, tables, raw LaTeX, and other publishing features.
# Chapter title
## Section
### SubsectionWhen number-sections: true, Pandoc numbers headings. toc: true adds them to the table of contents up to toc-depth.
Use *emphasis*, **strong text**, and [links](https://example.com).
- Unordered item
- Another item
1. First step
2. Second stepPaths are resolved through the active project and resource roots. Pandoc image attributes may be used:
{width=70%}| Item | Result |
| --- | ---: |
| Alpha | 18 |
| Beta | 24 |Theme behavior can differ for wide or multipage tables. The multicolumn theme includes a PDF-specific table filter.
```ts
const title = "Leafmark";
```Leafmark asks Pandoc for Kate syntax highlighting when supported by the installed Pandoc version.
This statement needs a note.[^detail]
[^detail]: Additional context belongs here.Create sources.bib:
@book{doe2024,
author = {Doe, Jane},
title = {Writing Reproducible Reports},
year = {2024},
publisher = {Example Press}
}Reference the key in Markdown:
Reproducible publishing improves review workflows [@doe2024].
Doe describes the workflow in detail [-@doe2024, pp. 40-42].Enable or select the bibliography in metadata:
bibliography:
- sources.bib
references-title: ReferencesWhen sources.bib exists and no explicit setting disables it, Leafmark uses it by default. Multiple bibliography files are accepted. Set bibliography: false or bibliography: [] to disable citation processing.
Leafmark runs Pandoc citeproc with its bundled APA CSL and inserts the generated references at the end. A PDF page break is added before references by the bundled filter.
Pandoc raw TeX is enabled for PDF-oriented content:
\newpageRaw LaTeX is format-specific and will not produce equivalent HTML or DOCX content. Prefer Markdown or HTML and CSS when output portability matters.
Simple inline tags remain HTML in HTML output. For PDF, Leafmark has limited mapping for tags such as <big> and <small>; unknown paired inline tags retain their content but not their browser styling. Use a block when exact CSS rendering is required.
Leafmark concatenates chapter contents with blank lines. It does not automatically add a page break between every chapter. Themes, raw LaTeX, or filters can provide custom chapter-boundary behavior.
Leafmark documentation · Source repository · npm
Leafmark Wiki
Authoring
Configuration
Building
Help