4 ms·
It's a shame that TeX the great typesetting system comes with TeX the ungodly complex language. There's literally no chance to create good tooling for TeX becau
by choeger 2y ago
It's a shame that TeX the great typesetting system comes with TeX the ungodly complex language. There's literally no chance to create good tooling for TeX because of this. There's very little chance to optimize rendering of large documents because of it (e.g., by automatic parallelization). Finally, there's never going to be a readable error message from TeX.
TeX the language is the prime example of gatekeeping.
OTOH, no one has ever succeeded in creating and popularizing a context-free language that compiles to TeX.
- SassyBird 2y ago> Finally, there's never going to be a readable error message from LaTeX. FTFY. If you learn TeX from Knuth’s TeX book, along with the typographical concepts it works with, the error messages generated by documents written in raw TeX are understandable. LaTeX on the other hand is what the metaprogramming-heavy Boost/STL libraries are to C or C++. Abandon all hope.
- breck 2y ago> If you learn TeX from Knuth’s TeX book https://visualmatheditor.equatheque.net/doc/texbook.pdf https://visualmatheditor.equatheque.net/doc/texbook.pdf +1 on this. That book is fantastic, one of my favorites. It's been a couple of years since I last read it, and your comment reminded me that I should probably skim again.
- WillAdams 2y agoExcept that PDF shouldn't exist since it was generated in flagrant disregard for the copyright/comment: % This manual is copyright (C) 1984 by the American Mathematical Society. % All rights are reserved! % The file is distributed only for people to see its examples of TeX input, % not for use in the preparation of books like The TeXbook. % Permission for any other use of this file must be obtained in writing % from the copyright holder and also from the publisher (Addison-Wesley). \loop\iftrue \errmessage{This manual is copyrighted and should not be TeXed}\repeat If you want a free PDF on TeX try _TeX for the Impatient_: https://tug.ctan.org/info/impatient/book.pdf https://tug.ctan.org/info/impatient/book.pdf If you want a copy of _The TeXbook_, buy it.
- wrs 2y agoI love the subtle humor in misusing “copyright” as a verb and then misusing “TeX” the same way.
- dunham 2y agoYeah, I always used plain TeX back in the day because I could understand it. LaTeX always seemed unnecessarily complex.
- dhosek 2y agoOne of the things I decided to do with finl was to formalize on LaTeX’s syntax. No more shifting category codes, Separating out the lexer definition of commands from their meaning also means that tooling becomes simpler. Throw in proper variables so there’s no longer the need for redefining macros to emulate variables and it becomes a little more tractable. That said, even with these restrictions, writing a good lexer/parser of a LaTeX-like syntax is still a challenge (and made all the slower by the needs to earn money, spend time with my kids and have other joys in life).
- breck 2y ago> It's a shame that TeX the great typesetting system comes with TeX the ungodly complex language You hit the nail on the head. Brilliant design of the typesetting system, not an ergonomic language. I think over the next few years Scroll (https://scroll.pub/ https://scroll.pub/) will become the language all academics use to publish papers.(Or another markdown like alternative, but ours will be _very_, _very_ good) You are always in an ergonomic, simple, fun, forgiving high level language (Scroll), but then you can dip down into TeX whenever you want for its beautiful 2D math rendering (thanks to KaTeX library). We don't have great automatic whole document PDF generation yet (you still have to manually save as PDF from your web browser), but we will get there. If anyone really wants this please shoot me an email--fun to get more passionate beta users that can help us steer priorities and build something free and great for paper writers all across the globe.
- me_vinayakakv 2y agoTypst[1] is another tool which implements document generation from the ground up. Zerodha had a great article [2] how they migrated from LaTeX based pdf generation to Typst, which ended up saving time and compute. [1]: https://typst.app/ https://typst.app/ [2]: https://zerodha.tech/blog/1-5-million-pdfs-in-25-minutes/ https://zerodha.tech/blog/1-5-million-pdfs-in-25-minutes/
- jjmarr 2y agoPeople say TeX doesn't have good tooling but I can't think of any other language where I can seamlessly intermix circuit diagrams with equations and plots. It's really nice to be able to draw on an axis coordinate system (pgfplots with TikZ), as an example. The language itself is horrible and the skill floor is too high but the Turing completeness enables a ton of wacky features that would never be allowed in something like Mathematica.
- g15jv2dp 2y agoI think you're misunderstanding what "tooling" means here. Even determining what line (or even file!) in your document is the source of an error or warning is sometimes a nightmare.
- almostgotcaught 2y ago[dead]
- omoikane 2y agoI don't think a language is complex just because it's not context free, since any language that supports syntactic macros of some sort are not context free. Neither M4 nor C++ are context free, but C++ is usually considered more complex than M4. Still, multiple parsers and great tooling exist for C++, and the error messages have gotten much better in recent years. This is probably because companies needed them for different reasons, and they have the resources to build alternatives.
- graycat 2y ago> TeX the ungodly complex language A friend, although he is a good mathematician, kept criticizing TeX, so I explained one view of it: TeX was not intended to be some new big steps forward in interactive user interface, to replace Microsoft's Word, HTML or Mathematica, or for making images or movies. Instead, TeX was, first, for something he knew well -- the journal of the AMS (American Mathematical Society). For doing the word processing for the AMS, TeX was a nice step forward from what went before. TeX seems fine to me, just the way it is. Started with Knuth's book and also got his file of TeX source his book. The book is easier to read, but with my favorite text editor KEDIT sometimes the file is easier to search. Also with the TeX software have the Windows program to display the formatted output on a screen and the program to write the output to a PDF file. Both work fine. It appears that Knuth made commendable efforts to get any bugs out of TeX. Wrote some macros for TeX: The main collection has, just checked, 86 macros. Also have macros for some special purposes, e.g., foils, inserting images, verbatim, business cards, etc. Use TeX for business letters; used TeX for the last paper I published: The paper had a lot of tricky math notation, and TeX handled that well. The journal seemed quite pleased to get the TeX input with my macros; then they were able to format the paper right away. When rusty with TeX, my old papers, letters, etc. and macro collections get me productive again quickly. Since I like TeX so much and since the philosophy of LaTeX seems different, never used LaTeX. Knuth's book shows that it's possible to write long documents with TeX.
- WillAdams 2y agoMore importantly, TeX resulted in the concept of "Literate Programming" as exemplified by the books: _TeX: The Program_ and _METAFONT: The Program_ I've found that LP allows me to be successful working on projects which are more complex and of greater length than other tools allow me to --- worst case is I find myself reading through a nicely typeset hyperlinked PDF until I understand the code I need to modify and am then able to control/command click to go right to it in the editor. I've been trying to put together a list of Literate Programs published as books: https://www.goodreads.com/review/list/21394355-william-adams?ref=nav_mybooks&shelf=literateprograms https://www.goodreads.com/review/list/21394355-william-adams...
- 2y ago
- cryptonector 2y agoSome people say that TeX lacks tooling the same way that people say that of ASN.1. Those are the people that then go on to reinvent the same thing badly, like ProtocolBuffers (which is remarkably similar to DER but with different syntax).
- WillAdams 2y agoOne of the things which Knuth expected was that folks would take the TeX source code and create customized versions for specific typesetting tasks.