michael-brade / LaTeX.js

JavaScript LaTeX to HTML5 translator
https://latex.js.org
MIT License
770 stars 58 forks source link

Glue in JS based TeX/LaTeX projects #103

Closed sirinath closed 4 years ago

sirinath commented 4 years ago

I stumbled across Boxes and Glue: A Brief, but Visual, Introduction Using LuaTeX which demonstrates glues in the browser using LuaTeX: Parsing typeset paragraphs. I believe this uses Overleaf or/and ShareLaTeX componenet.

Maybe you can do something similar.

michael-brade commented 4 years ago

Thank you for the comment! You are right, this uses Overleaf, and that means they render the LaTeX code on the server natively and then display the resulting PDF using pdf.js, they don't use plain HTML and CSS. So no, sadly, I cannot use that...

sirinath commented 4 years ago

If pdf.js renders it then perhaps the same technique used in pdf.js can be used. But having said that LaTeX.js is impressive as it is.

michael-brade commented 4 years ago

No, not if you want HTML. pdf.js renders to HTML <canvas>, so it is an image and doesn't really have anything to do with HTML and CSS or JavaScript anymore.

sirinath commented 4 years ago

Ah, OK.

sirinath commented 4 years ago

Following projects might be of interest which is looking for print perfect webpages with polyfills: https://www.pagedjs.org/, https://www.cabbagetreelabs.org/, https://editoria.pub/. https://coko.foundation/,

michael-brade commented 4 years ago

Oh wow, thank you very much! I like that a lot. Maybe I can somehow use paged.js...

sirinath commented 4 years ago

I am not sure if the features you require are in it but perhaps you can suggest. These will become standard in the browser.