For simple stuff, sure HTML and CSS is great, but when I want something print-perfect I use LaTeX.
A simple table in LaTeX is no harder than in HTML, assuming the same level of knowledge in the tool.
But then when you throw in a simple requirement like "left margins on even pages and right margins on odd pages need to be larger", HTML becomes hell to work in.
HTML and CSS, even with a media query for print, sucks.
I think in the long term, HTML/CSS will win out once there's better support for CSS Paged Module Level 3, and you'll be able to achieve that requirement with just
instead of needing to install/import different LaTeX packages. I think for most of my current use-cases level 2 has been sufficient but I can see if I can include Paged.js polyfill support by default so there's more support for customizability on that front.
@Page {
size: A4;
margin: 20mm 10mm 10mm 25mm;
}
Do my print specifics (hidden-print class etc), everyone can optimize it for his local layout, every browser supports "print to pdf", done.
TeX at this point has entered computing legend. It has such a long and storied life.
But it’s old. We need something modern, that represents current ways to make documents from code. And that way is CSS. I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS. We just need to find something open-source and clean that has no missing functionality.
I designed some worksheets in Typst and it is the best experience I've had with a typesetting system, hands down. It's not for everything but its defaults are good and very simple.
> But it’s old. We need something modern, that represents current ways to make documents from code.
I'd love something newer than TeX/LaTeX. Something with consistency (is it \$CMD{...}, \begin{$CMD}...\end{$CMD} or \{$CMD ...}?), better error messages, more specific and targeted warnings (most hbox-full warnings can be ignored, but many can't!), support for specifying `-Werror` (like gcc) and other things like that.
> I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS.
Maybe[1]. CSS and HTML needs a lot more functionality though. They have no page counter, no chapter counter, section counters, etc. No river detection, run detection, orphan detection, etc. No automatic reference manager[2], no automatic referencing of chapters, sections, tables, figures, etc. Missing correct hyphenation breakpoints.
Additionally, some things are there, but in a poor (for typesetting) way - inter-paragraph spacing must be faked (no, `:after` isn't a good way to specify `inter` spacing), no way to prevent what should be an atomic element (say ... an mbox containing a paragraph and an image) being broken across pages, no way to float an element to the next point in the document where it will fit (LaTeX does this by default, and it annoyed me no end when I could not find a way to get HTML documents to stop breaking my pretty short table across a page, and instead just place it on the next page).
Another thing that I think are a poor fit, but others think are superior, are the scripting facilities for creating new commands: doing `\newcommand or \newenvironment` is a lot less friction than doing an entire custom element. It's so little friction, that for an invoice I can simply do `\newcommand{\client}{\textbf\emph{The Client PTY LTD}}` and then use `\client` everywhere in the document.
I'm looking forward to a new LaTeX/TeX that fixes all those things. Maybe CSS+HTML would eventually get them, but many of those things are table stakes for typesetting, and yet they are not even on the horizon (or roadmap) for CSS+HTML.
[1] Could be I'm wrong. Like I said in another response, I'm no expert in CSS or HTML.
[1] This can be easily resolved with a custom web component
> And that way is CSS. I bet within my lifetime most scientific publications will move to a PDF tool that ingests CSS. We just need to find something open-source and clean that has no missing functionality.
Once I had the chance to move away from Word, TeX was the first place I went. That said, I eventually tired of the obtuse error messages and felt I was making things more complicated for no real gain.
Even keeping a BasicTex environment working requires effort that HTML does not.
> That said, I eventually tired of the obtuse error messages and felt I was making things more complicated for no real gain.
The error messages are pretty poor.
> Even keeping a BasicTex environment working requires effort that HTML does not.
I've been told, by Mac and Winodws users, that it's a pain.
Personally I've never had to download extra packages/styles directly on Debian. Performing `apt-get install tex-<whatever>` normally installs everything (where `<whatever>` is something I find from a search in synaptic).
I solved the issue by installing manually, but even that is a pain with TeX Live - some of the directory tree needed to be created before BasicTex was aware of the packages I was using.
For simple stuff, sure HTML and CSS is great, but when I want something print-perfect I use LaTeX.
A simple table in LaTeX is no harder than in HTML, assuming the same level of knowledge in the tool.
But then when you throw in a simple requirement like "left margins on even pages and right margins on odd pages need to be larger", HTML becomes hell to work in.
HTML and CSS, even with a media query for print, sucks.