4 ms·
I've been frustrated for years by the problem of producing paged media (e.g. stuff that is supposed to go on paper) through open source means. Yes, there's Tex
by bayesian_horse 7y ago
I've been frustrated for years by the problem of producing paged media (e.g. stuff that is supposed to go on paper) through open source means. Yes, there's Tex and its ilk, which is a great typesetting software, but hard to learn, and hard to adapt (in my opinion). Then there are expensive commercial options.
Currently I think the best solution is a headless browser, I use chromium+puppet, plus polyfills like paged.js. Now I can finally have most of the CSS paged media features, including page references.
Then there is the topic of word hyphenation. Chrome technically supports it through CSS, but in practice that is harder to achieve, afaik due to problems with distributing the dictionaries. There are again polyfills. I also think there should be a way to train a neural net on existing hyphenations to hyphenate virtually anything else in a sensible fashion, including fantasy words.
Without hyphenation, text justification doesn't work properly. It's also a good way to save space in tabular layouts, even if just for display on-screen.
- jboynyc 7y agoSounds like you might also want to keep eyes on another of Butterick's projects, a document processor called Quad, which creates documents directly, i.e., without going the (La)TeX route. Repository: https://github.com/mbutterick/quad https://github.com/mbutterick/quad Documentation: https://docs.racket-lang.org/quad/ https://docs.racket-lang.org/quad/
- albertzeyer 7y agoHave you actually tried LaTex? Because I found it quite easy to learn and to adapt. I mean, yes, there are nasty edge cases, when you want to achieve sth which is not so standard (but often you should not really do that anyway). But you can very much also just avoid them, and then I think it's pretty simple and just works. I don't really know any other solution, so I cannot really compare. But I would assume that for any other solution, you also would have to learn how to handle it, and not sure if that is really simpler and less effort than LaTeX.
- cpach 7y agoLaTeX is nice for some use-cases. It works quite well for academic papers. Especially if the journal has a standard template to use. But probably not so nice in other cases. I’m not sure it would be so convenient to layout a brochure or a book in LaTeX. (And I mean LaTeX, not TeX or ConTeXt.)
- capnrefsmmat 7y agoWith books, you want lots of control over page size and headers and the styling of section breaks and so on. Often that leads you down the path of importing sixteen different packages to try to get the control you want. The memoir document class, on the other hand, combines everything you’d need for a book into one place with a consistent interface and excellent documentation. Want to do a book in LaTeX, I think it’s memoir that would make it easy.
- fiddlerwoaroof 7y agoYeah, I’ve done a bunch of program-style booklets in Latex (including some with side by side translations) and it’s really a nice environment for that sort of thing. It’s a bit tricky figuring out all the moving parts but, once you have, it’s straightforward to just drop the text in, edit it a bit, and print out something that looks professional.
- bayesian_horse 7y agoI have used LaTex, though I can't proclaim to be very proficient in it. At best it is extremely different to HTML+CSS+JS, which I know much better. At worst I did have trouble going beyond templates/packages other people created. Subjectively I'd much rather generate reports/bills/etc through HTML than LaTex, though it is undoubtedly possible.
- pxndxx 7y agoI write Markdown and convert it to pdf via LaTeX with pandoc [0]. You can also embed some LaTeX directly, like math formulas. [0]: https://pandoc.org/ https://pandoc.org/
- vanous 7y agoSimilar here, i use Docbook and then convert to PDF with FOP, this all via Red-Hat's Publican. Recently i actually started writing in asciidoc, which i convert to docbook and then to pdf and other formats. This is now pretty slick. Both asciidoc and docbook also provide good localization tooling for gettext, which i need.
- mih 7y agoBesides other suggestions here, one of my favourites for publishing is orgmode + Latex (https://orgmode.org/manual/Embedded-LaTeX.html#Embedded-LaTeX https://orgmode.org/manual/Embedded-LaTeX.html#Embedded-LaTe...). Org-mode can be thought of as a wrapper around LaTeX. Content in Orgmode is way more human readable than writing entirely in LaTeX. It is great for prototyping, enabling you to get results quick and fast and also plays well with version control. The produced document can also contain Table of contents, cross-references etc. There is also the possibility to generate an intermediate LaTeX file where you can fine tune the typography and layout. To make the most of it though, you will need to learn a bit of LaTeX. Definitely worth a try if someone is looking for something simpler than totally committing to LaTeX, but like me would rather avoid HTML + CSS pain points.
- bayesian_horse 7y agoI'd rather avoid LaTex pain points... Also CSS has gotten a whole lot better.
- blue1 7y agoIs XSL-FO usable? Last time I looked at Apache FOP it lacked things that have been in css for decades (e.g. floats)
- cpach 7y ago”Then there are expensive commercial options.” What applications are most common these days in the publishing industry? Adobe Indesign? Quarkxpress?
- bayesian_horse 7y agoI was talking about PrinceXML mainly, when trying to automate reports etc. There are others.