Live data from Hacker News

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

peterkrautzberger.org

101–110 of 152 posts

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

#102
post #42
post #5

I write markdown, use pandoc to make LaTeX and from that a PDF for a printed thing and just supply markdown for non-printed stuff.

Typst is pretty close to markdown for simple things, and scales nicely to hard things. So you don't really need to worry about the markdown-pandoc shuffle anymore.

Unfortunately typst doesn‘t support HTML output. It can only generate PDFs.

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

#103

Earlier quoted context omitted.

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)

Take a look at MathJax's website: https://www.mathjax.org/#gettingstarted

They have a link to JSBin which contains an easy example html page.

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

#104

Earlier quoted context omitted.

As a certified grumpy old developer I spent years writing off the "X but in Rust" projects, but I have to confess that a lot of good things with meaningful improvements have come from the rewrite-everything-in-Rust movement. I've not used Typst and not authored much LaTeX (but worked on a project with a group of scientists who used nothing but LaTeX) and can see obvious advantages to Typst. Same with many, many other…

So funny to me that people assume, oh it's written in Rust, so it must be a rewrite of something else just so they can use Rust. They never imagine that people choose Rust for something they want to implement anyway and not just to replicate something existing, that they do not want to use since it's not implemented in Rust????

Oh I know there's loads of original Rust work, but you have to acknowledge that the "X, but in Rust" trope exists.

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

#105
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…

Document formatting seems like one of those problems where 80% or so of the problem space is simple and the remaining 20% is an unfathomable pit of nightmares.

There are so many different ways people could want characters printed on a sheet of virtual paper that the problem is virtually unconstrained in its difficulty.

TeX was a major theoretical advance, and LaTeX is a nice enough UI layer on TeX that has gotten significant traction. But even outside of TeX, it feels like even software like MS Word are impossibly complex and clunky.

You can make something nicer by dramatically simplifying or cutting the feature set. I think that's probably how Google Docs has a pretty simple interface. But I'm not convinced there's a real replacement for the incumbents that simply tries to improve UI without having a deep technical insight about document layout the way Knuth had with TeX.

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

#106

Earlier quoted context omitted.

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

Take a look at MathJax's website: https://www.mathjax.org/#gettingstarted They have a link to JSBin which contains an easy example html page.

Thanks!

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

#107
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…

Document formatting seems like one of those problems where 80% or so of the problem space is simple and the remaining 20% is an unfathomable pit of nightmares. There are so many different ways people could want characters printed on a sheet of virtual paper that the problem is virtually unconstrained in its difficulty. TeX was a major theoretical advance, and LaTeX is a nice enough UI layer on TeX that has gotten sig…

Latex has a lot of caked in design mistakes which are never going away.

Unfortunately typst seems to have replicated the primary one - inventing a new turing complete programming language rather than piggybacking off an existing one.

It's possible to conceptualize a much better latex but it would take years to build properly and build the ecosystem around it to do all the odd things people need when doing markup requiring 1000-2000 community packages.

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

#108
Another LaTeX-to-HTML tool is lwarp (https://github.com/bdtc/lwarp) which starts from the idea that there only exists one program that can parse LaTeX: the LaTeX compiler itself. Implementing a new parser is almost futile. So instead, the lwarp package redefines all the macros to output HTML. Something like \renewcommand[1]{\textbf}{#1} This way, compiling LaTeX gives you a PDF whose text is HTML code, so now you can extract the plain text from it and you have an HTML file. The advantage is that it can easily deal with custom macros etc., because these are natively resolved by the LaTeX compiler.

I use lwarp to make https://tikz.dev/, an HTML version of the TikZ manual, which is probably one of the most complicated LaTeX documents in existence.

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

#109
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

Might still be pretty limited, but I've been looking for something with a more modern syntax for years, and this seems a good candidate! Thanks for sharing.

Of course it will take years to replace LaTeX, but we need to begin working on it.

Post reply on HN