If I'm using LaTeX, I'm writing scientific articles. I expect scientific articles to be read by people on computers with normal screen sizes or printed off. Therefore there's no reason to bother with anything other than PDF. PDF works great.
That's certainly one use case. I might be the exception, trying to look up something on my phone, or following a link in a blog or HN post. Stuff in PDF's is hard to read, especially two column journal articles. I'm often not at my desk, since I might be in a meeting or in the lab.
I don't always use LaTeX, but when I do, I compile to HTML (2013)
141–150 of 152 posts
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#142Sphinx 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…
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#143Sphinx 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…
It is too complex compared to Markdown and hasn't got enough features to be comparable to Latex. And I still (almost) use the samé Latex templates that I used at university, 25 years ago.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#144Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#145A lot of this is just because latex has been a standard for publishers in my field since I started (approximately a thousand years ago).
When writing for journals, latex saves a lot of work. Publishers provide latex templates that ensure that articles have a prescribed format and scope of content. Being able to see a good facsimile of the final published form is quite handy for authors. Oh, this paragraph is going on for over a column -- I'll break it up. That sort of thing.
This still applies when writing for longer things, such as textbooks and course notes, but another factor (for me, the larger one) is that latex (more properly, the tex upon which latex sits) is a programming language. Macros can be written to do lots of things that would be a pain if done manually, and once a macro is written, altering an entire text is easy. I did this in a book I wrote a while back, writing macros to colourize text that would be indexed, add margin notes for things I wanted to return to, categorize paragraphs by function, and so on. I could turn all those macros on and off by uncommenting a line. This is really quite helpful in writing something that takes months to years to complete. Frankly, I use this macro approach even in memos written in markdown. Inside almost all of my markdown documents, there are latex commands.
As for reading things on a small screen, which I guess is really the topic here, I must admit that this is something I rarely do within my own field. Sure, I do it if reading one of those 10-km overview articles in Science or Nature. But when it comes to my own field, things are technical and demand long periods of study. I don't try to read this stuff on the bus or in a coffee queue. I need time (hours or days) and I need to be able to take notes.
Another reason I prefer PDF is that it is fixed. My brain puts information into a sort of spatial framework. Somehow, if I look at a paper I first read 40 years ago, I still know what information is on which page, which of the diagrams summarizes the whole thing, and which of the citations is key. This may be a flaw in my brain functioning, but I just don't find these sorts of memories forming when I read content that has a plastic format, with paragraph breaks changing if I adjust my view. But maybe this is just my age talking, I suppose.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#146Another 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…
You are the author of tikz.dev? I have always thought it was made by the tikz author. Mad props to you, the site is very functional and helpful to me. With it, using tikz feels a bit less like a chore.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#147Earlier quoted context omitted.
Time to sunset Latex https://github.com/typst/typst
Might still be pretty limited, but I've been looking for something with a more modern syntax for years, and this seems a good candidate! Thanks for sharing. Of course it will take years to replace LaTeX, but we need to begin working on it.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#148Earlier quoted context omitted.
Might still be pretty limited, but I've been looking for something with a more modern syntax for years, and this seems a good candidate! Thanks for sharing. Of course it will take years to replace LaTeX, but we need to begin working on it.
Typst is still fairly limited. Luckily it has a strong webassembly based plugin interface. I am currently using it for anything I'd otherwise use latex for.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#149Earlier quoted context omitted.
That's certainly one use case. I might be the exception, trying to look up something on my phone, or following a link in a blog or HN post. Stuff in PDF's is hard to read, especially two column journal articles. I'm often not at my desk, since I might be in a meeting or in the lab.
Don’t you have a computer in your lab? Also I actually think the 2 column format works well on phone bc you can zoom in to fit the column to the screen
Anything can be accommodated. One thought is to provide the source code, then people can adapt it to their display preferences. Like how HTML was originally envisioned.
Re: I don't always use LaTeX, but when I do, I compile to HTML (2013)
#150The 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…
Markdown actually works great for larger documents when you use it with pandoc [1]. That way you get HTML output and PDF output via Latex, without the HTML being a second class citizen. I wrote my thesis (50 pages) and multiple published papers this way. Maybe it seems janky but honestly my experience with Latex and it's 10 incompatible compilers and thousands of semi-incompatible packages has been much worse. I also…
Because academics still often publish physical books.
You prefer to have lots of tools and write custom extensions to programs. And you'll have to maintain those tools forever, and migrate them when the upstream software breaks, or the links you use die. Most academic authors don't want to do that, and with latex they can take the same typeset equations and diagrams (without learning any new tools):
- Publish a paper
- Write a talk
- Publish a book
- Manage a unified bibliography across all of these