Hacker News new | past | comments | ask | show | jobs | submit login

Sometimes I wonder: why can't LaTeX be just as simple as HTML, or perhaps even simpler? Except perhaps for pagination and available default fonts, HTML practically fulfills all my formatting needs. (Note: HTML includes MathML, a mathematical formula markup language). And for automatically numbering tables and figures, one can easily write a script that is completely independent from the underlying formatting language.



Try writing a 300 page book in HTML, create citations and bibliographies, table of contents etc. Then convert it to a pdf, say using Pandoc and then you will have a better understanding where TeX/LaTeX fits in. Write also some complicated formulae using MathML. Save the document and render it again in 30 years!

TeX was designed to typeset a document always the same way on any machine that could run it. You can typeset any of Knuth's papers from the 80s and they can still compile today. Maths as Barbara is fond of saying has a long shelf life.


I'm not saying that HTML is totally suitable, but a slight modification of it could be, and it would be a lot simpler to use than TeX. And who says that it could not be rendered in the same way in 30 years?

By the way, the one thing that disappoints me most about LaTeX is that you often cannot nest one environment in another without running into issues. In HTML the "composability" is much better.


Have you ever looked at "bare" latex? It really isn't any more complicated than html. Especially early html.

But you are being somewhat naïve on the render in thirty years point. Html from two years so probably renders differently today. Never mind how different it is on machine that is rendering it.

So, could someone have made a simple one? Maybe. Evidence looks unlikely. Plenty have tried.


Well, I'm not so sure if LaTeX renders the same in 30 years, given all the packages and their dependencies, that might also change. In fact, I'm not sure the document will even still compile by then.


If be surprised if latex didn't compile. Maybe people today make packages that break, buy I doubt it. The reason there are so many packages is because changes should only fix bugs. Not change current working behaviour. So bugs are typically defined as clear crashes.


I've always wondered the opposite: why don't major browsers implement (La)TeX formulas, given they are a de facto standard? I mean something like MathJax, but available with JavaScript disabled. Don't trigger it with $, but maybe with something more odd, like $@ ... @$, or similar.


It is called DITA and Docbook, but they are designed to be toolable.

Writting them manually is not a good idea, at all.


Does HTML allow you to define your own abstractions? (CSS doesn't count)


No, not really. My favorite example is: try to implement the equivalent of the LaTeX command \tableofcontents using just HTML and CSS. On the other hand, that's not a fair comparison: TeX is Turing-complete, and HTML+CSS is not. We need one more ingredient: HTML+CSS+JS. (Though using JS just to get a table of contents seems a bit silly, and it probably makes more sense to generate the HTML for the table of contents on the server, like Wikipedia does. (Imagine if every Wikipedia article required running JS just to render the table of contents.))




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: