Live data from Hacker News

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

peterkrautzberger.org

31–40 of 152 posts

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

#31

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

Asciidoc has potential. Last time I dug into it the ecosystem was lacking, but there were glimmers of a reboot. I hope that pulls through because it’s a great format.

Edit: yeah it’s managed through the Eclipse Foundation now. They’re slowly working towards a formal spec, haven’t hit 1.0 yet.

Details here https://gitlab.eclipse.org/eclipse/asciidoc-lang/asciidoc-la...

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

#32
post #31

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

Asciidoc has potential. Last time I dug into it the ecosystem was lacking, but there were glimmers of a reboot. I hope that pulls through because it’s a great format. Edit: yeah it’s managed through the Eclipse Foundation now. They’re slowly working towards a formal spec, haven’t hit 1.0 yet. Details here https://gitlab.eclipse.org/eclipse/asciidoc-lang/asciidoc-la...

yeah it’s managed through the Eclipse Foundation now. They’re slowly working towards a formal spec, haven’t hit 1.0 yet.

Details here https://gitlab.eclipse.org/eclipse/asciidoc-lang/asciidoc-la...

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

#33

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…

I've gone a few routes. I have used sphinx's singlehtml builder to make a huge HTML file and then used pandoc to convert it into docx for final adjustments. This worked surprisingly well on a 2000-page document. But it's a bit cludgy.

Another (non-Sphinx) thing you can do is just write (portions of) your docx reports directly from Python using python-docx [1]. I use this approach when people give me strict docx templates that need to be filled in from Python in a very specific way. It can drop data-generated tables in at special placeholder sections and everything.

[1] https://python-docx.readthedocs.io/en/latest/

I will say that I've been more and more happy with just using sphinx straight to pdf for very professional looking reports. Given some latex preamble work in the config you can get it looking quite nice. I haven't personally struggled recently with too many egregious formatting issues on the sphinx-built latex stuff. You do have to swap over to landscape mode for large tables, etc. so it takes some work. But you're right that in many cases, formatting issues do still happen, so YMMV.

Another neat trick in sphinx is the csv-table directive [2], which loads table data directly from a csv file you have around, which you can obviously get from your xlsx.

[2] https://docutils.sourceforge.io/docs/ref/rst/directives.html...

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

#34

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…

There's some good news... arXiv just adopted LaTeXML for in-house HTML conversions of its papers. They allow users to submit bug reports and have collected over 700 so far. LaTeXML is maintained by a team at NIST, and they are actively responding to the bug reports on github issues. The LaTeX team headed by Frank Mittelbach is also working to add more structural information to the output of LaTeX, which will make com…

[deleted]

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

#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 get things like automatic index generation (for a physical book).

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

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

I was surprised recently when I changed up my HTML and PDF toolstack not just how good pandoc was, but the entire ecosystem that had emerged around pandoc including pandocomatic and pandoc-resume.

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

#37

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

Using it for internal docs, but we don’t generate pdfs so I can’t comment on that part.

I personally find asciidoc easier to write manually.

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

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

I was surprised recently when I changed up my HTML and PDF toolstack not just how good pandoc was, but the entire ecosystem that had emerged around pandoc including pandocomatic and pandoc-resume.

pandoc is so good. And volunteer maintained.

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

#39
post #9

I honestly don’t see the point of using LaTeX if you’re generating HTML. The great strength of LaTeX, in my view, is the precise control it provides over typography and formatting. As such, it works best with an output format which can faithfully render these documents — such as PDF. For an output format like HTML, which encourages reflowability over faithful rendering, I’d much prefer to use an ‘easier’ document for…

Exactly, there is a triangle of tradeoffs here: prettyness vs easyness vs responsiveness. You can only have 2 of them. pretty and easy is Latex. The reason people call CSS a nightmare is because responsiveness fundamentally makes it much more difficult to make a document pretty. So HTML+CSS gives you pretty + responsive or easy + responsive. That's not the same functionality as a pdf for a fixed scientific document.

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

#40

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…

Try out Typst.

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

Post reply on HN