←back to thread

262 points el3ctron | 4 comments | | HN request time: 0.002s | source
Show context
percentcer ◴[] No.46176216[source]
Dumb question but what stops browsers from rendering TeX directly (aside from the work to implement it)? I assume it's more than just the rendering
replies(2): >>46176253 #>>46176297 #
pwdisswordfishy ◴[] No.46176253[source]
For starters, TeX is Turing-complete, and the tokenizer is arbitrarily reprogrammable at runtime.
replies(3): >>46176306 #>>46176542 #>>46181967 #
1. ErroneousBosh ◴[] No.46176306[source]
Okay then, what would stop you rendering TeX to SVG and embedding that?

Edit: Genuine question, not rhetorical - I don't know how well it would work but it sounds like it should.

replies(1): >>46176499 #
2. fooofw ◴[] No.46176499[source]
That would (mostly if not always) work in the sense of reproducing the layout of the pages, but would defeat the purpose of preserving the semantic information present in the TeX file (what is a heading, a reference and to what, a specific math environment, etc.) which is AFAIK already mostly dropped on conversion to PDF by the latex compiler.
replies(1): >>46190143 #
3. ErroneousBosh ◴[] No.46190143[source]
Couldn't you write a TeX renderer that emitted HTML (or RST, or Markdown, or whatever) with SVG for the equations?
replies(1): >>46212731 #
4. fooofw ◴[] No.46212731{3}[source]
I think this project is based on LaTeXML (https://math.nist.gov/~BMiller/LaTeXML/) which is exactly that (except for the SVG part)