-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Leafmark itself is distributed through npm and can be invoked with pnpx or npx. PDF generation uses external document tools.
| Tool | Required for | Notes |
|---|---|---|
| Node.js 20+ | All commands | Runs the Leafmark CLI. |
| Pandoc | All exports | Converts Markdown into the target format. |
| XeLaTeX or pdfLaTeX | XeLaTeX is preferred and supports system fonts. | |
pdfunite |
Optional cover merge | Supplied by Poppler. |
| Git | GitHub themes | Used to clone theme repositories. |
| Chromium-family browser | HTML blocks in PDF/DOCX | Chrome, Chromium, Edge, or Brave. JavaScript remains disabled. |
Install Node.js from nodejs.org or your preferred version manager, then:
brew install pandoc basictex popplerAfter installing BasicTeX, a new terminal may be required before xelatex is available.
winget install OpenJS.NodeJS.LTS
winget install JohnMacFarlane.Pandoc MiKTeX.MiKTeX oschwartz10612.PopplerRestart the terminal after installation so updated PATH entries take effect.
sudo apt-get update
sudo apt-get install nodejs npm pandoc texlive-xetex poppler-utils gitsudo dnf install nodejs npm pandoc texlive-xetex poppler-utils gitsudo pacman -S nodejs npm pandoc texlive-bin poppler gitNo global installation is necessary:
pnpx @skxv/leafmark --helpTo pin a project to a known version:
pnpm add -D @skxv/leafmark
pnpm leafmarkEquivalent npm usage is possible with npx @skxv/leafmark.
pnpx @skxv/leafmark doctorLeafmark also performs a first-run check. In an interactive terminal it can offer to install missing tools. Use --yes to accept the supported automatic installation plan, or --skip-tools-check to suppress the first-run prompt.
Note
doctor reports the core toolchain. A Chromium-family browser is additionally required only when converting HTML blocks to images for PDF or DOCX.
Leafmark documentation · Source repository · npm
Leafmark Wiki
Authoring
Configuration
Building
Help