aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorLuis Rivera <[email protected]>2024-10-29 15:22:49 -0600
committerGitHub <[email protected]>2024-10-29 14:22:49 -0700
commite01023c1f4b37fe9a7c8304462f7603f65019c01 (patch)
tree32c4114ef816661283dcb787701a76842fc935eb /data
parentca30f4930d4ebcdcd8ce3d1cbe72262c89c23738 (diff)
Issue10294 new code for two column layout on typst 0.12.x (#10324)
Update typst template to be compatible with two-column layout with typst 0.12. Layout instructions for two column layout has changed: see https://github.com/typst/typst/issues/5215. Closes #10294.
Diffstat (limited to 'data')
-rw-r--r--data/templates/template.typst19
1 files changed, 9 insertions, 10 deletions
diff --git a/data/templates/template.typst b/data/templates/template.typst
index 42532e1b2..f29ef409a 100644
--- a/data/templates/template.typst
+++ b/data/templates/template.typst
@@ -35,7 +35,8 @@
paper: paper,
margin: margin,
numbering: "1",
- )
+ columns: cols,
+ )
set par(justify: true)
set text(lang: lang,
region: region,
@@ -43,7 +44,8 @@
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 {
@@ -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(
@@ -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
}