Live data from Hacker News

LaTeX3 Automatic Labels for Fun and No Profit

commutative.xyz

81–90 of 90 posts

Re: LaTeX3 Automatic Labels for Fun and No Profit

#81
post #8

I still wonder why anyone would create such awful grammar for a programming language. Considering LaTeX's initial release was 40 years ago, there were certainly other programming languages from which to draw inspiration. And I certainly don't believe that LaTeX DSL was the most suitable solution for solving typesetting problems.

I would say that the TeX language was designed for the final user to add the "last mile", not for piling layers of macrosubstitution on top of something akin to lambda calculus. As amazing a feat of engineering LaTeX is, it has abused the TeX language beyond its natural limits. The price paid in complexity for abstraction was high. But the TeX language itself is a tiny elegant language.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#83
post #14
post #6

> Yes, we are aware of typst. I think it’s cool, but C++ hasn’t replaced C, Rust hasn’t replaced C++, Typst is unlikely to replace LaTeX. Likewise, many are aware of LuaTeX, but, again, the entrenching of a 40-odd year system is not to be underestimated. I am rooting for typst, anyway, and hope it finds its place. Well here's the process I went through in the last few years: I found out about LuaTeX, saw it was suppo…

Typst is exciting, but I wish their roadmap would prioritize features in common use in LaTeX like microtype rather than niche new features like style revocation.

Microtype features are already incorporated. See this issue: https://github.com/typst/typst/issues/261#issuecomment-14886...

Re: LaTeX3 Automatic Labels for Fun and No Profit

#84
post #83
post #14

Earlier quoted context omitted.

Typst is exciting, but I wish their roadmap would prioritize features in common use in LaTeX like microtype rather than niche new features like style revocation.

Microtype features are already incorporated. See this issue: https://github.com/typst/typst/issues/261#issuecomment-14886...

The only microtype feature currently supported in typst is overhang, and only for seven hardcoded punctuation characters. See the code here:

https://github.com/typst/typst/blob/10a3fbd174fc1a3f95937c91...

It's basically a kludge; there's a lot more work needed to actually implement even overhang properly.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#85

Earlier quoted context omitted.

pandoc is seriously under-powered for the kinds of things that LaTeX and Typst can do. Much of the information in Typst/LaTeX source code would simply be ignored during the conversion. It is fine for simple documents, but cannot handle a lot of stuff.

Pandora offers a superset of LaTeX and any other markup languages as long as you’re not using it for final rendering. I have a Markdown+LaTeX project I’m working on and try to write mostly in markdown, but can drop down into LaTeX in-line if need be. I compile a tex file with Pandoc and render with pdflatex, bibtex, makeindex, etc., etc.

This is not the workflow being discussed. Yes, you can use Pandoc Markdown (in which you can embed LaTeX) and then Pandoc can parse the markdown and produce a LaTeX file. But the actual typesetting is still done by LaTeX; here Pandoc is basically just a preprocssing step.

what was being discussed is using Pandoc to convert from Typst to LaTeX, which it can't really do because its internal document representations are not as expressive as either Typst or LaTeX.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#86
post #6

> Yes, we are aware of typst. I think it’s cool, but C++ hasn’t replaced C, Rust hasn’t replaced C++, Typst is unlikely to replace LaTeX. Likewise, many are aware of LuaTeX, but, again, the entrenching of a 40-odd year system is not to be underestimated. I am rooting for typst, anyway, and hope it finds its place. Well here's the process I went through in the last few years: I found out about LuaTeX, saw it was suppo…

Many of the equations and syntax I used in my PhD work can't be written in Typst. For instance, Young Tableaus, or commutation diagrams. Or circuits generated from inline code. I am not even sure if it has been coded in a way to support such extensions.

So I would not recommend a new PhD student (actually undergrad student) to learn Typst just yet.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#87
post #8

I still wonder why anyone would create such awful grammar for a programming language. Considering LaTeX's initial release was 40 years ago, there were certainly other programming languages from which to draw inspiration. And I certainly don't believe that LaTeX DSL was the most suitable solution for solving typesetting problems.

Having studied a lot of the TeX source code and re-implemented portions of it, my theory is that it's the result of the TeX language evolving organically in a software development environment in which large scale refactoring is impossible. (Knuth didn't have source control, or unit tests, and the language he wrote TeX in has little-to-no support for meaningful abstractions. All of these make refactoring safely hard or impossible.) If you can't refactor, but still want to add a new feature, your only option is to implement things in a hacky way on top of existing features. This then bleeds into the TeX language itself.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#88
post #77

Earlier quoted context omitted.

It should be in the LaTeX sources on the website. This does look much more compact though. Just to now push it a little. I wonder if I can make the `1/(d+1)` in the superscript be not a real fraction but inline fraction.

Here are the LaTeX versions from the article source: \begin{align} \begin{split} \mathcal{C}(M) = &\: \Et^t(\theta,\S_t)^2 + C_t M_t^{-\frac{2}{d}} + \Et^\pde(\theta,\S_\inte)^2 +C_\pde M_\mathrm{int}^{-\frac{2}{d+1}}\\&+ C_1{T}^{\frac{1}{2}} \bigg[\Et^\divv(\theta,\S_\inte) +C_\divv M_\mathrm{int}^{-\frac{1}{d+1}}+(1+\nu) big( \Et^s(\theta,\S_s) + C_s M_s^{-\frac{1}{d}}\big)\bigg],\\ \end{split} \end{align} and for…

Yup. Much more verbose. However, I must admit, all the unescaped names in Typst leaves me with any eerie feeling. It seems a ground ripe for a name conflict at some point. Or a bottleneck for customization like calligraphic C or script C.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#89
post #72

Earlier quoted context omitted.

I think the idea in this comment -- that users of languages inherit all of the perceived negatives of the community developing the language -- is just wrong. (I say "perceived" because some of the claims in this post are simply incorrect, such as the claim the Rust language developers think "backwards compatibility may actually be considered an anti-goal".) For example, over the last couple of years I've been re-impl…

I didn't claim anything about your project at all. A claim about a perceived tendency does not amount to asserting an absolute rule. That being said, though, for any major project, it's hard to overstate the long-term effect of community pressure. I maintain a moderately-sized project using Gtk for its GUI, and am personally deeply opposed to the RHEL blob (which Gtk/Gnome belongs to)'s culture of "windowsification"/…

Thank you for your very thoughtful response. This has given me food for thought.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#90
post #6

> Yes, we are aware of typst. I think it’s cool, but C++ hasn’t replaced C, Rust hasn’t replaced C++, Typst is unlikely to replace LaTeX. Likewise, many are aware of LuaTeX, but, again, the entrenching of a 40-odd year system is not to be underestimated. I am rooting for typst, anyway, and hope it finds its place. Well here's the process I went through in the last few years: I found out about LuaTeX, saw it was suppo…

Many of the equations and syntax I used in my PhD work can't be written in Typst. For instance, Young Tableaus, or commutation diagrams. Or circuits generated from inline code. I am not even sure if it has been coded in a way to support such extensions. So I would not recommend a new PhD student (actually undergrad student) to learn Typst just yet.

Could you give some examples of these equations?

The ecosystem for the kind of things you mention is expanding rapidly, have a look at these:

https://typst.app/universe/package/fletcher

https://typst.app/universe/package/quill

https://github.com/fenjalien/cirCeTZ

These are based on CeTZ: https://github.com/johannes-wolf/cetz , a kind of TikZ for typst. I don't see anything for Young Tableaux but it should be easy to do based on that.

Post reply on HN