by BlackFly · 1y ago · 0 comments
The problems are quite similar, "How do I center a div?" vs "How do I keep this float on this page?" Has latex really modernized? I don't hear a lot about new layouts or style mechanisms.
Most people are probably reading articles online these days, although there is a lot to be said about printing an article to read. It seems to me that adding responsiveness to journal articles instead of using a fixed paper layout regardless of media might be a good improvement for many readers in many situations.
With a fixed medium in mind, you can be extremely particular on where on this canvas you want a piece of text/graphic or whatever.
Without a fixed medium, you have to have logic to address the different mediums and compromises have to be made.
But regardless, I think that, in addition to moving away from Latex we should also reconsider the primary output format. Documents are rarely printed anymore, and inaccessible, fixed-size A4 pdfs are annoying to read on anything but an iPad Pro.
HTML by contrast explicitly does remove control over layout from the author and place it in the hands of the user (and their chosen user agent).
Both languages have mechanisms to (somewhat) separate the content from the formatting rules.
LaTeX would rather produce a bad document if it cannot produce a good one. Example: overfull hbox. A designer is still required who creates the documentclass, it is just that LaTeX comes with some predefined ones intended for scientific publishing.
HTML+CSS require pixel-perfect rendering. Example: ACID2 test. While it might have been the idea of plain HTML at some point (<em> instead of <i>), control has never been taken away from the author thanks to CSS.
Or are you arguing that there are somehow more people reading printed papers than digital?
Last time I looked into it, a while ago, my impression was that it would get rickety too soon. It’d be a good place to be, I think, if web and “document” tech stacks could have nice and practical convergence.
> Especially in combination with headless browser pdf generation
I have no idea why you’d want to do that. Browsers are bad at it, dedicated tools are great at it.
[2]: https://pagedjs.org/
Yes, sometimes, but I would say that one of the benefits of latex is how easy you can switch to another layout. But I guess the point is that you typically render to a set of outputs with fixed dimensions (pdf)
You can change that as you go along.
that's not the point they were trying to make. you may need to change the display target for every viewer.
HTML is usually distributed 'as source'. TeX (or LaTeX) is usually compiled to some other format first, before being distributed.
I don't want to manually type (or read past) HTML tags littered around the place. I don't want to manually put <p> tags on my text, or worry about how indentation will affect my rendered output. (For example, <p>foo</p> and <p> foo </p> render differently).
If I'm writing a blog post, I also don't want my post's text to get mixed up with site specific stuff, like meta tags and layout elements.
Are there any good "literate HTML" type tools which first and foremost let me type text, but still let me break into HTML? That I could get behind.
In other words, SGML is complementing the HTML vocabulary with authoring affordances, as originally intended (HTML is based on it).
Personally I’m also a fan of https://github.com/pugjs/pug , which is an alternate syntax for HTML that I find easier to work with when I need the full power of HTML but don’t want a thicket of angle brackets.
I know, but breaking into raw html isn’t as useful as you’d hope. You need a lot of html just to make an image with a caption. And all that ugly html needs to be copy pasted each time it’s needed, since there’s no way to reuse it.
And there’s lots of problems you can’t really solve like that at all. For example, I want latex style automatic numbering of figures (Figure 8: Xxx) and I want to link to that figure elsewhere in the document (“for detail, see Figure 8”). I want the numbers to be automatically generated based on document order. I also want numbered sections / headings. You can sort of do with css. But you can’t automatically label the links to those sections. Markdown also doesn’t support comments. You can use html comments but then my internal notes / removed sections end up in the generated html!
Even trying to do some of this stuff makes your document become - as you said - a thicket of angle brackets. I want to retain the readability of my document along the way. Even with a tool like pug, do I have to type a P before each paragraph? Gross. I just want to write my paragraphs with line breaks, like markdown. I don’t want it peppered with stuff like that. And I don’t want forced indentation on my prose.
p This is not a natural
p way to write a series of paragraphs of textAt the very least, because those are the two popular software systems used for creating documents. HTML+CSS isn't; and Javascript is irrelevant for print.
Most of the time, this is one of the browser engines, but there are many more things.
There is e.g. weasyprint to produce PDFs from HTML and CSS, which would be the closest alternative to LaTeX taking HTML+CSS as input.
For simple documents, it's a much cleaner alternative, I used it to autogenerate documents in a python backend.