Live data from Hacker News

LaTeX3 Automatic Labels for Fun and No Profit

commutative.xyz

61–70 of 90 posts

Re: LaTeX3 Automatic Labels for Fun and No Profit

#61
post #56
post #49

Earlier quoted context omitted.

There are lots of applications that can be used to write math that is converted into LaTeX equations. You can also use MathML -> Latex The equation subset is the best part of LaTeX syntax and so many people learn it. It's very compact compared to alternatives.

I find the typst syntax nicer and more compact: https://typst.app/docs/guides/guide-for-latex-users/#maths I was initially suprised to see that the typst devs chose to go with their own syntax, but I'm now very happy they did.

I would be interested to see how the formula looks for a more complicated equation. For example, Eq 3.12 or 3.31 in the link https://arxiv.org/pdf/2203.09346.pdf

Re: LaTeX3 Automatic Labels for Fun and No Profit

#62
post #53

Earlier quoted context omitted.

Typst does look very nice based on the brief look I took at it, but besides the questions of adoption and entrenchment that have been raised in parallel comments, the choice of Rust as the implementation language is also concerning to me. I think that Rust and the community that surrounds it are associated with a newer, simultaneously somewhat trend-chasing and decidedly paternalistic culture of software engineering…

Rust has enabled much better science at least in my field of Cryptography than whatever nonsense people wrote in C/C++ before. I have the feeling the same is true for other areas like Systems. And it's also laughable to claim that any research paper written in LaTeX is "maintained". It's a one-off job. Nobody is reusing their previous papers as submodules in new ones.

> better code

I'm not disputing that Rust has its advantages; the issues I talk above are mostly problems with the community than the language per se. (On the other hand, we are yet to see how the "import antigravity" attitude will play out once the bits had enough time to rot - it does matter whether your ten-liner test program is only using libc because it was too much work to get a nice pretty-printing library, or whether you imported a pretty-printing library because you could, resulting in 2GB of transitive dependencies of which some have 10 users and 0 active maintainers. And then there's the supply chain security issues)

> maintenance

Surely depends on how fast-moving your field is - I have reused diagram code from late-'90s category theory papers, and recompiled more from source just to get the benefits of the pdflatex pipeline over the latex-dvips-ps2pdf one (selectable text, proper font rendering, hyperref). Repositories like arXiv also may need the ability to recompile old submissions automatically.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#63
post #56

Earlier quoted context omitted.

I find the typst syntax nicer and more compact: https://typst.app/docs/guides/guide-for-latex-users/#maths I was initially suprised to see that the typst devs chose to go with their own syntax, but I'm now very happy they did.

I would be interested to see how the formula looks for a more complicated equation. For example, Eq 3.12 or 3.31 in the link https://arxiv.org/pdf/2203.09346.pdf

should be close to 3.12

  $
  norm((u_0)_j-hat(u)_j (t=0))_(L^2 TT^d) &

Re: LaTeX3 Automatic Labels for Fun and No Profit

#64

Earlier quoted context omitted.

LaTeX grammar is actually very good to type and quite powerful and compact. It's not a programming grammar, it's a markup language. The problem with LaTeX was always the lack of underlying proper programming language and data model. The syntax always has been excellent.

The syntax is full of inconsistencies and it generally user-unfriendly: why is _ allowed only in math mode? Why can't macros have numbers in their names? Why does a simple thing like bolding text require a \textbf? LaTeX is powerful and I use it every day, but let's not pretend it's got qualities it doesn't.

[deleted]

Re: LaTeX3 Automatic Labels for Fun and No Profit

#65

Earlier quoted context omitted.

LaTeX grammar is actually very good to type and quite powerful and compact. It's not a programming grammar, it's a markup language. The problem with LaTeX was always the lack of underlying proper programming language and data model. The syntax always has been excellent.

The syntax is full of inconsistencies and it generally user-unfriendly: why is _ allowed only in math mode? Why can't macros have numbers in their names? Why does a simple thing like bolding text require a \textbf? LaTeX is powerful and I use it every day, but let's not pretend it's got qualities it doesn't.

> why is _ allowed only in math mode?

Because it has different meaning in different context. It's a nice shorthand for subscript in math mode and you still need it as an underscore when you write code or normal text.

> Why can't macros have numbers in their names?

I give you that. That's due to underlying lack of proper programming language.

> Why does a simple thing like bolding text require a \textbf?

