3 ms·
HTML never does the task, and is not intended to. HTML/CSS is interpreted and rendered by a browser. It will look different on different devices, with different
by leephillips 4y ago
HTML never does the task, and is not intended to. HTML/CSS is interpreted and rendered by a browser. It will look different on different devices, with different user settings, user CSS, etc., and with different browsers on the same device, even if the HTML/CSS validates and the rendering engines have no bugs, and even if the HTML author avoids reflow by using a rigid design. This is true just for a plain paragraph of prose. Now add equations, etc. Sometimes this nonuniformity is a benefit, but for some applications you need to control the presentation of your document.
- fakedang 4y agoI guess these are the reasons I was looking for. Thanks for taking the time to deal with my noob question. Upvoted! My next question is that why isn't it possible to agree to a standard presentation of prose and equations for HTML5 which mirrors a clean PDF-style presentation as much as possible (as is done with LateX), but I guess the answer to that is within that xkcd comic about standards.
- leephillips 4y agoI don’t think it’s a question of standards. It’s more that HTML and PDF are different things that solve different problems. PDF is supposed to be a static document that looks exactly the same in every compliant PDF reader. A correctly built PDF with have every glyph that it uses embedded, for example. It’s archival, in the sense that it will always look the same, in all future versions of PDF readers. HTML is markup that describes the author’s intentions to the browser. The reader can use his or her own fonts and have other preferences. The text might reflow to fit screens of various sizes. I can read it on my terminal with lynx. You can embed all kinds of resources from the network. One can take heroic measures¹ to force an exact rendering, but, in my opinion, that’s a dead end that hacks a markup system to do what it’s not intended to do. PDF works great on the web; we don’t need to force HTML to replicate its abilities. It already has hyperlinks, and we can seemlessly navigate bewteen PDF and HTML pages in the browser. [1] https://github.com/coolwanglu/pdf2htmlEX https://github.com/coolwanglu/pdf2htmlEX