Live data from Hacker News

I don't always use LaTeX, but when I do, I compile to HTML (2013)

peterkrautzberger.org

91–100 of 152 posts

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#91
LatexML has come a long way. Even arXiv uses LatexML internally to offer HTML5 versions as of late 2023. It does have limitations in not supporting all packages, or producing a high-quality translation in all cases.

If you don't need to convert entire LaTeX documents, MathJaX and KaTeX are really good at rendering a subset of LaTeX as MathML/SVG. I run MathJaX + an xypic extension for commutative diagrams with server-side rendering on my website, and it works great in practice.

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#92
post #60

I feel ambivalent to LaTeX. I don't like the language, the ecosystem is too big, complicated and breaks, but the end result is hard to do any other way. This applies both the equations part, and the text reflow part (I think them as separate things, but they usually go together). It should be possible to write text in HTML or markdown, and write the equations in latex or asciimath, and turn it into a beautiful/articl…

This is from a week ago:

https://news.ycombinator.com/item?id=39027543

Talks about "htmldocs" (which shows maths formulas on one of their templates) but there are also various other alternatives mentioned in the discussion.

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#93

This article really doesn't get what LaTeX does. Of course it is overkill to have 5 lines of text rendered with LaTeX into a PDF. But the point of LaTeX is exactly to set the typesetting of an output document in stone. PDF is meant to do that and HTML cannot do that. A PDF conserves everything and that is precisely the point to have a set layout for printing or displaying on different devices. Yes, there should be ea…

> to have a set layout for printing or displaying on different devices.

That’s a horrible way to go about it. Already in the 90s it was clear that varying display sizes was a problem, and it has gotten orders of magnitudes worse since then.

The concept of a single set layout that is suitable for everyone is utterly absurd.

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#94

Earlier quoted context omitted.

Tangentially, for me the stacks project is the gold standard of mathematical typography on the web. Look at this beauty: https://stacks.math.columbia.edu/tag/074J Also check the diagrams: https://stacks.math.columbia.edu/tag/001U If anyone can explain to me, a complete noob regarding html, how they achieve this result with html, css and whichever latex engine they use, I would be grateful. I want to make a personal w…

It's standard MathJaX that's rendered client-side. I managed to get MathJaX + XyPic rendered server-side on my website, which is a lot nicer.

Oh, you misunderstand the level of my question; rephrased, how do maek wabpag with "MathJaX that's rendered client-side"? (o´▽`o)

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#95
post #60

I feel ambivalent to LaTeX. I don't like the language, the ecosystem is too big, complicated and breaks, but the end result is hard to do any other way. This applies both the equations part, and the text reflow part (I think them as separate things, but they usually go together). It should be possible to write text in HTML or markdown, and write the equations in latex or asciimath, and turn it into a beautiful/articl…

Time to sunset Latex https://github.com/typst/typst

It will be hard to replace LaTeX. I still use it. It's virtually bug-free and compiles documents from 30 years ago. I sincerely think it will be around for another 30. It's tried and tested and that's hard to find in the software world. Typst looks interesting though. I'll keep my eye on it...

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#96
post #68

For me, the main problem with most tools that render to HTML was that they don't support all math typesetting libraries that latex supports. I used to work with category theory, where it's common to use the tikz-cd library to typeset commutative diagrams. tikz-cd is based on tikz, which is usually not supported for HTML output. But apart from math typesetting, my latex documents were usually very simple: They just us…

Have you seen typst? I have moved over from LaTex to Typst and most if not all your use cases are covered. https://typst.app/

Except the main theme, which was HTML export? https://github.com/typst/typst/issues/721

Though it's in the roadmap!

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#97
I like LaTeX for the quality of it's pdf output, I use in for docs that need to be "printed" (non necessarily on paper, but still 'fixed typographical form for potentially long term archiving) not for anything else and yes I DO HATE pdfs because of their design, but PostScript is not much common these days and while a bit better for certain aspect is not much better in general, dvi is even worse.

For my notes, for anything that need to be "live" I use org-mode because:

- it's a far more natural markup than anything else

- it's rendered INLINE, no need to jump between a source form and a rendered one, a thing MD lovers fails to understand

- it's an outlining tool, another thing most other tools fails miserably to understand

- it easily incorporate live things in other languages (org-babel) a thing no modern REPL-alike DocUI like Jupyter can't do

Long story short I prefer the best tool depending on the job. HTML might be the least common denominator tool, making it the worst in essentially all cases. XML for machine usage, SGML in general, are good for machine usage, but they are very impractical in current usage, just see the actual crappy state of things for e-invoicing with XML/XADES docs + XSL to render them in the end as pdf for the human. They are a good too in some case, but again not the best for any specific case.

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#98
post #93

This article really doesn't get what LaTeX does. Of course it is overkill to have 5 lines of text rendered with LaTeX into a PDF. But the point of LaTeX is exactly to set the typesetting of an output document in stone. PDF is meant to do that and HTML cannot do that. A PDF conserves everything and that is precisely the point to have a set layout for printing or displaying on different devices. Yes, there should be ea…

> to have a set layout for printing or displaying on different devices. That’s a horrible way to go about it. Already in the 90s it was clear that varying display sizes was a problem, and it has gotten orders of magnitudes worse since then. The concept of a single set layout that is suitable for everyone is utterly absurd.

Then do not use a tool that was designed for typesetting printed pages which is what LaTex is for. The author of the article seems to think about LaTex only for math rendering. But that is just a fraction of what it is used for. Complex diagrams with tikz or typesetting entire books, so that adding content in an arbitrary place still makes the rest of the book look good without breaking layout are some of the examples of why I would use LaTex instead of html

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#99
post #93

Earlier quoted context omitted.

> to have a set layout for printing or displaying on different devices. That’s a horrible way to go about it. Already in the 90s it was clear that varying display sizes was a problem, and it has gotten orders of magnitudes worse since then. The concept of a single set layout that is suitable for everyone is utterly absurd.

Then do not use a tool that was designed for typesetting printed pages which is what LaTex is for. The author of the article seems to think about LaTex only for math rendering. But that is just a fraction of what it is used for. Complex diagrams with tikz or typesetting entire books, so that adding content in an arbitrary place still makes the rest of the book look good without breaking layout are some of the example…

That’s exactly what the author says at the beginning:

> are you sure you have to use LaTeX?

Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)

#100

Instead of MathJax, maybe also consider KaTeX: https://katex.org/ It's faster than MathJax and also can be pre-rendered on the server (or in your SSG!).

That is old news. Mathjax 3 is a lot faster nowadays than it used to be and it supports more LaTeX keywords than KaTex. Especially the important \label and \ref are still not supported by KaTex.
Post reply on HN