Live data from Hacker News

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

peterkrautzberger.org

121–130 of 152 posts

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

#122

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.

Looks like Pandoc can generate tables of contents for HTML, though I don't see anything about indexes. Roff and friends, and Texinfo, can do both, though with their own tradeoffs.

https://pandoc.org/MANUAL.html

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

#123
post #27

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…

I guess latex is still unbeatable for writing complex math expressions. These days, when I don't need that, I'm happy with AsciiDoc.

Asciidoc supports math blocks, and there's an extension to render them at compile time

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

#124
post #18

Earlier quoted context omitted.

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.

Edge supported epub until the bitter end of the Spartan renderer. It was only Microsoft's attempt at an ebook store that died long before that. Admittedly, most people's visibility into Edge epub support was through the Store and the sidebar dedicated to store purchases, but if you had no other book reader app take over the .epub file extension (or if you realized that you could drag and drop DRM-free .epub files into new tabs) Edge would still read them right up to the Chromium switch.

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

#125
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.

The "Portable EPUBS" discussion happening nearby is on this subject, too.

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

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

#126
post #35

The recommendation to use Markdown+MathJAX fall short when you want to write longer documents with numbered section, subsection, and theorem/definition/figure etc tracking and referencing. I'm sure with Sphinx and reStructuredText you can get that large-scale document tracking stuff, but with LaTeX it just works for the most part and you don't need to juggle a bunch of different side-projects and extensions. Plus you…

I searched for a comment to supports the fact that LaTeX shines in certain areas. My memory of LaTeX has weakened over the years, since I am not writing long texts with lots of figures and such, but I know it's more than this statement let's on in the article: "Something that is more modern than learning a hundred bits of print typesetting that your student will never, ever need?" What exactly is, in the end, is 'mod…

Modern as in "more recent" (and not as in "the modern era" that ended decades ago). More recent doesn't mean better though : the likes of Overleaf, Google Docs, Github are also "more modern" than some of their alternatives, yet ought to be avoided like the plague.

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

#127
post #41

Earlier quoted context omitted.

Typst. Typst is better IMO

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…

jamiedumont let out a rambonctious laugh to himself.

- Ah, you got me good you meddling kids!

jamiedumont was talking to himself again.

hackerbod slowly leaned over and squinted at the screen.

- Uh Typst?

- Yeah! It’s a typesetting markup language. It’s supposed to be better than things like latex.

- Ok. What’s so funny about it?

- Oh hehe, it’s written in—guess what?

- I dunno?

- Rust!

jamiedumont started giggling but hackerbod remained neutrally unamused.

- Oh come on! Rewrite in Rust? Language zealots? Young adults who can’t program without some Ruby syntax sprinkled in?

- So this “typt” thing—

- Typst.

- Right, Typst, this typesetting thing was created to promote Rust in some way?

- Oh I don’t think so.

- It doesn’t mention Rust on the homepage or something? You know, Written in Rust?

- Nope. Not to my recollection.

- So is it a rewrite of something else in—

- Nope.

- So then what does that have to do with—

- Ah, but you’re missing the bigger picture, hackerbod.

- Ok.

- Year after year of this eye-rolling promotion and nagging, blah blah blah memory unsafety is bad, blah blah this is why we used angle brackets for generics, and these sly bastards went and pulled off the most epic Trojan Horse that I’ve ever seen been—

- And what’s that?

- They made an actually useful language!

hackerbod had to scoot back as jamiedumont fell off his swivel chair because he was laughing so hard. hackerbod scratched his head.

jamiedumont finally recovered from the ab-induced euphoria.

- Ah hackerbod, I hate to admit it but they got me good! Those cursed language zealots got one over on me!

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

#128
post #107

Earlier quoted context omitted.

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 requ…

What are the other caked-in design mistakes in LaTeX, and which existing language(s) would you like to see a DSL piggybacked off?

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

#129

So, I originally posted this last year. When I posted it, I was using tectonic as my LaTeX compiler, and since it didn't support HTML output yet, I didn't actually try the article's suggestion. Today, when I saw that I got an invitation to repost this article from the mods, I thought I'd take the time to try it out. The two commands that the article suggests can be combined into one: latexmlpost --dest=mydoc.html --f…

> Today, when I saw that I got an invitation to repost this article from the mods The mods personally invited you to repost a year later?

Yes! I was surprised too. It's a cool hidden mechanic of HN, the second chance pool[1].

[1]: https://news.ycombinator.com/item?id=26998308

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

#130
post #41
post #27

Earlier quoted context omitted.

I guess latex is still unbeatable for writing complex math expressions. These days, when I don't need that, I'm happy with AsciiDoc.

Typst. Typst is better IMO

I wish Textile had won instead of plain Markdown. What are the benefits of Typst over the ConTeXt family?
Post reply on HN