Replace Pandoc without changing your scripts
Install Weavon with --as-pandoc, and your scripts, Makefiles, and Lua filters run on it unchanged.
One install, same commands
Lua 5.4 filters
All 468 Pandoc Lua APIs plus LPeg 1.1.0.
Citations
--citeprocwith CSL 1.0.2 styles.HTTP and CGI server
Drops in for
pandoc-serverand adds/v1/convert.Same output
65,891 of 65,937 conformance units equal.
Drop-in Pandoc
pandoc --version
pandoc 3.13
Weavon 0.1.0 (compatible with Pandoc 3.13)
pandoc paper.md --citeproc -o paper.html
Wrote paper.html in 54 ms (byte-equal to Pandoc 3.13)
pandoc notes.md --lua-filter count.lua -o notes.docxEmbedded PDF
weavon report.md --pdf-engine=embedded -o report.pdf
Wrote report.pdf (PDF 1.7, PDF/UA tagged, 0 external tools)
# Reproducible bytes in CI and Docker with no TeX Live
SOURCE_DATE_EPOCH=1700000000 weavon report.md --pdf-engine=embedded -o report.pdf
weavon doctorSemantic Diff
weavon diff contract-v1.docx contract-v2.docx --author "Legal" -o redline.docx
Compared 48 blocks, wrote native <w:ins> and <w:del> tracked changes
# Or render a color PDF redline with no TeX
weavon diff contract-v1.docx contract-v2.docx -o redline.pdf
weavon diff old.md new.md -t criticmarkupLua and Server
weavon server --port 3030
Listening on 127.0.0.1:3030 (pandoc-server + /v1/* + /metrics)
curl --data-binary @paper.md "http://localhost:3030/v1/convert?to=pdf" -o paper.pdf
HTTP 200 application/pdf (28.4 KB in 14 ms)
weavon lua inspect.lua paper.mdHow compat mode activates
Under the name pandoc, or with --compat=pandoc-3.13, Weavon behaves as Pandoc 3.13. It reads no extra config file and makes no extra network request.
ln -s "$(command -v weavon)" ~/.local/bin/pandocpandoc --version
pandoc 3.13
Weavon 0.1.0 (compatible with Pandoc 3.13)What stays the same
- 52 input and 77 output formats
- All 90 extensions
- Lua 5.4 filters with LPeg 1.1.0
- JSON filters with
--filter - Templates and defaults files
--citeprocwith CSL 1.0.2- 15 engines for
--pdf-engine pandoc-serverand its CGI mode
Measured parity
- 99.93%Conformance units equal
- 2,228 of 2,231Pandoc tests pass
- 690 of 690Real documents equal
- 99.98%Server units equal
Where the output can differ
Some Pandoc data files are GPL text, so Weavon ships its own citation style, office styles, EPUB stylesheet, and translated labels.
Every user-visible difference and workaround
| Area | Difference | What to do |
|---|---|---|
| Default citation style | The built-in style and locales are Weavon's own work. Some citations can differ from Pandoc's default.csl. | Use --csl with the style that you need. |
| DOCX, ODT, FODT, and PPTX styles | Weavon writes its own default styles, because the reference documents of Pandoc are GPL. The output bytes differ. | Use --reference-doc with your reference document. |
| EPUB stylesheet | Weavon uses its own default stylesheet. | Use --css. |
| Translated labels | Weavon has its own labels (for example Abstract) for 107 language tags. Some labels differ from Pandoc. | Put translation files in DATADIR/translations/. |
| Syntax highlighting | Weavon highlights all 194 built-in Pandoc 3.13 languages using 62 KDE language definitions (plus the shared Alerts helper) and 132 clean-room Rust definitions, with 0 differences across 13,986 replay cases. | Use --syntax-definition FILE.xml to add custom languages. |
--print-default-data-file | Templates and some built-in data are available. Pandoc translation files are not. | Get other files from the Pandoc distribution. |
| Shell completion | Weavon makes its own completion scripts. | None. |
| Limits | Weavon stops with an error at limits for nesting depth, input size, table size, and archive size. Pandoc can use all memory or run without end on such input. | None for normal documents. |
| Error messages | Weavon does not print the Haskell call stack lines of Pandoc. Some JSON and YAML error texts differ. | None. |
Common questions
How do I switch a machine from Pandoc to Weavon?
Install Weavon with --as-pandoc, or link pandoc to weavon with ln -s "$(command -v weavon)" ~/.local/bin/pandoc. Under that name, Weavon runs in Pandoc 3.13 mode.
What does pandoc --version print after switching?
The first line is pandoc 3.13, and the second line names Weavon.
Do existing Lua filters still work?
Yes. Weavon bundles Lua 5.4.8 and LPeg 1.1.0, and all 468 Pandoc 3.13 Lua API names match.
Does compat mode make network requests?
Compat mode reads no configuration file and makes no network request that Pandoc would not make.
Where can the output differ from Pandoc?
It can differ in the default citation style, office reference styles, EPUB stylesheet, and some translated labels, because Pandoc ships GPL data files.
Does Weavon replace pandoc-server too?
Yes, run weavon server or invoke the binary as pandoc-server or pandoc-server.cgi. 67,813 of 67,828 server matrix units match (99.98%).
