4 ms·
In the very limited time I used typst it has been pretty amazing, but imho there is one missing feature that a LaTeX successor, but even more so, templating eng
by YmiYugy 2y ago
In the very limited time I used typst it has been pretty amazing, but imho there is one missing feature that a LaTeX successor, but even more so, templating engine should have.
Come up or adapt a format, that can defer certain styling decisions to the consumer of the document. Stuff like, font, font size, line spacing, citation style, double or single column, numeration style, etc.
On a different note, we got to find a better way to exchange data than pdf reports. In my totally made up estimation about 10% of development time for enterprise software is spend on variations of these pdf templating tools and another 20% on extracting data from such generated pdfs.
- mixmastamyk 2y agoThat’s what html was supposed to be; probably still could. Epub uses it as well, though readers are not equivalent.
- justinpombrio 2y agoYou can do that in a couple different ways in Typst. First, if the user passes content into the template, then it's the user's content that ultimately gets to choose its styling. That is, there are three places that a style can be set: 1. In the content passed that the user passes to the template 2. In the template itself 3. By the user, outside the template They take priority in that order. OTOH, if the template really wants control, it can take optional styling arguments with defaults, and do as it likes with them. And if it wants content from the user that the user doesn't get to style, it can take that content as a string. It's a fantastic system, so far as I've seen.
- paholg 2y agoI think they were saying they want a format instead of PDF where the reader can change those things.
- BoingBoomTschak 2y agoThat was exactly my reaction after stumbling upon https://typst.app/universe/package/modern-cv/ https://typst.app/universe/package/modern-cv/ I just want a replacement for ModernCV, not downloading MBs of fonts I don't want to use.
- Klasiaster 2y agoYou can embed attachments in PDFs. This way you could include CSV or JSON files into your PDF report. For a quick way doing it with CLI see `qpdf --help=add-attachment`
- perlgeek 2y ago> Come up or adapt a format, that can defer certain styling decisions to the consumer of the document. Stuff like, font, font size, line spacing, citation style, double or single column, numeration style, etc. We have that, it's called HTML. The use case is quite different from PDF though.
- dleeftink 2y agoPaged.js might scratch that HTML-as-a-doc itch until we can drop the polyfill for the actual CSS paged media spec [0]. [0]: https://github.com/pagedjs/pagedjs/tree/main/examples https://github.com/pagedjs/pagedjs/tree/main/examples
- kaba0 2y agoThere is no universally correct layouting. I for one absolutely detest epub versions of scientific books. Even if they are the official variant and not a generated one from some other format that understandably sucks, diagrams will be all around and I have to go back and forth and lose context. PDFs for all their shortcomings are a godsend and they do their single job perfectly. I much rather zoom in on my phone to a paragraph than look at a badly placed diagram taking up half a page in an unrelated context.