mvuorre / quarto-preprint

A Quarto extension for preprints using Typst
https://mvuorre.github.io/quarto-preprint/index.pdf
Creative Commons Attribution 4.0 International
27 stars 2 forks source link

Branch for support for typst 0.12 #22

Closed danieltomasz closed 1 week ago

danieltomasz commented 1 week ago

I will be happy to help with potentially adjusting the template for typst 0.12, I see there is a branch dev, I can create fork and submit my changes later via PR but those should be against potential new branch, not the current one with typst 0.11.(1)

mvuorre commented 1 week ago

I would appreciate a PR, thank you. I have been waiting for release support for typst .12 in Quarto before getting on this; so would consider making sure that things are stable on the Quarto side before doing a lot of work.

danieltomasz commented 1 week ago

This is also related to https://github.com/mvuorre/quarto-preprint/issues/24

I think in long is a good idea to add in the future some info to README about compatibility of the template version with specific version of quarto, I am running the latest version of Rstudio/quarto, but I remember that some of my collaborators working in the hospital had the older version 2 or 3 releases back, and they were blocked from updating it, also in educational departments there might some sort of policy to update the software only once per year

Again this is just my comment, I don't know what is the purpose of this template (to serve primarily inside your organization) or to be a more universal template; having releases is really good idea, but if you want to support multiple version of quarto/typst at the same time, having separate branches tied with typst/quarto version might be even a better idea (with main is the latest development version), this way it will be easier to back-port bugfixes to older version, but this might introduce too much additional work for you to maintain those branches For example mne is having branches for each 0.x release https://github.com/mne-tools/mne-python

typst 0.12 coming 1.7 will introduce at least a few deprecation and 1 settings stops working, separating template code working with 0.11 and 0.12 might be a good idea in future (while still supporting quarto 1.5 and 1.6)

danieltomasz commented 1 week ago

on the other hand "only three numbers matter: zero, one, and more-than-one" http://agileinaflash.blogspot.com/2012/06/simplify-design-with-zero-one-many.html , branches might be overshooting, I asked simple question in typst community related to this issue https://github.com/typst/typst/discussions/5369

mvuorre commented 1 week ago

Thanks. I am not going to support multiple versions but just the latest releases of quarto/typst whatever--with the exception that it is a wild west currently as things are kind of experimental at the moment. (The purpose of this template is to "just work" which, obv, is impossible because YMMV depending on for example if you are allowed to update things...)

danieltomasz commented 1 week ago

Apparently there is possibility to have simple hack with the sys.version (I checked it and it worked)

if sys.version >= version(0,12,0) {
  set par(spacing: spacing)
} else {
  show par: set block(spacing: spacing)
}

I will open PR with that and other changes

danieltomasz commented 1 week ago

I will open PRs with smaller changes (starting from https://github.com/mvuorre/quarto-preprint/pull/26), please let me know if should open it against main or dev branch, I am closing this issue