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.
BritCSS is a humorous CSS framework that replaces American English spellings in CSS properties and values with their British English equivalents. It aims to provide a more "civilised" (British English spelling) styling experience, swapping terms like color
for colour
and center
for centre
. While functionally identical to standard CSS, it serves primarily as a lighthearted commentary on the dominance of American English in web development.
Hacker News users generally found BritCSS humorous, but impractical. Several commenters pointed out the inherent problems with trying to localize CSS, given its global nature and the established convention of using American English. Some suggested it would fragment the community and create unnecessary complexity in workflows. One commenter jokingly suggested expanding the idea to include other localized CSS versions, like Australian English, further highlighting the absurdity of the project. Others questioned the motivation behind targeting American English specifically, suggesting it stemmed from a place of anti-American sentiment. There's also discussion about the technical limitations and challenges of such an undertaking, like handling existing libraries and frameworks. While some appreciated the satire, the consensus was that BritCSS wasn't a serious proposal.
The arXiv LaTeX Cleaner is a tool that automatically cleans up LaTeX source code for submission to arXiv, improving compliance and reducing potential processing errors. It addresses common issues like removing disallowed commands, fixing figure path problems, and converting EPS figures to PDF. The cleaner also standardizes fonts, removes unnecessary packages, and reduces file sizes, ultimately streamlining the arXiv submission process and promoting wider paper accessibility.
Hacker News users generally praised the arXiv LaTeX cleaner for its potential to improve the consistency and readability of submitted papers. Several commenters highlighted the tool's ability to strip unnecessary packages and commands, leading to smaller file sizes and faster processing. Some expressed hope that this would become a standard pre-submission step, while others were more cautious, pointing to the possibility of unintended consequences like breaking custom formatting or introducing subtle errors. The ability to remove comments was also a point of discussion, with some finding it useful for cleaning up draft versions before submission, while others worried about losing valuable context. A few commenters suggested additional features, like converting EPS figures to PDF and adding a DOI badge to the title page. Overall, the reception was positive, with many seeing the tool as a valuable contribution to the academic writing process.
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.The Hacker News post "Ask HN: Where are the good Markdown to PDF tools (that meet these requirements)?" generated a robust discussion with several commenters offering suggestions and insights based on the original poster's (OP) specific needs. The OP was looking for a tool capable of handling complex Markdown, including admonitions (like notes, warnings, etc.), footnotes, cross-references, and internal links, while also maintaining a clean and professional appearance. They specifically mentioned Pandoc as falling short of their expectations.
Several commenters championed Typora, praising its visually appealing rendering of Markdown and ease of use for writing and previewing. However, some acknowledged its limitations regarding more advanced features like cross-references, and some mentioned its recent transition to a paid model.
Pandoc was also discussed extensively, despite the OP's initial dismissal. Commenters pointed out that its power lies in its customizability, suggesting that with sufficient tweaking through custom templates and filters using LaTeX or other formatting engines, Pandoc could likely meet the OP's requirements, albeit with a steeper learning curve. Several users provided specific examples of command-line options and workflows to achieve specific styling and formatting results.
A few users suggested Marked 2, primarily for its preview capabilities and its compatibility with custom CSS styling for controlling the final PDF output.
MultiMarkdown Composer was also mentioned, although with less enthusiasm. Its support for MultiMarkdown syntax, a superset of standard Markdown, was highlighted as a potential benefit, but users pointed out the lack of recent updates and potential compatibility issues.
Some commenters recommended exploring static site generators like Hugo or Jekyll. While not strictly Markdown to PDF converters, these tools can generate HTML which can then be converted to PDF, offering more flexibility in styling and layout.
A couple of more niche suggestions included Zettlr and a Python library called WeasyPrint. Zettlr was praised for its academic writing features, while WeasyPrint was mentioned for its ability to generate PDFs directly from HTML, allowing for a highly customizable workflow.
The overall consensus seemed to be that while a perfect out-of-the-box solution may not exist, several tools could meet the OP's needs with some configuration or by combining different tools in a workflow. Several commenters encouraged the OP to share their specific Pandoc setup for better troubleshooting and more tailored recommendations. The discussion highlighted the trade-offs between ease of use and customizability, with simpler tools like Typora offering a streamlined writing experience but potentially lacking advanced features, and more powerful tools like Pandoc requiring more effort to configure but ultimately offering greater control over the final output.