Live data from Hacker News

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

peterkrautzberger.org

81–90 of 152 posts

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

#81
post #40

Earlier quoted context omitted.

I write a fair amount of reports professionally and I use word. Getting data from my Python analysis into the reports are tedious at best and updating numbers last minute is hair pulling frustrating. But because of the good wysiwyg I can cheat on my adjustments when I need a graph to go “just there”, I can edit my paragraph wording such that I don’t get a almost completely blank page in between sections, etc, etc whi…

Try out Typst. It senses changes to any file and auto-updates the doc lightning fast - it's far better than LaTeX IMO

No HTML export yet. Which this post is about.

Though I too like typst and am subscribed to their Github issue for HTML export, that maybe some day will be available.

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

#82
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/

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

#83

Sphinx and reStructuredText are, IMHO, underrated power houses of document building. With extensions, you can hook them up to Zotero (or whatever)-managed bibtex files. You can render to beautiful HTML files, and you get latex PDFs and epubs for free. First class latex-math support, plenty of integrations with things like mermaid, graphviz, and the ability to build super-powerful custom directives to do basically any…

Sphinx/rst are a nice middle ground between the simplicity of markdown and complexity of LaTeX. I used it to generate a lot of html docs for test reports. I did try pdf gen using via LaTeX and pdflatex for a bit, but stopped after the pdf was breaking the multiple thousands of pages.

And it's really tweakable, especially with html output where you can provide your own templates, or add in your own CSS/scripts even manual tags.

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

#84

Earlier quoted context omitted.

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

No HTML export yet. Which this post is about.

I am hoping this is going to be implemented soon:

https://github.com/fenjalien/obsidian-typst/issues/5

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

#85
post #18

Earlier quoted context omitted.

You're getting close to making your own CHM format, which Sphinx could make for you. I always thought CHM files were a nice self-contained option for multi-page HTML docs. (Though they'd happily execute whatever JavaScript the author embedded in there... Maybe that's why they fell out favor?)

It would be great if there was an open CHM-like format that was supported by all major browsers. The nice thing about browsers is that everyone already got one installed. They can even open PDFs natively these days. Sadly, they cannot even open epubs (which is almost like CHM without interactivity). I believe firefox used to be able to open epubs, not sure what happened.

Edge could. MS cut it out long before the move to the chrome rendering engine.

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

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

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.

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

#87

Earlier quoted context omitted.

I believe I have used pandoc to convert markdown to PDF. Maybe this is something you could try?

That’s probably what they were referring too when they described it as big, complicated, and fragile. https://pandoc.org/chunkedhtml-demo/2.4-creating-a-pdf.html

Well you need to install the appropriate texlive dependencies which can be somewhat complicated, but once that's done it's just writing inline Latex

    $$\like{this}$$
into your Markdown files and then doing

    pandoc -f markdown -t pdf -o output.pdf input.md
Haven't used this in a while and just tried it again, was just a matter of searching a few error messages, gleaning the missing texlive package names from the results, and installing them. Works like a charm now.

I also had this working for Markdown to HTML conversion back in the day when I needed it, but that requires the website using a JS library like Mathjax.

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

#88
When I use LaTeX, it's because I want a way to store book manuscripts and their layout as code in version control. I never use any of the math layout. I get the impression that my use case is rather in the minority.

I would use CSS+HTML for layout, but what do I do about automatically generating tables of contents and indexes?

I guess I could write my own tool for that. Hmm.

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

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

How do you handle internationalization, and, in particular, hyphenation? That’s the main reason I use LaTeX for (well, specifically XeTeX & Tectonic, which are pretty modern). Without those two features, one might as well use LibreOffice, no?

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

#90
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 easy ways to display math on the web. No, this doesn't mean that LaTeX is obsolete.

Besides, what about references, both external and internal? Probably needs more "modern" tooling.

Post reply on HN