Skip to content

Commit

Permalink
Issue10294 new code for two column layout on typst 0.12.x (#10324)
Browse files Browse the repository at this point in the history
Update typst template to be compatible with two-column layout with
typst 0.12.  Layout instructions for two column layout has changed:
see typst/typst#5215.

Closes #10294.
  • Loading branch information
jarnowic authored Oct 29, 2024
1 parent ca30f49 commit e01023c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions data/templates/template.typst
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,17 @@
paper: paper,
margin: margin,
numbering: "1",
)
columns: cols,
)
set par(justify: true)
set text(lang: lang,
region: region,
font: font,
size: fontsize)
set heading(numbering: sectionnumbering)

if title != none {
place(top, float: true, scope: "parent", clearance: 4mm)[
#if title != none {
align(center)[#block(inset: 2em)[
#text(weight: "bold", size: 1.5em)[#title]
#(if subtitle != none {
Expand All @@ -53,7 +55,7 @@
]]
}

if authors != none and authors != [] {
#if authors != none and authors != [] {
let count = authors.len()
let ncols = calc.min(count, 3)
grid(
Expand All @@ -69,21 +71,18 @@
)
}

if date != none {
#if date != none {
align(center)[#block(inset: 1em)[
#date
]]
}

if abstract != none {
#if abstract != none {
block(inset: 2em)[
#text(weight: "semibold")[Abstract] #h(1em) #abstract
]
}
]

if cols == 1 {
doc
} else {
columns(cols, doc)
}
doc
}

0 comments on commit e01023c

Please sign in to comment.