Hacker News new | ask | show | jobs
by leephillips 2255 days ago
This is a very interesting (open source) project that I didn’t know about; thank you for mentioning it.

But it doesn’t replace LaTeX, as it doesn’t produce the same results. A glance at the sample documents reveals the ugly typography resulting from the word-processing layout strategy employed in web browsers. This is confirmed in the documentation. So this could be useful if you have an existing set of HTML pages that you need to convert to PDFs, but, if you’re starting a project where you want to produce both HTML and PDF, this should not be part of the solution.

2 comments

It looks nice for graphics-heavy documents, but the quality of the typographical output doesn't come close to LaTeX with microtype. I do wish that LaTeX had something similar to CSS, however. The separation of markup and styling makes the web easier to use for complex layouts, which are not generally TeX's strong suit.
I cant tell the difference between this layout quality and latex. What are you noticing?
The first things that jump out are the large and uneven gaps between words and the “color” variations among paragraphs. What I mean by the “word-processing layout strategy” is the algorithm where, when you run out of space on a line, you simply break the line at the end of the previous word, fill up the space (for justified text) by expanding the spaces between words, and begin the next line. When you get to the end of the paragraph you go on to the next one. The TeX layout engine, in contrast, makes several passes over each paragraph, adjusting the line breaking (including hyphenation) in order to optimize its appearance (which includes such things as trying to avoid successive hyphenated lines); then, when the page is set, it goes over the entire page to try to equalize the density, or color, among paragraphs.
Maybe you already knew about it, but the microtype package improves the aspect of your documents even more: https://ctan.org/pkg/microtype