Live data from Hacker News

Why is TeX still used? What are some good, modern alternatives?

tex.stackexchange.com

21–30 of 127 posts

Re: Why is TeX still used? What are some good, modern alternatives?

#21
I very much agree with the sentiment. LaTeX works well and it produces the best technical documents of anything I've seen, but the world could really use a modernized replacement. The syntax is a pain in the ass, the error messages are horrible, and it takes documentation to figure out how to do anything new. If it could be made more user friendly I think something like Tex would be used much more widely as well. (It works with version control, unlike word docs which are hell to manage in group collaboration.)

Re: Why is TeX still used? What are some good, modern alternatives?

#22
post #7

I got tired of OpenOffice's IMHO clunky formula editor, so I thought: "Ah ha! Pros use TeX! So should I!" Then I saw how much fingertyping is necessary to reproduce what I was doing in OO, and I went back. Of course, I was trying to kill a field mouse with a nuke, so I should have expected to be disappointed. Any recommendations for a math-friendly TeX-lite for those of us who don't need all that power?

if you want a gui equation editor, check out lyx [ http://www.lyx.org/ ], which uses tex as its backend. texmacs [ http://www.texmacs.org/ ] is another option worth exploring.

I can recommend LyX as well, it makes authoring LaTeX documents much easier. The formula editor is nice, and it makes editing tables a lot more convenient.

Re: Why is TeX still used? What are some good, modern alternatives?

#23
post #17
post #7

Earlier quoted context omitted.

if you want a gui equation editor, check out lyx [ http://www.lyx.org/ ], which uses tex as its backend. texmacs [ http://www.texmacs.org/ ] is another option worth exploring.

Texmacs often get recommended, but I haven't seen any arguments for it that are compelling. I guess there must be a case for it, else no one would work on it. What do you like about it?

it's a decent middle ground between the clunkiness of wysiwyg word processors and the typing-to-reward ratio of pure markup. personally i prefer just writing markup in ascii, but if you want some of the control of tex, but dislike doing that much typing, texmacs or lyx might be just what you are looking for.

Re: Why is TeX still used? What are some good, modern alternatives?

#24

I got tired of OpenOffice's IMHO clunky formula editor, so I thought: "Ah ha! Pros use TeX! So should I!" Then I saw how much fingertyping is necessary to reproduce what I was doing in OO, and I went back. Of course, I was trying to kill a field mouse with a nuke, so I should have expected to be disappointed. Any recommendations for a math-friendly TeX-lite for those of us who don't need all that power?

If you're creating a lot of lists and (especially) nested lists, Emacs' Org Mode (now part of the standard GNU Emacs package) is worth learning. You can export it to LaTeX and HTML directly.

Re: Why is TeX still used? What are some good, modern alternatives?

#25
post #14
post #5

LuaTeX can be used as a PDF writing library that has a "perfect" line breaking algorithm inside along with many other nice features. We use it as a base for our database publishing tool. Its absolutely reliable, has modern features (unicode, OTF) and can be programmed in a very decent language (Lua). You need to know TeX if you want to unleash all the power, but you don't need to program in TeX's macro language (whic…

Agreed. Luatex makes the following division of labour practical: work with data structures and manipulate fonts and the backend in Lua, handle moving about text and setting parameters in the macro language. One thing I would like to see is proper static analysis tools for Luatex. Lua has tools like https://github.com/fab13n/metalua/tree/master/src/samples/me... but there's nothing of comparable sophistication for Tex…

The problem is that you can change TeX's syntax during the run time. I am not sure if it is theoretically possible to create such a tool for TeX input. That is one of the reason why I use (except for approx 10 lines of TeX code) only Lua code in my software. These 10 lines will disappear once there is a tex.initialize() in LuaTeX.

Re: Why is TeX still used? What are some good, modern alternatives?

#26

The reason TeX is still used is because it is open source and beautiful, because it is the best at handling mathematical notation, and because of its inertial dominance in math and the hard sciences in Academia. The reason TeX has so, so many fixable problems after 30 years is because there is no financial incentive for anyone to fix it. The answer is not to find a TeX alternative. This will not be possible in Academ…

seamlessly hide the compilation process

There are several editors for Tex&co that do on-the-fly compilation. Have you seen Kile's two panelled interface, for example?

feature a modern debugging environment

Well, this is a problem with the language: macro expansion is notoriously tricky to debug. I'd like to see work done on a static analyser for Tex.

robustly handle all modern image types

This is not a problem I have ever had. What are you thinking of? The only file types needing special handling in Luatex are Postscript and SVG; both convert painlessly to PDF, and the converter can be run automatically by Luatex.

Re: Why is TeX still used? What are some good, modern alternatives?

#27
I feel that the OP misunderstands TeX's virtues: it is a very powerful typesetting system whose macro system happens to be Turing complete. Typesetting is the hard problem and TeX has solved it so well that most people wanting to build a text-driven typesetting system has built on top of TeX rather than trying to replicate it. This is especially true for typesetting equations.

If you try to use TeX as a programming language, you're going to be disappointed, as the OP seems to have been. The macros work well enough for saving typing by making simple substitutions, which is what most people use them for. But using them for anything more complicated is a bit of a black art. Somewhere I read that Leslie Lamport wrote out LaTeX in pseudo-code first and then translated it into macros. Knuth was impressed by what Lamport was able to do with a system which was not meant to be a general-purpose programming language.

In the end, I think Knuth was correct to make TeX's input focused on document entry and not on programming. I've never used it, but LuaTeX seems interesting because I think it's better to use an external language for programming rather than one embedded in a document layout format.

Re: Why is TeX still used? What are some good, modern alternatives?

#28
post #11

The reason TeX is still used is because it is open source and beautiful, because it is the best at handling mathematical notation, and because of its inertial dominance in math and the hard sciences in Academia. The reason TeX has so, so many fixable problems after 30 years is because there is no financial incentive for anyone to fix it. The answer is not to find a TeX alternative. This will not be possible in Academ…

I would disagree that the base is wonderful and it's the editors that are bad. At least in LaTeX there are a multitude of packages to do any given thing, all with varying levels of completeness, and most with incompatibilities between them. Leaky abstractions abound, and the way the macro language works probably makes this easier. The features you mention would be needed to put it in front of less geeky users but are…

The core algorithms are pretty creaky as well. Knuth did a brilliant job coming up with efficient algorithms that could do a fairly good job at breaking lines/paragraphs/pages and could handle book-length documents even on 70s-era hardware, but they've had minimal improvement since then. Figure placement in particular is pretty bad, especially for two-column, relatively short conference papers, which is currently a frequent TeX use case. And all of those things are really hard to exercise any control over, with black-magic parameters that often don't have obvious effects ("goddammit, why won't it put the figure at the top of page 5?!").

LuaTeX does seem to be experimenting with some improvements in these areas though.

Re: Why is TeX still used? What are some good, modern alternatives?

#29
post #14

Earlier quoted context omitted.

Agreed. Luatex makes the following division of labour practical: work with data structures and manipulate fonts and the backend in Lua, handle moving about text and setting parameters in the macro language. One thing I would like to see is proper static analysis tools for Luatex. Lua has tools like https://github.com/fab13n/metalua/tree/master/src/samples/me... but there's nothing of comparable sophistication for Tex…

The problem is that you can change TeX's syntax during the run time. I am not sure if it is theoretically possible to create such a tool for TeX input. That is one of the reason why I use (except for approx 10 lines of TeX code) only Lua code in my software. These 10 lines will disappear once there is a tex.initialize() in LuaTeX.

I'm quite sure flow-based static analysis can be done for Tex, the question is how expensive it is to perform and how useful the results are.

With respect to catcode-changing code, you can model its possible execution paths: while you can construct example Tex code where you can't infer anything past this point without having complete information from before, in practice with, say a package, you do have example documents which the package is meant to work with, and you can use that in the static analysis.

I've thought about this a fair bit, at least in the context of typical Plain Tex, but not written much code. I should try and enough time for a proof of concept: there's a lot that could be built on it.

Re: Why is TeX still used? What are some good, modern alternatives?

#30
post #11

Earlier quoted context omitted.

I would disagree that the base is wonderful and it's the editors that are bad. At least in LaTeX there are a multitude of packages to do any given thing, all with varying levels of completeness, and most with incompatibilities between them. Leaky abstractions abound, and the way the macro language works probably makes this easier. The features you mention would be needed to put it in front of less geeky users but are…

The core algorithms are pretty creaky as well. Knuth did a brilliant job coming up with efficient algorithms that could do a fairly good job at breaking lines/paragraphs/pages and could handle book-length documents even on 70s-era hardware, but they've had minimal improvement since then. Figure placement in particular is pretty bad, especially for two-column, relatively short conference papers, which is currently a f…

I don't have any insight at that level of abstraction. Figure placement like a bunch of other things has required me to hack around to get my desired result. Is there any newer research on these algorithms that could make it better given much better hardware?

As for LuaTex I wasn't able to find any examples of actual markup written in it. I would expect that for the actual markup you'd want a language with a bigger and more flexible grammar so you could build DSLs. Ruby seems particularly good at that kind of stuff, but I'm biased there.

Post reply on HN