8 ms·
The TeX tuneup of 2014 [pdf]
- vsbuffalo 12y agoTeX reminds me of GCC — huge, complex codebase, unhelpful error messages, and designed to just be a compiler/typesetter. I wish someone were to rewrite an LLVM-like TeX system. Simpler code, could be used to write libraries to do live syntax checking and formatting, beautiful error messages, and fast typesetting times.
- kumbasha 12y agoSee: http://www.youtube.com/watch?v=eKaI78K_rgA http://www.youtube.com/watch?v=eKaI78K_rgA
- kachnuv_ocasek 12y agoGCC is on par with LLVM performance-wise, and, as of the latest version, has those "beautiful" messages as well.
- coherentpony 12y agoDo you have a reference for that statement? Does LLVM support the C++11 standard? And does it support OpenMP?
- conradev 12y agohttp://clang.llvm.org/cxx_status.html http://clang.llvm.org/cxx_status.html http://clang-omp.github.io/#status http://clang-omp.github.io/#status
- LeonidasXIV 12y agoAbout the error messages in GCC 4.8: http://gcc.gnu.org/wiki/ClangDiagnosticsComparison http://gcc.gnu.org/wiki/ClangDiagnosticsComparison
- cliveowen 12y agoActually the error messages are really helpful, I wish compilers were that good.
- alipang 12y agoBADNESS 10000
- unfamiliar 12y agoI just got an error message pointing to an aux file, which was automatically generated and had nothing to do with me. Yeah, the error messages are super helpful.
- godbyk 12y agoIn my experience the TeX engine has decent error messages. The LaTeX set of macros, however, do not. What happens is that LaTeX doesn't do as much error checkout at its higher level of abstraction and leaves TeX to sort it out. TeX's errors are correct but tend to refer to the lowest level of code—the least helpful pointer for the reader. It's akin to the error messages you see from a C++ compiler about template functions.
- noahl 12y agoI've been wanting to look at TeXmacs for a while now. It seems to have similar typesetting abilities as TeX, but the ability to edit the document live and connect with a running program. I haven't had the time to look into it, though, so it may not be what you want.
- symmetricsaurus 12y agoTexmacs is quite nice actually. If you know emacs shortcuts and are willing to learn a few new Texmacs specific ones it is the fastest way I know to write mixed text and maths. When I tried last time a few years ago it was not as complete as LaTeX is, atleast for me, who is much more proficient in LaTex.
- edwintorok 12y agoTeXworks is a simple GUI for editing *TeX, and watching the output at the same time: https://www.tug.org/texworks/ https://www.tug.org/texworks/ You can also click somewhere in the PDF view and 'jump to source'. Used it a few times when polishing/debugging a LaTeX document, I generally don't use it for writing though. (I prefer to do all my writing in Vim).
- noahl 12y agoI've seen TeXworks, but it's different than TeXmacs, which is real WYSIWYG editing with a TeX-like layout engine. TeXworks is still very cool, though.
- jimhefferon 12y ago> real WYSIWYG editing That's an argument against using it, it seems to me. Having the words jump around as you type them is maddening.
- nabla9 12y ago"When 36 years old your code is, look as good it will not ehh."
- _delirium 12y agoI don't know of any complete rewrites, but there are some cleanup/extension efforts underway, which are increasingly displacing "classic" TeX. The pdfTeX / LuaTeX line is probably the most actively developed codebase. It's 100% C now (no more Pascal or WEB code), and supports modern things like UTF-8 input, the lack of which was one of the more frequent pain points of trying to use classic TeX today.
- NotOscarWilde 12y ago> and supports modern things like UTF-8 input Speaking of plain TeX: Yes, they support UTF-8; that is, support it with a command-line switch which is a bit tricky to use. It's not like TeX can detect the encoding of your file and set things up automatically.
- Jormundir 12y agoLets see you do it.
- userbinator 12y agoThe core of TeX (written by Knuth) is actually quite small for what it does - approximately 24kLOC when translated from Pascal to C. The "TeX systems" that are around today are huge because of all the other things that dwarf it, and honestly I don't think everyone needs all or even a majority of that - I know that the parts of TeX that I use to turn a .tex into a .ps can fit on a single floppy. There's also the fact that LaTeX is often bundled in, and that is another "monstrosity" in itself. (I exclusively use plain TeX, so I have no need for that either.)
- mikecb 12y agoI love Knuth for things like this: "although I did delete a few bytes of redundant source code and alter two names." He knows what he wants it to do, it need do nothing else, and in pursuit of that, he'll refine even the most minuscule of non-problems.
- jmount 12y agoYet he writes against this in the article: "Any object of nontrivial complexity is non-optimum, in the sense that it can be improved in some way (while still remaining non-optimum); therefore there’s always a rea- son to change anything that isn’t trivial. But one of TEX’s principal advantages is the fact that it does not change — except for serious flaws whose correction is unlikely to affect more than a very tiny number of archival documents."
- mikecb 12y agoI can't reconcile the two quotes, but I've never encountered someone with more attention to detail.
- jmount 12y agoYeah it is interesting. My read is he is saying that any de-stabalizing change isn't worth it at this point (even if it is a net improvement). Yet we all envision Knuth as an optimizer and tinkerer. Of course few people have experience maintaining a continuously important and popular tool for such a long interval.
- asuffield 12y agoHe means "its behaviour does not change", not "its implementation does not change".
- mikecb 12y agoI thought that at first, and that could indeed be one thing he's saying. But I also agree with jmount that he probably understands that any tinkering is likely to produce as many bugs as it fixes, and therefore implementation changes are to be avoided as well unless addressing actual problems that people are experiencing.
- mjs 12y agoAnyone know why his Stanford username has apparently changed from "knuth" to "uno"? http://www-cs-faculty.stanford.edu/~knuth http://www-cs-faculty.stanford.edu/~knuth redirects to http://www-cs-faculty.stanford.edu/~uno http://www-cs-faculty.stanford.edu/~uno
- ISL 12y agoBecause it's shorter and you can type it with one hand? The Wayback Machine shows his homepage at that URL from 2002 onward.
- dalek2point3 12y agofeature request: can someone please work on making TeX error messages more readable? i dont know how the project is structured and dont know where to begin. i compile TeX documents daily but I still cringe at the compile output. Its mostly gibberish and does not warrant something that most of the scientific world uses for word processing ... What would a version of TeX reimagined by Jony Ive look like?
- psychometry 12y agoJony Ive isn't a programmer. Your question is about as germane as asking what a version of the iMac reimagined by Keith Richards would look like.
- Turing_Machine 12y agoI would buy that, actually.
- qznc 12y agoPages probably http://www.apple.com/mac/pages/ http://www.apple.com/mac/pages/
- dfan 12y agoI can't think of anyone else who has been so effective at managing both the biggest abstractions of theory and the smallest concrete elements of practice.
- weinzierl 12y agoI once attended one of his lectures about MMIX. After he was introduced he fired up Emacs and I remember distinctly that a ripple of voices ran through the audience. I think it was because most of us expected some form of slides or something. Then he hacked along for an hour or so never leaving Emacs. On every seat of the room there was a little leaflet with the MMIX instruction set which was very helpful. Donald Knuth showed us all kind of stuff you could do with MMIX and it was one of the most down to earth lectures I've ever heard.
- jfhc 12y agoI've heard that Knuth gives some amazing lectures and some really dry, boring ones. I've only seen him talk once, and luckily it was one of the former. It was on SAT and game theory and involved seeing whether some very senior computer scientists in the audience could come up with a strategy to beat him in one of the games (which was entertaining).
- julie1 12y agoknuth is the only developer believing he can ship a (the?) bug free sofwtare. And he is the only developer that I would trust to be able to achieve this. TeX -at my opinion- in his mind is intended to be untouched after is death as a legacy to all software devs that will claim: - you can do software bug free; - you can do software that stand the test of time; - you can do software that you can measure to be correct in regard to the problem it addresses. (Here: everlasting document typesetting). It is the only source format/code I have from the 1996 that still compile and gives exactly the same output. And we all claim that softwares always have bugs, and must evolve. Sometimes I think we are just justifying our own lack of dedication and hard work for a perfect design that is stable and does the whole job correctly since beginning. This software is the one that makes me realize I am fraud and every time I print something with LaTeX I wonder how broken «progress» is when all the bloatware we have fail in so many aspects where TeX succeeds.
- nailer 12y agoKnuth's definition of 'bug' is a limited one, that seems to be mainly about logic errors. Allowing a user to incorporate bitmap fonts in a document (which very few users actually wish to do in 2014) would be considered a bug in other typesetting software. This is actually a fantastic illustration of the gap between academic and industry concepts of computing.
- nycticorax 12y agoWhen exactly do you think allowing a user to incorporate bitmap fonts in a document became a bug? It certainly wasn't when TeX was first written. Do you imagine it magically became a bug on a particular date? Also, isn't TeX limited to the .tex -> .dvi transformation? I'm not sure the transformation from .dvi to .ps/.pdf is even part of TeX proper. And that's where the bitmapped fonts come in. In summary, all of this may just be a fantastic illustration of the gap between Don Knuth and you.
- nailer 12y ago> When exactly do you think allowing a user to incorporate bitmap fonts in a document became a bug? I was about to say: "Good question. At one point everyone who had access to a computer was a programmer, as using an OS required programming skills. As that slowly phased away, considering issues which lead users into bad paths, documentation errors, and usability issues as bugs became more common." Then I saw: > "Do you imagine it magically became a bug on a particular date?" and > In summary, all of this may just be a fantastic illustration of the gap between Don Knuth and you. Snark is unwelcome here. See http://ycombinator.com/newsguidelines.html http://ycombinator.com/newsguidelines.html
- SoftwareMaven 12y agoThe questioner seems to want to place burdens on all users, rather than on the backs of a few macro- developers. Words to live by when making software. The best software doesn't concern itself with the burden to the developers; it worries about the effect on the user. Apple's original rounded rectangle buttons is another good example.
- nailer 12y agoYou're right, but the parent statement is the opposite: the questioner wants to put the burden on users, not developers.
- taeric 12y agoNo, he specifically talks about a few examples where as a user he prefers the code to look one way. That is, he thinks it should be on the macro writer to allow the users to write the code as they wish. Not learn a new way to write fractions, for example.
- ezequiel-garzon 12y agoDoes anybody know how the TeXbook source yields a compilation error? I mean to ask, is it enforced by the TeXbook source or is it hard-coded in the TeX source? (Or neither?) Not trying to get around this copyright enforcement, just curious.
- EdwardCoffin 12y agoYou can view the source on CTAN [1]. The first few lines look like this: % 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 \pausing1 \input manmac \ifproofmode\message{Proof mode is on!}\pausing1\fi [1] http://www.ctan.org/pkg/texbook http://www.ctan.org/pkg/texbook
- userbinator 12y agoThis is one of the things that I've always found to be a little odd --- it's one of the simplest ever DRM schemes. My theory is that Knuth put it there just to satisfy his publisher's lawyers, since otherwise he wouldn't let the source be copied freely, much less make it public. Being who he is, he could've also made it much harder to bypass. Rather clever of him, and it somewhat fits with his style. Of course I could be wrong and he truly has quite conservative views on IP...
- xiaq 12y agosee the "copyright infringement" section near the bottom of http://www-cs-faculty.stanford.edu/~uno/abcde.html http://www-cs-faculty.stanford.edu/~uno/abcde.html
- apepe 12y agoWill the next "TeX tuneup" be in HTML rather than PDF? One can only hope.
- rspeer 12y agoThis would require that, between now and 2021, it becomes possible to use HTML+CSS to create an exact publishable layout, and someone makes a TeX renderer that uses it. That would be great. I'm not optimistic about it, given that right now we can't even manage to standardize e-books, but yes, one can only hope. (It's not that the TeX tuneup inherently needs to be formatted like a publication; but that's what TeX is for, and it would be silly to expect that the TeX tuneup would not be written in TeX.)
- apepe 12y agoWhy are you not optimistic? It takes time, yes, but 7 years is a long time. I personally am optimistic wrt what HTML+CSS can do in terms of typesetting (even PDFs): https://authorea.com/users/3/articles/4675/_show_article https://authorea.com/users/3/articles/4675/_show_article
- edwintorok 12y agoThere is an attempt here to convert PDF to HTML while preservering layout: https://coolwanglu.github.io/pdf2htmlEX/ https://coolwanglu.github.io/pdf2htmlEX/ https://coolwanglu.github.io/pdf2htmlEX/demo/geneve.html https://coolwanglu.github.io/pdf2htmlEX/demo/geneve.html https://coolwanglu.github.io/pdf2htmlEX/demo/cheat.html https://coolwanglu.github.io/pdf2htmlEX/demo/cheat.html
- Alphasite_ 12y agoWell we have PDF.js, so it's evidently possible, if a bit tricky.
- runarberg 12y agoDifferent platforms different designs. The web is not a printed page. TeX was not designed for the web and HTML is not intended for a well typeset print. Although It would be nice if my HTML would compile to TeX when a user presses the `print` button on their browser.
- graycat 12y agoSorry, lost the original. I will try to recreate it: The big advantages of TeX are: (1) The purpose of TeX was and is to lower the labor and cost of high quality document preparation of heavily mathematical material and to permit authors to prepare such documents themselves. For such work, TeX is and near the beginning long has been the very welcome, highly respected, unchallenged international standard. For people writing such documents, TeX is nearly essential. Before TeX, just the 'typing' could be more work than the work the typing was communicating. Before TeX, preparation of documents with mathematical material was grim for authors, typists, publishers, etc. (2) The TeX software has produced almost exactly the same output from the same input on nearly any computer over decades. (3) The software is essentially totally free of bugs. (4) Knuth's documentation is exemplary. In a sense, TeX is yet another word processing text markup language; the big differences are high quality output, especially of mathematical material, and the macro language. For more, TeX was not to cut new ground in graphical arts; instead, essentially TeX looked backwards, not forwards, in that the documents were and are to be essentially just black marks on white paper much like huge examples going back 100+ years on the shelves of the research libraries. TeX was to ease the production of such documents and not to produce different documents. So, TeX is not for just everything that can be put on paper, a screen, a cereal box, or a billboard; it is not for animated foils, animated movies, interactive user interfaces, engineering drawing, Web pages, routine text documents, routine e-mail, etc. TeX is not for average customers of Apple or Microsoft Word or some high end graphical arts software from Adobe. Criticisms of TeX seem mostly to be from people who don't need TeX. For people who really need TeX, the criticisms are from not very important down to irrelevant.
- username223 12y ago> Users can rest assured that I haven’t “broken” anything in this round of improvements. Everyone can upgrade at their convenience. If only more developers took this approach instead of dumping out monthly bug-filled "major releases" and force-updating their users.
- dredmorbius 12y agosystemd
- sloanesturz 12y agoI've heard Don Knuth speak at Stanford -- he's really quite something. He actually speaks the exact way he writes, very precisely. I love how he is planning on another cleanup in 2021, when he'll be 83 years old. That's some serious dedication to your software.