Live data from Hacker News

Modern LaTeX

github.com

151–160 of 224 posts

Re: Modern LaTeX

#151
post #116

Earlier quoted context omitted.

I'd say it's already there. See for example the https://pagedjs.org/ project which allows advanced typesetting (including for printing) using web technologies. It is already used in production by at least one book publisher (C&F editions)

I've used it for my own such production, perfect binding with a hand guillotine and screw clamps in my attic - nothing remotely professional, but you still have to start by making a book block, and Paged.js is a solid call there. Unless beauty of typography (more than TTF/OTF hinting can handle) is of particular merit, it's usually my preferred first typesetting option. As an old hand with PDF-in-browser production,…

I've also used pagedjs for a relatively complex booklet with bidirectional text in different languages, images and long footnotes. The result was great but there were some annoying bugs, some of them seeming to be possible underlying bugs in chrome and Firefox. Still, latex would have been even more frustrating.

Re: Modern LaTeX

#152
post #87

Earlier quoted context omitted.

[flagged]

PDF is used for pre-formatted content with reproducible layout. HTML is used for dynamically formatted, dynamically laid out and often reflowable content. It's debatable whether PDF needs a more modern alternative, but HTML is certainly not a replacement for it. There are several use cases where HTML is not the appropriate choice - especially for carefully laid out documents or books. You can simulate pre-formatted l…

HTML with css paged media gets you reproducible layout without having to mess with Latex and keeps you in open toolchains that aren't two decades or more old without any significant improvement or advancement.

Re: Modern LaTeX

#153

Earlier quoted context omitted.

I've used it for my own such production, perfect binding with a hand guillotine and screw clamps in my attic - nothing remotely professional, but you still have to start by making a book block, and Paged.js is a solid call there. Unless beauty of typography (more than TTF/OTF hinting can handle) is of particular merit, it's usually my preferred first typesetting option. As an old hand with PDF-in-browser production,…

I've also used pagedjs for a relatively complex booklet with bidirectional text in different languages, images and long footnotes. The result was great but there were some annoying bugs, some of them seeming to be possible underlying bugs in chrome and Firefox. Still, latex would have been even more frustrating.

Oh, I certainly don't doubt that. And as I said, I haven't really found Paged.js all that frustrating! I have extensive though not recent Pagemaker experience; I expected InDesign to be easier, and now I rue the day when that's where I'm forced to resort.

In my experience Paged.js is at its best when building to PDF, but then that's always my intermediate format when working to paper, because that's where PDF's inflexibility shines. The source of a book block, everything that builds to that PDF, partakes of all the infelicities of the JS ecosystem. But to remake the book itself again, all I need do to start is print the PDF.

Re: Modern LaTeX

#154
post #39

Earlier quoted context omitted.

Typst doesn't (yet) have one of the features that make LaTex stand out: microtypography. See https://github.com/typst/typst/issues/4693

That's not why people use LaTeX. I doubt most users even know about it. The standout feature is fantastic support for equations and figures. That and Computer Modern. I bet a significant number of users use it because of that! Personally I would just use LyX. Its equation editor is actually fantastic.

Computer Modern is the very last thing I will ever want in a document and is the first thing I change in every LaTeX document I create. It is easily one of the ugliest fonts ever created.

It has a lot of good things going for it, but it is the least attractive font that I think I have ever seen.

Re: Modern LaTeX

#155
post #72

Earlier quoted context omitted.

This might be one of the areas where it takes a lot of effort to catch up with LaTex. The microtype user manual shows how much thought has gone into it: https://mirror.foobar.to/CTAN/macros/latex/contrib/microtype...

How is that pdf made interactive? It has options to toggle the behaviour, which work even in an in browser pdf viewer. I did not think PDFs could do that.

PDFs can do a lot more than show static content. There was one time where Adobe strongly advocated for PDF to be the page format of what would come to be called "The World Wide Web". Where we have HTML now, Adobe wanted PDF. Thankfully that did not happen. But I suspect it would have made more sense technically than [whatever this mess is that we have now.]

A lot of things are possible in PDF.

Re: Modern LaTeX

#156

Check out Tectonic which is an all-in-one LaTeX toolchain (single executable w/ engine + build system) that lazily downloads TeX Live (no upfront multi-gig downloads). It's a breath of fresh air in the chaotic LaTeX landscape. Bit of a shame that they opted for XeTeX rather than LuaTeX though. [0]: https://github.com/tectonic-typesetting/tectonic

Honest question: why do you prefer lualatex to xetex?

You mean XeTeX for LuaLaTeX, I think.

Re: Modern LaTeX

#157
post #105
post #94

Earlier quoted context omitted.

HTML+CSS has facilities to target a page format (CSS @page rule, cm and in dimension units). Not to say that it's on the same level as LaTeX, but it's pretty impressive by its own right.

Are there good deep dives on how far you can practically this? Especially in combination with headless browser pdf generation? Last time I looked into it, a while ago, my impression was that it would get rickety too soon. It’d be a good place to be, I think, if web and “document” tech stacks could have nice and practical convergence.

We use CSS paged media to create e-books and invoices (using weasyprint [0]). One of the most helpful resources for me was print-css.rocks [1], they cover a lot of what’s possible and include which tools support which parts of it (tools targeting paged media, browser support is essentially non-existent and outside using JS to fake it with paged.js, not relevant). The expensive tools tend to support more features, but thanks to some donations/sponsorships, weasyprint has really caught up and now supports a very large part of the spec.

> Especially in combination with headless browser pdf generation

I have no idea why you’d want to do that. Browsers are bad at it, dedicated tools are great at it.

[0]: https://weasyprint.org/

[1]: https://print-css.rocks/

[2]: https://pagedjs.org/

Re: Modern LaTeX

#159
Having experience with digitizing a university textbook in physics by hand, this is a very nice LaTeX guide for everyone interested. One thing worth noting from 2025 perspective that the "default" local setup is most likely going to be VSCode with LaTeX Workshop[1] and LTeX+[2] extensions, and that you should use TeX Live on every platform supported by it (since MiKTeX and friends can lag). Also, use LuaTeX, as it's the officially recommended[3] engine since November 2024.

[1] https://marketplace.visualstudio.com/items?itemName=James-Yu...

[2] https://marketplace.visualstudio.com/items?itemName=ltex-plu...

[3] https://www.texdev.net/2024/11/05/engine-news-from-the-latex...

Re: Modern LaTeX

#160

Earlier quoted context omitted.

That's not why people use LaTeX. I doubt most users even know about it. The standout feature is fantastic support for equations and figures. That and Computer Modern. I bet a significant number of users use it because of that! Personally I would just use LyX. Its equation editor is actually fantastic.

Computer Modern is the very last thing I will ever want in a document and is the first thing I change in every LaTeX document I create. It is easily one of the ugliest fonts ever created. It has a lot of good things going for it, but it is the least attractive font that I think I have ever seen.

I think it's quite attractive, but its attractiveness isn't really why it's desirable; it's because people know it is the font used by proper fancy scientific papers. It's like the opposite of Comic Sans.
Post reply on HN