Live data from Hacker News

Modern LaTeX

github.com

161–170 of 224 posts

Re: Modern LaTeX

#161
post #25

I always wonder why people compare Latex with word and not with the single most popular document markup (especially here): HTML + css + javascript. The problems are quite similar, "How do I center a div?" vs "How do I keep this float on this page?" Has latex really modernized? I don't hear a lot about new layouts or style mechanisms. Most people are probably reading articles online these days, although there is a lot…

There are many reasons this comparison is not made. I will just touch on one. The target medium is different. For html, you have monitors of different sizes as well as windows that can be resized. For latex, you choose your target at the start: A4 paper? Screen presentation? A0 poster? With a fixed medium in mind, you can be extremely particular on where on this canvas you want a piece of text/graphic or whatever. Wi…

That seems contradictory, when Latex is rather famously imprecise at placing figures and such. Weren't both languages (at least at some point) intended to take layouting control away from the writer?

But regardless, I think that, in addition to moving away from Latex we should also reconsider the primary output format. Documents are rarely printed anymore, and inaccessible, fixed-size A4 pdfs are annoying to read on anything but an iPad Pro.

Re: Modern LaTeX

#162

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?

LuaTeX is the de facto successor of pdfTeX and is basically a more maintained pdfTeX with Unicode support and Lua scripting, whereas XeTeX has its own engine. In practice, it means that LuaTeX "just works" with most documents while with XeTeX you run into all sorts of weird incompatibilities. Fancy packages that make use of Lua scripting (e.g., graphdrawing) will only work with LuaTeX.

Edit: Looks like it's not de facto anymore, and LuaTeX is now recommended for all documents and XeTeX is being recommended _against_ (https://www.texdev.net/2024/11/05/engine-news-from-the-latex...)

Re: Modern LaTeX

#163
post #146

Earlier quoted context omitted.

I don't think this was ever my issue with Latex, which instead are mostly: - the cryptic error messages and infinite logs - the unintuitive ways to do stuff like store a value for later use or sum two lengths - the very long compile times - the amount of reliance on global state from various packages, which contributes to even more cryptic errors or weird behavior when something goes wrong - various other quirks, e.g…

I could deal with all of the other issues if it weren't for the absurdly long compile times. I wonder where most of that time is spent.

Some is spent on optimizing the results on the paragraph, page, and multi-page level: river elimination, color balance, widow and orphan elimination, etc. I don't know how much of this Typst does; certainly HTML + CSS does none of it.

Re: Modern LaTeX

#164
post #119

Earlier quoted context omitted.

Didn't work with Unicode the last time I checked... Would much rather have Unicode support than microtype.

I've been using microtype with lualatex, fontspec and Opentype fonts for years. What doesn't work?

Had to use xelatex (don't remember why currently).

Re: Modern LaTeX

#165
post #129

Earlier quoted context omitted.

I don't feel like the template itself is the issue. In typst it's quite easy to recreate the templates without being years into typst (according to my experience). The real problem is acceptance of non-word/latex papers

The problem is the user-base and acceptance of latex vs Typst. I use latex and as aware as I am about its deficiencies, I can create a doc faster in it than any other tool that I have not ever used before. I also have a bunch of utilities I created for my specific use-cases automating data into tables, figures, etc, ready for latex import. So its a mass and momentum problem. Typst not only has to be better/easier/fas…

I used latex for over 20 years.

Typst is a breath of fresh air. Interacting with modern tooling (GitHub, discord). Responsive developers. Easy to read code. Easy to do things on your own.

Admittedly, my use case is mainly writing books, I've never published an academic paper.

Re: Modern LaTeX

#167
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.

Good question. The github url is printed on the first page.

I find some stuff like this.. is it raw pdf directives? Literally an example of something typst can't do right now. I also can't read this.

``` \def\mt@toggle@sample#1{% \pdfstartlink user{/Subtype/Link /BS > /H/O /C[0.65 0.04 0.07] /Contents(Click to Toggle #1!) %/OC > % not honoured by older viewers anyway /A >} #1 \hfill\pdfendlink & \mt@layer{#1true}{\rlap{on}}\mt@layer{#1false}{off}} ```

Re: Modern LaTeX

#168
post #71

Earlier quoted context omitted.

For all the well-deserved complaints about TeX's and LaTeX's syntax, Typst only makes this worse , by repurposing even more characters as markup.

I don't think this was ever my issue with Latex, which instead are mostly: - the cryptic error messages and infinite logs - the unintuitive ways to do stuff like store a value for later use or sum two lengths - the very long compile times - the amount of reliance on global state from various packages, which contributes to even more cryptic errors or weird behavior when something goes wrong - various other quirks, e.g…

You forgot the of syntax that is latex. Very hard to read. (Worked with it for 20 years)

Typst on the other hand is inherently readable.

Re: Modern LaTeX

#169
post #40
post #5

Typst is the modern LaTeX. https://typst.app/

“Pricing”, “Sign Up” Ah yes, this definitely is the “Modern” approach. There does seem to be an open source, non-SAAS part, but information about it looks pretty deliberately buried.

I find today much easier to contribute to (in the open source sense) than latex. Go to the GitHub and interact with the developers. Who happen to be very responsive.

I used latex for 20+ years and don't know how to file a bug for latex. Do I do it for xelatex, latex? Where? How do I update things? Download 4 gigs? Where's to documentation? Where's a book that explains how to contribute to latex? These are some of the issues I've dealt with and am happy to never have to again.

Re: Modern LaTeX

#170

For me Typst replaced Latex years ago. pros: - one small compiler that can output: pdf, png, svg, html - compilation is fast (see below) - syntax is much cleaner than Latex - few ways of to a thing - already has all the templates most people need - tooling is good enough with VS Code - supports SVG images cons: - less users? time typst compile cv.typ ________________________________________________________ Executed i…

A big con is that there are no typst templates for journals and conferences that academics submit papers to. For me, this is a show-stopper. I would love to be able to ditch latex because honestly it's old and it shows a lot , in spite of apologists saying that it's perfect. But 90+% of my usage starts from a conference or journal template, so at the moment it's not gonna happen.

Have you checked out Quarto? There are a lot of templates supported already, and possible to create out of latex if not (or just generate latex from Quarto).
Post reply on HN