Search code examples
htmlcsslatexsemantic-markup

OK I separated my content from my presentation, now what can I do with all that content?


HTML separates content from presentation (by using CSS for presentation and making HTML elements usually semantic), but LaTeX does not. What do people actually do with HTML that can't be done with LaTeX, that is a result of the fact that the presentation attributes have been separated out?

I don't think "display it in web pages" is an answer because that is a result of HTML being a markup language and TeX being a programming language (ie more complicated and harder to implement). But maybe I am wrong about that.

As another example of the kind of thing I'm asking about, I used a cirtuit diagramming tool once that used a single postscript file both to store the circuit semantically and to display it... a fairly impressive feat I thought. I'm wondering if anyone does that sort of thing with HTML -- uses the HTML to store machine-readable information, and CSS to present it in an automated way. (instead of also generating the HTML as part of the presentations like most websites do)


Solution

  • Seperating content from presentation doesn't allow you to do more, it allows you to do what you were already doing cleaner. So you can't do more with one than the other, but the ease with which you create and maintain the same thing will differ with the different approaches.

    The same sort of principle applies to the concept of seperating blocks of code into reusable units, often called functions. Functions don't allow you to do any more than what you could do without functions. You can do everything without functions that you can do with them. But does that mean people don't need functions? No; try writing a nontrivial program without them.