Note that one can convert PDF to HTML using tools like: https://pdf2htmlex.github.io/pdf2htmlEX/ Example of a paper with equations: https://pdf2htmlex.github.io/pdf2htmlEX/demo/demo.html
I don't always use LaTeX, but when I do, I compile to HTML (2013)
111–120 of 152 posts
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#112Earlier quoted context omitted.
Sphinx/reStructuredText supports math in LaTeX input format [1], so you can still go nuts with complex math expressions while still benefitting from the relative simplicity. [1] https://www.sphinx-doc.org/en/master/usage/restructuredtext/... Looks like AsciiDoc supports similar latex math blocks [2]. Are there reasons you can't stick with that when doing math? [2] https://docs.asciidoctor.org/asciidoc/latest/stem/#bl…
For example: writing complicated expression invovling calculus/matrix. That's not something I need everyday, though.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#113Sphinx 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 forced myself to use it recently, I mostly found it to be both limited (cannot have part of a link in bold or italics) and inconvenient (each line of inline code must be indented).
I have enjoyed including inline code using the literal-include directive, which allows you to just include sections of code directly from a file in disk. This is great because you can cover your example code with unit tests while also talking about it in docs without replication. You can even use little border comments to mark snippet sections so that it's not sensitive to specific line numbers.
https://www.sphinx-doc.org/en/master/usage/restructuredtext/...
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#114I 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…
Sometimes it feels like they're only using LaTeX because they "learned it in college." You ever notice that? So many people in LaTeX threads say they learned it in college, or they've been using the same setting since college, or whatever. People learn LaTeX to make college papers look nice, and then they never need to configure it again? Isn't that strange?
The worst part, though, is that people complain if you call it latex. Which I think says quite a lot about it's userbase.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#115Another 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…
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#116I 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…
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#117Sphinx 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 ma…
E.g. I don't care about a configurable formatting for bibliography, but I would want a pre-made template that implements the APA bibliography guidelines with all the tiny nuances correctly. I don't want to configure margins for columns, I want a template that does the IEEE formatting standard exactly. (95% compatibility doesn't work, if a single missing feature means the tool can't produce the required document because it's wrong at one spot on page 3, then I'd need to abandon the tool and pick something that works). And crucially, I want the separation between content and formatting so that I can easily take a blob of content that was formatted for one layout and just copy it in a completely different template and have it match the new formatting guidelines, e.g. automatically moving all the image captions to the other side, changing how they're numbered and referenced, etc.
Latex has all this baggage solved, almost everyone who wants a specific format from me will provide a Latex template with their weird typesetting fetishes included, and I just need to provide the content - while any upcoming tool has an uphill battle to become compatible and provide the same things, at the very least pre-made (and well made) templates for all the major formats (each discipline of science generally uses something different).
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#118We're almost there for skipping LaTeX entirely, but in my experience, Google Docs and Overleaf still offer vastly superior collaborating tools. Now if we could just edit {.md; .rmd; .ipynb} files directly on Overleaf, with comments and track changes, we'd be in business...
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#119Note that one can convert PDF to HTML using tools like: https://pdf2htmlex.github.io/pdf2htmlEX/ Example of a paper with equations: https://pdf2htmlex.github.io/pdf2htmlEX/demo/demo.html
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#120Earlier 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…
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 templ…
Typora uses pandoc to do the conversion. My reports are mainly text, charts, and lots of math formulae and it works great. You don't get fine adjustment of layout, but I find that a feature not a bug. I see so many people waste time to put a figure in just the right place. It doesn't matter. The goal is clear information transfer so just get the figure in the doc where it makes sense and go on.