4

I have tried various different markup/markdown languages and have found myself coming back to TeX for the ease of typing. I have always wondered what are the features which make TeX such an easy-to-type language. For example, the backslash \ is an excellent method to differentiate commands from the text since they do not require much more than a single keypress.

Also, I have found that customizing/writing small shortcuts for features in LaTeX is quite easy due to the same features. Does this flexibility extend to the bigger packages as well? Is this the reason almost every university is able to model its own thesis class and every guy is able to model his own paper style?

I would like to study the features of TeX which make it so easy to customize and write. At the same time, I want to study the features which make it so hard to operate with the backend programmatically. I am aware that some of the features are dual in nature, they increase writing prowess and as an effect reduce the programming ease.

So, basically, I am interested in three kinds of lists:

  1. Features which make TeX easy to write/customize
  2. Features which make TeX hard to program at the backend
  3. Features which inherently do both of the above.

The idea is that if the backend can be written in a more maintainable language and a frontend to backend compiler can be built to easily convert the user written package code into a backend. Then, it will be possible for us to develop a programmatically better version of TeX.

The bottom line is that the TeX code is really great for user customization and writing technical stuff, however, the same code causes lot of anguish at programming level. However, if it is possible to "shift gears" at some level, then there might be a better way to implement TeX.

doncherry
  • 54,637
  • 7
    So many have tried. So many have failed. – morbusg Oct 25 '12 at 18:13
  • @morbusg : Yes! I am interested in analyzing either the failures or the success of TeX. If TeX is really one of the best trade-offs, then I would interested in analyzing why. It may not be possible, but it just might be? –  Oct 25 '12 at 18:15
  • 11
    tex was created by a mathematician/computer scientist for the purpose of producing his own books. he intended for the input language to be usable by his secretary as well as by himself; he (of course) was fully capable of making adjustments to the back end. only later (though not by much) did it creep out into general use. much of the history has been written down and published from interviews and q&a sessions; knuth's book "digital typography" has most of this. this doesn't really answer your questions about features, but it should explain the rationale. – barbara beeton Oct 25 '12 at 18:48
  • As suggested by Paulo in the chat: Understanding TeX starts with understanding the document xii.tex (you can find it by any search engine). – yo' Oct 25 '12 at 18:50
  • Because so far, TeX is best in seperating content and form, and the default form has a high standard itself (with tables being the only exceptions for both "seperating" and "high standard"). I can have a 400-page-long thesis, and without changing more than the document header, I can customize its appearance completely. On the other hand, I can make a letter to my ISP in moreorless the same time as someone else can in a "clickable document tool". – yo' Oct 25 '12 at 18:44
  • @barbarabeeton thanks. I got this nice document which is really good critique. However, it is an answer to this question. –  Oct 25 '12 at 19:09
  • 7
    TeX macro programming is hard because Knuth didn’t want it to be programmable from the start, he didn’t like the fact that each application was inventing its programming language, those features were added later after “kicking and screaming” when it was absolutely necessary, Knuth imagined people who want to customise TeX would modify its Pascal code, but this didn’t happen to a large extent and people did all sorts of crazy things using macros instead. – خالد حسني Oct 25 '12 at 19:42
  • @Khaled Honsy: Thanks for your comment! Actually, this is a fact that intrigues me the most. Macro programming is easy for people. And hence, in part, this might be the reason why TeX is so diverse and big now. However, as we know, macro programming is also a bane, and hence, any solution (if any) that would come later, would have to take care of the fact that the users can still program in the macro code and there can be a mechanism to compile it into a more parsable etc code. I was wondering how possible this will be. –  Oct 25 '12 at 20:27
  • This way, while people can write small customizations easily, big customizations can be changed to switch gears and made more maintainable. –  Oct 25 '12 at 20:28

0 Answers0