[Tex/LaTex] Why couldn’t (La)TeX’s layout model be as simple as CSS’s layout model


I feel CSS's layout model is simpler than (La)TeX's layout model. At the time Knuth developed TeX, the idea leading to CSS model is a "difficult" things? Or the CSS layout model is not appropriate to be applied to (La)TeX.

Best Answer

If you read the Ph.D. thesis of HÃ¥kon Wium Lie's you will see that a lot of the concepts of CSS were based on TeX and LateX. Wium Lie and all the other contributor's to CSS came up with a system of separating content from presentation for HTML. The numerous forums and tutorials on the web is an indirect proof that the CSS model is not the best either. You probably find it easier as you are used to it. In addition CSS does not provide any means of programming. This has to be done via JavaScript. It also cannot help with mathematics etc.

When Knuth invented TeX, there was no Computer Science, no web, no html and no CSS. My personal opinion is exactly the opposite. If html was marked as LaTeX life would have been easier, the web would have looked better etc. If there is one aspect that I agree with you is the lack of a <div></div> concept and the ability to float sections left or right. This can be done using TeX but not as easily. There is an XML version of LaTeX called tralics perhaps you can have a look as to how it could have looked!


The current shortcomings of CSS/html can easily be observed by the fact that there are over 500 billion pdf documents on the web and the best way to create a pdf currently is with one of the TeX->pdf engines.

Related Question