Live data from Hacker News

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

peterkrautzberger.org

41–50 of 152 posts

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

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

Typst.

Typst is better IMO

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

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

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

#43

Tangently related, does anyone have experience with AsciiDoc? I've used reStructuredText before, but AsciiDoc is tempting, it looks cleaner.

I had experience with AsciiDoc and personally not a fan. IMO it has weird features like totally illegible compact table syntax (seriously, that stuff is worse than XML) and the spec looks abandoned. But I keep seeing it being used, I guess it appeals to people who want something more flexible than Markdown (and who like Ruby, or they would go with RST)

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

#44
One solution is to embed alternatives within PDF itself. LibreOffice can embed inside a PDF the original editabble source in ODF format. You could also embed ePub. That would mean you would have a single file that could be processed in many useful ways.

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

#45

I spent a few weeks last year doing the opposite, HTML to LaTex in order to print and nicely typeset top HN articles, so I'd have a nicely printed booklet each morning. I think creating hard copies of web content for offline reading holds a lot of promise, but the internet is a beast.

Interesting, I have done exactly that too! I have it sent to my laser printer to print out just before I wake up.

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

#46

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?

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

#47

I spent a few weeks last year doing the opposite, HTML to LaTex in order to print and nicely typeset top HN articles, so I'd have a nicely printed booklet each morning. I think creating hard copies of web content for offline reading holds a lot of promise, but the internet is a beast.

> so I'd have a nicely printed booklet each morning.

Why? If you're just printing to read on the train or whatever, wouldn't you just discard after reading?

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

#48

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

There's a lot you can do with latex to automatically import data and update automatically from external sources, and while it might seem counter-intuitive it is much easier and less effort than Word's wysiwyg interface.

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

#49
post #12
post #11

Earlier quoted context omitted.

One of the selling points of PDF is that it is a single self-contained file. I found this lacking in Sphinx and wrote an extension for it to zip and bundle the assets into a single HTML file: https://github.com/AdrianVollmer/Zundler Also works with HTML documents produced in other ways.

Hmm, the disadvantage of your approach is that it unconditionally requires Javascript, even if the original didn't. Also if you're going to embed a giant binary blob, please ship way to extract it.

Aren't the image blobs embedded in the URLs using Base64-encoded strings rather than using JS?

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

#50

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 agree! I've been also using this as a personal website (for academia). This works like a charm. It's easy to render any equation, and it's fast (because not bloated).
Post reply on HN