News for hackers. Stuff that matters.
Re:KaTeX – The fastest math typesetting library for the web by whatever1 on Sunday October 11, 2020 @12:24AM (#24743710)
I don’t understand why the whole math related community have conditioned ourselves to tolerate the horrible *tex macro language universe and its tool chain for almost half a century.

Debugging is horrible, syntax is unnecessarily verbose, formatting is hit or miss, portability is pure lottery, compiling is suuuper slow.

When I write text in an editor, it just works. Why for math do I have to spend all of these additional computing cycles?

I don’t have an alternative (if I had I would have started a company), I just know that I hated all of the hours I wasted formatting math manuscripts and I wish somebody could stand up and go against Knuth’s way of thinking.

Re:KaTeX – The fastest math typesetting library for the web by maxnoe on Sunday October 11, 2020 @02:47AM (#24744175)
For people caring about typography there is nothing that reaches the output quality of TeX / LaTeX.

And that is not limited to math type setting, it holds for normal text.

Also, automatic tocs, I ist, bibliography with biblatex/biber.

Error messages are improving using modern packages.

The biggest problem ist the complete absence of dependency management. TeX distributions break regularly and the require workarounds because some package introduced a breaking change.

Re:KaTeX – The fastest math typesetting library for the web by AkshatM on Tuesday October 13, 2020 @09:37PM (#24772310)
This is platform-dependent. On Windows, MikTeX is the standard way to work with LaTeX and it bundles a package manager for you.
Re:KaTeX – The fastest math typesetting library for the web by auggierose on Sunday October 11, 2020 @01:51AM (#24744004)
It is because TeX provides the only acceptable output quality right now; also, TeX is like the C of math type setting. So whatever your improved solution is, it will have to include TeX at least partially, like MathJax or KaTeX.

It is what you get when you have a genius like Knuth taking math typesetting seriously. To get something better, you need somebody similar sitting down and take another serious stab at it.

Re:KaTeX – The fastest math typesetting library for the web by setr on Monday October 12, 2020 @03:54AM (#24752322)
Well, the complaint is mostly surface-level; I'm not sure if there's anything really stopping obe from treating tex as an engine/compile-target, and entirely changing the language that way

Afaik other *tex systems do it in the form of suites of tex macros, but no one really attempts to deviate from tex altogether

Re:KaTeX – The fastest math typesetting library for the web by franga2000 on Sunday October 11, 2020 @04:55AM (#24744558)
Adding to this, LaTeX is entirely incapable of producing even remotely accessible PDFs. If you're extremely lucky, you might be able to copy a single word or even multiple, but line breaks, inline equations and basically anything else breaks it entirely, which is not only incredibly annoying for citing things, but makes it entirely unusable for visually-impaired people.

Additionally, if equations are the the main appeal of it, how have we not made anything better? Why can't I plug the same code that renders my paper into a solver or convert it into Julia and run it? Like, properly, not just by guessing. I get that *tex is a typesetting language, but we're not typesetters!

Re:KaTeX – The fastest math typesetting library for the web by ezluckyfree on Sunday October 11, 2020 @11:48AM (#24746575)
If publishers provided the TeX source, you could do this.

I don't really see this as an issue. TeX is just a language that can be translated into PDFs for visual consumption well, but it could similarly be translated into audio or code (in the case of equations), we just can't do that because publishing TeX isn't something we do for some reason.

Re:KaTeX – The fastest math typesetting library for the web by franga2000 on Sunday October 11, 2020 @12:09PM (#24746749)
The problem is that you really can't. Tex isn't semantic, it's visual. Even matrix transposition, one of the most basic things in linear algebra, is written differently by different people. I've seen plenty of people just write ^T, which requires an amount of contextual awareness a parser just cannot have to differentiate from just raising something to the power of "T".
Re:KaTeX – The fastest math typesetting library for the web by filmor on Sunday October 11, 2020 @06:59AM (#24744945)
Mathematical notation is context-dependent and denser than code, you can't map directly from one to the other.
Re:KaTeX – The fastest math typesetting library for the web by vcxy on Sunday October 11, 2020 @10:28AM (#24746038)
The main appeal isn't merely equations. The appeal is that it produces the best typesetting for prose and equations both.
Re:KaTeX – The fastest math typesetting library for the web by cycomanic on Sunday October 11, 2020 @01:46AM (#24743980)
Genuine question, what is the alternative in your view. All visual editors that I've ever used are much more cumbersome unless they take latex syntax.

Sure one could come up with some markup language that would have an easier syntax for relatively simple cases (see e.g. the post a bit further down), but to actually support the complex formulas that latex supports we would quickly end up with something very similar to latex.

Re:KaTeX – The fastest math typesetting library for the web by cycomanic on Sunday October 11, 2020 @01:49AM (#24743997)
I should clarify (I'm aware that you said you don't have an alternative). My question is of what type/form the alternative should take.
Re:KaTeX – The fastest math typesetting library for the web by whatever1 on Sunday October 11, 2020 @10:08AM (#24745886)
I think that a new paradigm should try to achieve the following: 1) Be based on code that can be machine interpreted and used afterwards in computations. Maybe this will require a more standardized way of writing math (like the apl that was suggested). 2) Be based on source code that is not cluttered and can be read easily by a human (maybe like markdown) 3) Most important of all: Formatting should be a completely independent layer. My original equations should have nothing more than math, it should be the renderer's business of how to present it to the consumer (webpage, pdf or whatever). It should be very easy for example to change the alignment of your equations a-posteriori without messing with the equations themselves.
Re:KaTeX – The fastest math typesetting library for the web by vcxy on Sunday October 11, 2020 @10:45AM (#24746142)
1 feels too restrictive. I'm not sure how easily it would allow for writing math that isn't yet amenable to machine computation. Just as a random example, what if I'm doing some Étale cohomology stuff, maybe throw in some stacks and whatever else. How impressive would this code have to be?
Re:KaTeX – The fastest math typesetting library for the web by whatever1 on Sunday October 11, 2020 @11:17AM (#24746344)
We can have multiple "interpretation modules" and for some fields these will produce more useful output than for others. Currently, you cannot even attempt at doing so since the tex equations are typically polluted with formatting related code.
Re:KaTeX – The fastest math typesetting library for the web by moonchild on Sunday October 11, 2020 @01:53AM (#24744008)
The problem is that mathematical notation itself is insanely complex and very nuanced, so any attempt to replicate it digitally will also be insanely complex.

A better solution IMO is an alternate mathematical notation which can be simple and unambiguous not only for humans, but also computers. Something like apl - https://www.jsoftware.com/papers/tot.htm

Re:KaTeX – The fastest math typesetting library for the web by snicker7 on Sunday October 11, 2020 @02:48AM (#24744179)
You should look into GNU TeXMacs [^0]. Its formulas (and document structure) are composed of S-Expressions that the user can edit directly. But it has a "TeX"-like UI (typing '\int' renders an integral symbol). Producing documents is an order of magnitude faster than LaTeX. And the quality is comparable.

[^0] https://www.texmacs.org/tmweb/home/welcome.en.html

Re:KaTeX – The fastest math typesetting library for the web by copperx on Sunday October 11, 2020 @06:20PM (#24749594)
What a terrible name! You have to read the documentation to discover the typesetting is not based on TeX, and the editor isn't Emacs.
Re:KaTeX – The fastest math typesetting library for the web by lejalv on Sunday October 11, 2020 @04:07AM (#24744395)
The TeXmacs book is just out: https://www.scypress.com/book_info.html
Re:KaTeX – The fastest math typesetting library for the web by qd6pwu4 on Sunday October 11, 2020 @12:34AM (#24743748)
Yes, it's a pain to write math related manuscripts.

Normal texts are a simple character list, so they are easy to input. Math equations are much more complex, with more symbols, 2D placement. So we need to 'mark up' the normal texts to provide enough information for a proper math equation.

Current machine learning can help translate hand-written equations into the one computer can understand, I think this can help a lot. However, if we want to use keyboard only, it still seems very hard to design a system that can input math as smooth as texts without 'mark up' or GUI.

Re:KaTeX – The fastest math typesetting library for the web by runarberg on Sunday October 11, 2020 @01:31AM (#24743929)
I gave this problem a stab a few years ago. I wrote an ascii-math derived language (but more powerful, and a little easier) called MathUp. I planed for it to be quick to write and easy to read (kind of like markdown for math). However it is not nearly as powerful as latex (and I don’t plan for it to be). Target are people that are writing quick math-notes (e.g. in class), or on forums where participants don’t necessarily know latex but might need to write a non-trivial equation or two.

https://runarberg.github.io/mathup/

Re:KaTeX – The fastest math typesetting library for the web by Tainnor on Sunday October 11, 2020 @10:16AM (#24745942)
I agree that the LaTeX toolchain is bad, although there are some tools that make it better:

- latexmk knows how often it will need to compile a document in order to get all references right etc.

- pandoc lets you write markdown and converts it to LaTeX (although, if you have to write a lot if math you'll have to use LaTeX mode so often that it's worth considering whether that buys you anything... it's great for short, more textual documents that you want to format nicely though)

- XeTeX removes all the unicode and font problems and lets you actually include fonts on your system

- verbosity can be reduced somewhat by macros

But it's true. LaTeX kind of sucks (which is not really Knuth's "fault", since he only invented TeX and not LaTeX), the syntax errors can be very annoying (trying to hunt for that one missing paren or $...), packages constantly break other packages and totally absurd ways, and worst of all, the maths commands are entirely non-semantic (I've tried parsing maths expressions from LaTeX, it's not pretty), etc.

It's just that there is nothing better for maths right now, and even if there were, good luck fighting all the institutional inertia.

Re:KaTeX – The fastest math typesetting library for the web by tombert on Sunday October 11, 2020 @01:18AM (#24743891)
I don't really agree with you being downvoted; I love LaTeX, I use it for basically any kind of mathey stuff that I need, but it is an objectively irritating language, especially for beginners.

That said, the fact is that for mathematical equation editing, for better or worse, TeX-based systems have a near-monopoly on high-quality typesetting; KaTeX giving us a fast, easy-to-use implementation of it is still a net good.

Re:KaTeX – The fastest math typesetting library for the web by monadic2 on Sunday October 11, 2020 @09:53AM (#24745763)
There are plenty of alternatives. People don't use them.