{"slug": "how-to-make-pandoc-pdfs-without-latex-weavon-does-it-in-9-mb-no-tikz", "title": "How to Make Pandoc PDFs Without LaTeX: Weavon Does It in 9 MB (No TikZ)", "summary": "A developer examined Weavon, a Rust rewrite of Pandoc 3.13 that converts Markdown to PDF without LaTeX, ships as a 9.26 MB binary, and reports matching 65,891 of 65,937 baseline test units (99.93%) against pandoc. The project's own benchmarks claim Markdown-to-HTML runs 36.7x faster than pandoc with peak memory of 29.3 MiB versus 262.2 MiB, though the writeup notes no PDF benchmark exists and the 99.93% figure excludes PDF output comparison. Weavon's README states it was \"built with heavy use of AI coding tools, so we do not describe it as a strict clean-room implementation.", "body_md": "If you have ever installed a multi-gigabyte TeX distribution just so `pandoc notes.md -o notes.pdf` would stop complaining about `pdflatex not found`, this one's for you. [Weavon](https://github.com/weavon/weavon) is a Rust rewrite of Pandoc 3.13 that turns Markdown into PDF without LaTeX, ships as a 9.26 MB binary, and according to its own benchmarks runs Markdown to HTML 36.7x faster than pandoc.\n\nIt also says, in its own README, that it was \"built with heavy use of AI coding tools, so we do not describe it as a strict clean-room implementation.\" And it's licensed MIT/Apache-2.0, while pandoc is GPL.\n\nI went through the repo, the benchmark doc, the changelog and the 136-comment [Show HN thread](https://news.ycombinator.com/item?id=50762625) to see what the numbers cover and where they stop.\n\nWeavon v0.2.0 came out on 4 December 2026, two days after v0.1.0. The headline claim is from the [README](https://github.com/weavon/weavon): \"Weavon matches 65,891 of 65,937 baseline test units (99.93%).\" A unit counts as equal only when output, warnings *and* exit code match pandoc's. 65,776 of those are byte-identical, and the 46 that differ do so on purpose.\n\nThe rest of the scorecard:\n\n| Check | Result | \n|---|---|\n| Pandoc 3.13's own test suite, run outside the repo | 2,228 of 2,231 pass | \n| Input formats | 50 of 52 pass, 2 partial | \n| Output formats | 75 of 77 pass, 1 partial ( `pdf` has no oracle comparison) | \n| Options | 99 of 109 pass, 9 partial | \n| Real documents (230 docs × 3 formats) | 690 of 690 equal | \n| Lua 5.4 API names | 468 of 468 | \n\nThe three failing pandoc tests are shell completion tests. Weavon writes its own completions because pandoc's scripts are GPL.\n\nCheck the output formats row: PDF is the one format with no oracle comparison. The 99.93% figure says nothing about how good the PDFs look, and the PDF engine is the main reason most of us would bother with this.\n\nFrom [docs/BENCHMARKS.md](https://github.com/weavon/weavon/blob/main/docs/BENCHMARKS.md), the v0.2.0 run: median wall time, 1 MB inputs except the DOCX case, a \"quiet Apple Silicon ARM64 system with macOS\". These are the project's numbers. I didn't run them.\n\n| Workload | Weavon 0.2.0 | Pandoc 3.13 | Speedup | \n|---|---|---|---|\n| md → html | 62.61 ms | 2,300.01 ms | 36.7x | \n| md → html (no highlighting) | 44.82 ms | 2,227.26 ms | 49.7x | \n| docx → json (106 KB DOCX) | 54.65 ms | 1,805.26 ms | 33.0x | \n| html → json | 19.53 ms | 807.27 ms | 41.3x | \n| json → latex | 14.41 ms | 220.34 ms | 15.3x | \n| json → json | 7.87 ms | 129.86 ms | 16.5x | \n\nPeak memory for md → html: 29.3 MiB against 262.2 MiB. Cold start (`--version`) in the earlier v0.1.0 run, on an Apple M1, was 2.85 ms against 33.81 ms. Binary: 9,256,784 bytes, compared with 195.4 MB for the pandoc 3.13 binary they tested.\n\nTwo things the doc is honest about and the HN title skips. The md → html median got *slower* from v0.1.0 (55.75 ms) to v0.2.0. And Carta 0.0.16, another Rust pandoc-alike, beats Weavon on `json-html` and `json-latex`.\n\nFor this post, the bigger problem is that there is no PDF row in any table. The \"37x\" is Markdown to HTML. The project hasn't published `--pdf-engine=embedded` against `pandoc --pdf-engine=xelatex`, and the author said in the thread they haven't benchmarked it against Typst either. I'd expect it to win easily, since it runs no subprocess and no TeX at all, but that's a guess, not a measurement.\n\nWall time here includes process startup, where pandoc is also slower. If your CI job converts hundreds of small files, that startup gap adds up fast.\n\nInstall (pick one, all from the README):\n\n```\nbrew install weavon/tap/weavon\n# or\ncargo install --locked --git https://github.com/weavon/weavon weavon-cli\n# or the install script, which checks SHA-256\ncurl -fsSL https://weavon.org/install.sh | sh\n```\n\nThen:\n\n```\nweavon notes.md -o notes.pdf --pdf-engine=embedded\n```\n\nThat's it. No TeX Live, no external program, so it works with `--sandbox` and an empty `PATH`. There's also a Docker image, `ghcr.io/weavon/weavon`, with \"no shell and no TeX\", which is what I'd reach for in CI.\n\nOne trap: the embedded engine only works in native mode, meaning when the binary runs as `weavon`. Run it as `pandoc` (which is what the installer's `--as-pandoc` link does) or pass `--compat=pandoc-3.13`, and you get compat mode with the embedded engine switched off. One HN commenter noticed that turning on compat mode on the project website disabled PDF output.\n\nIf you set `SOURCE_DATE_EPOCH`, the PDF is byte-reproducible. That's useful if you commit generated docs.\n\nThis part should be at the top of the README. From the README, the changelog and the author's [replies on HN](https://news.ycombinator.com/item?id=50762625):\n\n`latex_boundary.rs` covers \"the common commands people put in Pandoc Markdown\". TikZ and custom macro packages are out. The README's advice: \"Use an external engine such as `lualatex` for constructs such as TikZ.\"`--pdf-fallback` defaults to `off`, which drops the block and emits a `W_PDF_UNSUPPORTED_RAW_LATEX` warning. If your build doesn't fail on warnings, a missing diagram won't fail it either. The changelog says `--pdf-fallback=document` will \"report that the document needs an external engine\" instead.\nWhat it does have: PDF 1.7, bookmarks, links, tables, footnotes, math, SVG, bidi text, and PDF/A-2u and PDF/UA-1 metadata. For READMEs, internal docs, invoices and release notes, that's plenty. For a thesis, keep TeX.\n\nIf you swap Weavon in as `pandoc` and diff the output, these will show up:\n\n`default.csl` can't be shipped. Some citations format differently. Pass `--csl` explicitly.`--reference-doc`.`--css`.\nThe 62 BSD-3 default templates are included unchanged, so HTML and LaTeX output mostly stay the same. If you already pin `--csl` and `--reference-doc` (you should), most of this doesn't affect you.\n\nThe README's provenance section says no pandoc Haskell source or test files are in the repo, \"project rules forbid reading Pandoc's Haskell source\", and pandoc 3.13 was used only as a black-box test oracle. It ports permissively licensed companion libraries (pandoc-types, doclayout, doctemplates, commonmark-hs, citeproc, skylighting-core, tagsoup, hslua) and excludes GPL assets.\n\nThe [ADR log](https://github.com/weavon/weavon/blob/main/docs/ADR.md) also records an incident: a worker printed three GPL-headed files from `pandoc-lua-marshal` before noticing the header, and the earlier `walk.rs` was deleted unread and rewritten from the Lua filter docs, two MIT-licensed files of the package and oracle tests. I give them credit for writing that down. Most projects wouldn't.\n\nHN split in the usual way. cobbal: \"Can you really call something a clean-room implementation if it was written by... a model trained on pandoc's source code?\" genxy called it \"a shitty laundering of GPL code into Apache+MIT.\" On the other side, haberman asked whether \"Wine, Samba, ReactOS, and FreeDOS morally belong to Microsoft\", and in a later reply said that if the original authors think it's derivative, \"they can point to the specific code they feel was copied without authorization.\" AnonymousPlanet asked the question nobody can answer: \"How to prove Claude never read the Pandoc code?\"\n\nMy take: the black-box oracle method is legitimate, and people have reimplemented behaviour from manuals and test output for decades. \"We told the model not to look\" is not a clean room, though. The author reworded the README to drop that label after the thread pushed back, which was the right call. Legally, I don't think anyone knows yet. On maintenance, Weavon has 38 commits and its first release is a few days old. One commenter counted pandoc at \"600 contributers, 20k commit history\". Whatever you use it for, keep real pandoc installed so you can switch back by swapping one binary.\n\nWould I use it? For Markdown to PDF in a CI container where I'd otherwise pull a TeX image several gigabytes in size, yes, with `--pdf-fallback=document` so a skipped TikZ block doesn't slip through unnoticed. For anything with TikZ, or anywhere typography matters, no.\n\nIs a Pandoc rewrite built mostly by AI tools from GPL behaviour, licensed MIT, a problem? Or is that just how software gets built now? If you maintain GPL code, I especially want to hear from you.", "url": "https://wpnews.pro/news/how-to-make-pandoc-pdfs-without-latex-weavon-does-it-in-9-mb-no-tikz", "canonical_source": "https://dev.to/alanwest/how-to-make-pandoc-pdfs-without-latex-weavon-does-it-in-9-mb-no-tikz-31an", "published_at": "2026-12-05 16:10:00+00:00", "updated_at": "2026-12-05 16:15:03.796674+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Weavon", "Pandoc", "Carta", "Typst", "Hacker News"], "also_reported_by": [], "takeaway": "Weavon's embedded PDF engine removes the TeX Live dependency and runs without subprocesses, but its 99.93% pandoc-compatibility figure has no oracle comparison for PDF output, so PDF quality is unmeasured.", "recommendation": null, "alternates": {"html": "https://wpnews.pro/news/how-to-make-pandoc-pdfs-without-latex-weavon-does-it-in-9-mb-no-tikz", "markdown": "https://wpnews.pro/news/how-to-make-pandoc-pdfs-without-latex-weavon-does-it-in-9-mb-no-tikz.md", "text": "https://wpnews.pro/news/how-to-make-pandoc-pdfs-without-latex-weavon-does-it-in-9-mb-no-tikz.txt", "jsonld": "https://wpnews.pro/news/how-to-make-pandoc-pdfs-without-latex-weavon-does-it-in-9-mb-no-tikz.jsonld"}}