daskol / typst-templates

A list of paper templates in the area of machine learning.
MIT License
115 stars 6 forks source link

Fix spacing error for 0.12 update #25

Open NTUYi opened 3 weeks ago

NTUYi commented 3 weeks ago

Given the latest update of V0.12, the par syntax has changed and therefore CVPR template need an update as below.

// ... existing code ...

#let cvpr2022(
  // ... existing parameters ...
) = {
  // ... existing setup ...

  set text(font: font-family, size: font-size.normal)
  // Update paragraph settings to use new spacing syntax
  set par(
    justify: true, 
    first-line-indent: 0.166666in, 
    leading: 0.532em,
    spacing: 0.54em  // Changed from show par: set block(spacing: 0.54em)
  )
  show raw: set text(font: font-family-mono, size: font-size.normal)

  // Remove old paragraph spacing rule since it's now handled in set par()
  // show par: set block(spacing: 0.54em)  // This line should be removed

  // ... rest of the code ...

  show quote.where(block: true): it => {
    set block(spacing: 14pt)
    set pad(left: 20pt, right: 20pt)
    set par(
      first-line-indent: 0em,
      spacing: 9.8pt  // Changed from show par: set block(spacing: 9.8pt)
    )
    it
  }

  // ... rest of the code ...
}