Story Details

  • Ask HN: Where are the good Markdown to PDF tools (that meet these requirements)?

    Posted: 2025-03-02 16:18:44

    The author is seeking recommendations for a Markdown to PDF conversion tool that handles complex formatting well, specifically callouts (like admonitions), diagrams using Mermaid or PlantUML, and math using LaTeX or KaTeX. They require a command-line interface for automation and prefer open-source solutions or at least freely available ones for non-commercial use. Existing tools like Pandoc are falling short in areas like callout styling and consistent rendering across different environments. Ideally, the tool would offer a high degree of customizability and produce clean, visually appealing PDFs suitable for documentation.

    Summary of Comments ( 9 )
    https://news.ycombinator.com/item?id=43231964

    The Hacker News comments discuss various Markdown to PDF conversion tools, focusing on the original poster's requirements of handling code blocks, math, and images well while being ideally open-source and CLI-based. Pandoc is overwhelmingly recommended as the most powerful and flexible option, though some users caution about its complexity. Several commenters suggest simpler alternatives like md-to-pdf, glow, and Typora for less demanding use cases. Some discussion revolves around specific features, like LaTeX integration for math rendering and the challenges of perfectly replicating web-based Markdown rendering in a PDF. A few users mention using custom scripts or web services, while others highlight the benefits of tools like Marked 2 for macOS. The overall consensus seems to be that while a perfect solution might not exist, Pandoc with custom templates or simpler dedicated tools can often meet specific needs.