This post compares the layout models of TeX and Typst, two typesetting systems. TeX uses a box, glue, and penalty model, where content is placed in boxes, connected by flexible glue, and broken into lines/pages based on penalties assigned to different breaks. This system, while powerful and time-tested, can be complex and unintuitive. Typst, in contrast, uses a flow model where content flows naturally into frames, automatically reflowing based on the available space. This offers greater simplicity and flexibility, especially for complex layouts, but sacrifices some fine-grained control compared to TeX's explicit breakpoints and penalties. The author concludes that while both systems are effective, Typst's flow-based model presents a more modern and potentially easier-to-grasp approach to typesetting.
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 ( 10 )
https://news.ycombinator.com/item?id=43032697
HN commenters largely praised the article for its clear explanation of layout models in TeX and Typst. Several noted the helpful visualizations and the clear comparisons between the two systems. Some discussed the trade-offs between the flexibility of TeX and the predictability of Typst, with some expressing interest in Typst's approach for certain use cases. One commenter pointed out that the article didn't cover all of TeX's complexities, which the author acknowledged. There was also a brief discussion about the potential for combining aspects of both systems.
The Hacker News post discussing TeX and Typst's layout models has generated a moderate amount of discussion. Several commenters offer insightful comparisons and perspectives on the two systems.
One compelling comment highlights the difference in how TeX and Typst approach extensibility. TeX's macro-based extension system, while powerful, is considered complex and difficult to learn, leading to a fragmented ecosystem of packages with varying quality and compatibility. In contrast, Typst's extension system, built on a general-purpose programming language, is seen as more approachable and potentially leading to a more coherent and maintainable ecosystem.
Another comment chain delves into the specifics of Typst's layout model, particularly its box model. One commenter expresses concern about its seeming lack of flexibility compared to TeX, specifically citing the challenge of achieving certain layouts like overlapping elements or fine-grained control over whitespace. Another commenter counters this by pointing out Typst's features that allow for more advanced layout control, suggesting that the initial commenter's perceived limitations might stem from unfamiliarity with the system rather than inherent shortcomings. This exchange reveals a nuanced understanding of both systems and their relative strengths and weaknesses.
A few comments touch upon the performance differences between the two. While acknowledging TeX's maturity and optimization, some users express hope that Typst, being a newer project, might offer potential performance gains in the future, particularly for complex documents.
Several commenters express appreciation for Typst's modern design and cleaner syntax, making it more accessible to newcomers. They view it as a potential successor to TeX, offering a more streamlined and contemporary approach to typesetting.
Finally, some comments focus on the practical implications of adopting Typst, discussing the availability of features, support for various output formats, and the overall ecosystem maturity compared to the established and robust TeX ecosystem.