What else do you want there? The markdowns * has famously bitten me multiple times when it interfered with my multiplication in math (math + mathjax). Or when the bold needs to cover a full paragraph. I don't have a better suggestion. I'll be happy to hear another one.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#66
post #56

Earlier quoted context omitted.

I find the typst syntax nicer and more compact: https://typst.app/docs/guides/guide-for-latex-users/#maths I was initially suprised to see that the typst devs chose to go with their own syntax, but I'm now very happy they did.

I would be interested to see how the formula looks for a more complicated equation. For example, Eq 3.12 or 3.31 in the link https://arxiv.org/pdf/2203.09346.pdf

here's 3.31:

  $
  cal(C)(M) = cal(E)_T^t (theta, cal(S)_t)^2 + C_t M_t^(-2/d)
  + cal(E)_T^"PDE" (theta_t, cal(S)_"int")^2 + C_"PDE" M_"int"^(-2/(d+1)) \
  + C_1T^(1/2) [cal(E)_T^"div" (theta, cal(S)_"int") + C_"div" M_"int"^(-1/(d+1))
  + (1+nu)(cal(E)_T^s (theta, cal(S)_s) + C_s M_s^(-1/d))]
  $
Would you have the equivalent LaTeX code for comparison?

Re: LaTeX3 Automatic Labels for Fun and No Profit

#67
post #53
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 does look very nice based on the brief look I took at it, but besides the questions of adoption and entrenchment that have been raised in parallel comments, the choice of Rust as the implementation language is also concerning to me. I think that Rust and the community that surrounds it are associated with a newer, simultaneously somewhat trend-chasing and decidedly paternalistic culture of software engineering…

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-implementing some of Knuth's typesetting work in Rust. Contrary to your claim, my project is obsessed with backwards compatibility and making sure the output is identical to Knuth's. Last weekend I even discovered a ~30-year old bug in one of Knuth's programs [1] as part of an extensive fuzzing effort. (Of course, I re-implemented Knuth's bug in my Rust code [2].)

[1] https://tug.org/pipermail/tex-k/2024-March/004031.html [2] https://github.com/jamespfennell/texcraft/commit/e89b7461780...

Re: LaTeX3 Automatic Labels for Fun and No Profit

#68
post #66

Earlier quoted context omitted.

I would be interested to see how the formula looks for a more complicated equation. For example, Eq 3.12 or 3.31 in the link https://arxiv.org/pdf/2203.09346.pdf

here's 3.31: $ cal(C)(M) = cal(E)_T^t (theta, cal(S)_t)^2 + C_t M_t^(-2/d) + cal(E)_T^"PDE" (theta_t, cal(S)_"int")^2 + C_"PDE" M_"int"^(-2/(d+1)) \ + C_1T^(1/2) [cal(E)_T^"div" (theta, cal(S)_"int") + C_"div" M_"int"^(-1/(d+1)) + (1+nu)(cal(E)_T^s (theta, cal(S)_s) + C_s M_s^(-1/d))] $ Would you have the equivalent LaTeX code for comparison?

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.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#69
post #66

Earlier quoted context omitted.

I would be interested to see how the formula looks for a more complicated equation. For example, Eq 3.12 or 3.31 in the link https://arxiv.org/pdf/2203.09346.pdf

here's 3.31: $ cal(C)(M) = cal(E)_T^t (theta, cal(S)_t)^2 + C_t M_t^(-2/d) + cal(E)_T^"PDE" (theta_t, cal(S)_"int")^2 + C_"PDE" M_"int"^(-2/(d+1)) \ + C_1T^(1/2) [cal(E)_T^"div" (theta, cal(S)_"int") + C_"div" M_"int"^(-1/(d+1)) + (1+nu)(cal(E)_T^s (theta, cal(S)_s) + C_s M_s^(-1/d))] $ Would you have the equivalent LaTeX code for comparison?

Thanks for your effort. With this example, I started testing typst again and it does look to have improved quite a bit. And it is of course extremely fast.

Re: LaTeX3 Automatic Labels for Fun and No Profit

#70

Earlier quoted context omitted.

I would be interested to see how the formula looks for a more complicated equation. For example, Eq 3.12 or 3.31 in the link https://arxiv.org/pdf/2203.09346.pdf

should be close to 3.12 $ norm((u_0)_j-hat(u)_j (t=0))_(L^2 TT^d) &

Thanks for your effort. This was instructive. Seems there's a decent alternative to LaTeX. May be over time it becomes as powerful in all respects.
Post reply on HN