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

Reference section has paragraph breaks #7

Closed mvuorre closed 5 days ago

mvuorre commented 4 months ago

There should not be additional space between references

image
danieltomasz commented 1 week ago

I fixed this for 0.12 with #show bibliography: set par( spacing: 0.65em, leading: 0.65em), for 0.11 should be probably something like #show bibliography: set block( spacing: 0.65em, leading: 0.65em) but I dont have time for tesing it tonight, relevant typst forum thread https://forum.typst.app/t/how-to-change-spacing-between-entries-within-bibliography/1366

mvuorre commented 6 days ago

Waiting for Typst 0.12 to be included in Quarto

danieltomasz commented 6 days ago

I will check if I can provide solution for 0.11, then will do a small PR

danieltomasz commented 6 days ago

Seems to work both for 0.12 and 0.11 (I edited my previous reply according to https://forum.typst.app/t/scope-of-show-rules-in-if-condition-bibliography/1598/2?u=danborek apparently starting from #if will not work in typst due to scope problem so https://github.com/mvuorre/quarto-preprint/issues/13 might be needed to reopen or I could update together with this issue)

  // Set space between paragraphs
  set par(spacing: spacing) if sys.version >= version(0, 12, 0)
  show par: set block(spacing: spacing) if sys.version >= version(0,12,0)

  // space around blocks in bibliography 
  show bibliography: set par(spacing:  0.65em,  leading: 0.65em) if sys.version >= version(0, 12, 0)
  show bibliography: set block(spacing: leading) if sys.version < version(0, 12, 0)

bibliography looks like this then, I changed the default values, theue image

When I set the default values,( on 0.12) it looks more like the screnshot from 1st post

  // space around blocks in bibliography 
  show bibliography: set par(spacing:  spacing,  leading: leading) if sys.version >= version(0, 12, 0)
  show bibliography: set block(spacing: leading) if sys.version < version(0, 12, 0)

image

What should be the proper value?

mvuorre commented 5 days ago

Thanks for looking into this! Fixed now. (It's a judgment call re proper value--my thinking was to make all references appear as lines in the same paragraph.)