Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f293643
fix: ccs, author font, headings, header, page layout
Amejonah1200 Jan 21, 2026
3b6c2ae
revert semibold
Amejonah1200 Jan 21, 2026
e88f599
add more fixes
Amejonah1200 Jan 21, 2026
28ed879
fix header and heading
Amejonah1200 Jan 21, 2026
db5d321
fix: authors not being grouped by affilations but "working groups"
Amejonah1200 Jan 21, 2026
f51e2d8
fix: title and justification limits
Amejonah1200 Jan 21, 2026
c3611e7
fix compile for nonacm
Amejonah1200 Jan 21, 2026
33ef7b8
boxed fence
jassielof Jan 21, 2026
1ddc02d
fix manuscript
Amejonah1200 Jan 21, 2026
2f8af3d
add more template text
Amejonah1200 Jan 21, 2026
e9ceb2a
prepare table
Amejonah1200 Jan 21, 2026
1abbf0a
add more template text
Amejonah1200 Jan 22, 2026
9583be8
fix manuscript's missing dot
Amejonah1200 Jan 22, 2026
c26a789
fix table placement, gap, row strokes and more
Amejonah1200 Jan 22, 2026
91439d5
fix math equations
Amejonah1200 Jan 22, 2026
16d4db5
add myself as author
Amejonah1200 Jan 22, 2026
38cffc8
little bit of refactoring
Amejonah1200 Jan 22, 2026
de23fa1
add more template text
Amejonah1200 Jan 22, 2026
207efac
improve acmsmall template
Amejonah1200 Jan 22, 2026
2283c06
fix citations in bib
Amejonah1200 Jan 22, 2026
7279c28
add Linux Libertine for math
Amejonah1200 Jan 22, 2026
56bbb8c
fix compilation of cover-page.typ
Amejonah1200 Jan 22, 2026
a3a26f3
no comma
jassielof Jan 22, 2026
e9b1412
Update acm-suite/formats/small.typ
jassielof Jan 22, 2026
e1c3e05
Update acm-suite/formats/small.typ
jassielof Jan 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ output/
out/
universe/

# Font directory, due to licensing
fonts/

# LaTeX
*.aux
*.log
Expand Down
2 changes: 1 addition & 1 deletion acm-suite/formats/manuscript.typ
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@

abstract
parbreak()
[CCS Concepts: • #process-ccs(ccs)]
[CCS Concepts: • #process-ccs(ccs).]
parbreak()
[Additional Key Words and Phrases: #keywords.join(", ")]

Expand Down
172 changes: 137 additions & 35 deletions acm-suite/formats/small.typ
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,95 @@
number: none,
article: none,
month: none,
authors: none,
author-groups: none,
affiliations: none,
year: none,
doi: none,
copyright-year: none,
keywords: none,
abstract: none,
short-authors: none,
no-acm: false,
nonacm: false,
body,
) = {
set text(ligatures: false)
let font-sizes = get-font-size(10pt)
let leading = 2pt
set document(title: title, keywords: keywords)
set heading(numbering: "1.1")
set text(font: "Linux Libertine G", size: font-sizes.normal, top-edge: 1em, bottom-edge: 0em, weight: "regular")
set par(
leading: leading,
spacing: leading,
justify: true,
linebreaks: "optimized",
justification-limits: (spacing: (min: 50% + 0pt, max: 150% + 0pt), tracking: (min: 0pt, max: 0pt)),
first-line-indent: (
amount: 1em,
all: false,
),
)
set block(spacing: leading)

set heading(numbering: (..n) => numbering("1.1", ..n) + h(7pt))
show heading: set text(size: font-sizes.normal, font: "Linux Biolinum G")
show heading: set block(above: 1em, below: 4pt)
show heading.where(depth: 3): set text(style: "italic")
show heading.where(depth: 4): set text(style: "italic")
Comment thread
jassielof marked this conversation as resolved.
Outdated
show heading.where(depth: 5): set text(style: "normal", weight: "regular")
show heading.where(depth: 3): set heading(outlined: false)
show heading.where(depth: 4): set heading(numbering: none, outlined: false)
show heading.where(depth: 5): set heading(numbering: none, outlined: false)

// show heading.where(depth: 3): it => counter(selector(heading).before(here())).display() + h(font-sizes.normal) + box(strong(it.body)) + [.]
// show heading.where(depth: 4): e => e.body + [. ]
// show heading.where(depth: 5): e => e.body + [. ] // FIXME: indentation should be that of the paragraph above
Comment thread
jassielof marked this conversation as resolved.


show std.title: set align(left)

let font-sizes = get-font-size(10pt)
show std.title: set text(font: "Libertinus Sans", size: font-sizes.LARGE)
set text(font: "Libertinus Serif", size: font-sizes.normal)
show std.title: set text(
font: ("Linux Biolinum", "Linux Biolinum G"),
size: font-sizes.Large,
top-edge: font-sizes.normal,
)
show std.title: set block(below: font-sizes.large)

show footnote.entry: set text(size: font-sizes.footnote)
set par(justify: true)

set table(
stroke: (x, y) => (
top: if y == 0 { 1pt } else if y == 1 { 1pt / 2 } else { 0pt },
bottom: 1pt,
),
)

set table(stroke: (_, y) => if y == 0 { (bottom: .5pt) }, row-gutter: (-5pt, -8pt))
show table: block.with(stroke: (y: 1pt), inset: (top: -3pt))

set figure(gap: 1.5em, supplement: "Fig.", placement: top)
show figure.caption: set text(font: ("Linux Biolinum", "Linux Biolinum G"))
show figure: set block(spacing: 2em) // for non floating figures
show figure: set place(clearance: 2em) // for floating figures
show figure: set figure.caption(separator: ". ")
show figure.where(kind: table): set figure.caption(position: top)
show figure.where(kind: table): set figure(placement: top, supplement: "Table")

// https://tex.stackexchange.com/a/540068
show raw: set text(font: "Inconsolata", size: font-sizes.normal)
show raw.where(block: true): box.with(inset: (y: 0.25em))
set enum(indent: 1em, body-indent: .35em)
set list(indent: 2em, body-indent: .35em)
set footnote.entry(indent: 0em)
// credits: shampoohere, https://sitandr.github.io/typst-examples-book/book/snippets/math/numbering.html#simple-code
show math.equation.where(block: true): it => {
set text(font: ("Linux Libertine", "Linux Libertine G"))
if it.fields().keys().contains("label") {
block(math.equation(block: true, numbering: "(1)", it), inset: .4em)
} else {
block(it, inset: .4em)
}
}


let copyright-notice = processed(
copyright: copyright,
Expand All @@ -46,11 +115,25 @@
doi: doi,
)


set page(
height: 10in,
width: 6.75in,
header-ascent: 27pt - font-sizes.normal,
footer-descent: 20pt - font-sizes.normal, // TODO: finetune
margin: (
top: 58pt + 27pt,
bottom: 44pt + 20pt,
inside: 46pt,
outside: 46pt,
),
header: context {
set text(size: font-sizes.footnote, font: "Linux Biolinum G", weight: "regular")
set block(spacing: .2em)

// the page with the title shouldn't have a header (usually the first one)
let current-page = here().position().page
let the-page = if no-acm [#current-page] else [#article:#current-page]
let the-page = if nonacm [#current-page] else [#article:#current-page]
set grid(inset: 0in, columns: (1fr, auto))
show grid: set block(spacing: 0in, inset: 0in, outset: 0in)

Expand All @@ -68,7 +151,7 @@
)
}
},
footer: if not no-acm {
footer: if not nonacm {
context {
let current-page = here().position().page
let the-date = datetime(year: year, month: month, day: 1)
Expand All @@ -87,11 +170,12 @@
} else { none },
)

set footnote.entry(indent: 0in)
set footnote.entry(indent: 0in, separator: line(length: 13% + 0pt, stroke: 0.5pt))

std.title()

let author-result = print-acm-authors(authors, affiliations, "en")
// FIXME: author with same address should be one a different line: only join authors with same mark?
let author-result = print-acm-authors(author-groups, affiliations, "en")
author-result.authors

if author-result.notes.len() > 0 {
Expand All @@ -101,41 +185,59 @@
}
]
}

thanks(line(length: 100%, stroke: 0.5pt))
thanks[Authors' Contact Information: #print-contact-info(authors, affiliations)]
if not no-acm {
{
thanks({
line(length: 100%, stroke: 0.5pt)
// FIXME: if multiple authors have same address and author note, then group them together
par(
[Authors' Contact Information: #print-contact-info(author-groups, affiliations)],
leading: .1em,
first-line-indent: (
amount: 0pt,
),
)
})
}
if not nonacm {
thanks(line(length: 100%, stroke: 0.5pt))
thanks(copyright-notice)
}

context {
set text(size: font-sizes.small)
parbreak()
set par(spacing: 1em, first-line-indent: 0em)

// FIXME: edge case when multiple paragraphs inside abstract
abstract

parbreak()
[CCS Concepts: #process-ccs(ccs)]
[CCS Concepts: #process-ccs(ccs).]
parbreak()
[Additional Key Words and Phrases: #keywords.join(", ")]
parbreak()
// TODO: ACM Reference format
strong[ACM Reference Format:]
parbreak()
let the-pages = 11
format-acm-reference(
authors,
year,
title,
journal,
volume,
number,
article,
month,
the-pages, // You'll need to add this parameter
doi,
text.lang,
)
if not nonacm {
parbreak()
// TODO: ACM Reference format
strong[ACM Reference Format:]
parbreak()
let the-pages = counter(page).final()
format-acm-reference(
author-groups,
year,
title,
journal,
volume,
number,
article,
month,
the-pages,
doi,
text.lang,
)
}
}

show bibliography: set text(size: font-sizes.footnote)
set bibliography(style: "association-for-computing-machinery", title: "References")

body
}
54 changes: 34 additions & 20 deletions acm-suite/formats/utils/authoring.typ
Original file line number Diff line number Diff line change
Expand Up @@ -127,24 +127,32 @@
}

// Print authors in ACM format
#let print-acm-authors(authors, affiliations, language) = {
if authors == none or authors.len() == 0 {
#let print-acm-authors(author-groups-raw, affiliations, language) = {
let author-groups = author-groups-raw.map(e => if "members" in e {
e
} else {
(
affiliations: e.affiliations,
members: (e,),
)
})
if author-groups == none or author-groups.len() == 0 {
return none
}

// FIXME: Make this contextual on the base font size
let font-sizes = get-font-size(10pt)
let groups = group-authors-by-affiliation(authors, affiliations)
let note-info = collect-author-notes(authors)
let note-info = collect-author-notes(author-groups.map(e => e.members).flatten())

let output = ()

// Process each affiliation group
for (aff-id, group-authors) in groups {
for group-authors in author-groups {
let author-names = ()
let aff-id = group-authors.affiliations

for author in group-authors {
let name = upper(author.name)
for author in group-authors.members {
let name = text(upper(author.name), font: "Linux Biolinum G")
let orcid = if "orcid" in author { author.orcid } else { none }
let formatted-name = format-author-name(name, orcid)
let note-mark = get-note-mark(author, note-info)
Expand All @@ -170,7 +178,8 @@
if aff-id != "no-affiliation" and aff-id in affiliations {
let aff-text = format-affiliation-short(affiliations.at(aff-id))

output.push([#text(size: font-sizes.large)[#authors-text, ]#text(aff-text, size: font-sizes.small)])
// FIXME: somehow size is 11 and not "normal"
output.push([#text(size: 11pt)[#authors-text, ]#text(aff-text, size: font-sizes.small)])
} else {
output.push(text(authors-text, size: font-sizes.large))
}
Expand All @@ -190,23 +199,27 @@

let contacts = ()

for author in authors {
for author-group in authors {
let parts = ()

// Name
parts.push(author.name)
let members = author-group.at("members", default: (author-group,))

// Email (if exists)
if "email" in author and author.email != none {
parts.push(author.email)
let author-parts = ()
for author in members {
// Name
let name = author.name
let email = author.at("email", default: none)

author-parts.push((name, email).filter(e => e != none).join(", "))
}

parts.push(author-parts.join("; "))
// Full affiliation (if exists)
if "affiliations" in author and author.affiliations != none {
let primary-aff = if type(author.affiliations) == array and author.affiliations.len() > 0 {
author.affiliations.at(0)
} else if type(author.affiliations) == str {
author.affiliations
if "affiliations" in author-group and author-group.affiliations != none {
let primary-aff = if type(author-group.affiliations) == array and author-group.affiliations.len() > 0 {
author-group.affiliations.at(0)
} else if type(author-group.affiliations) == str {
author-group.affiliations
} else {
none
}
Expand All @@ -224,7 +237,8 @@
}

// Print authors in simple list format (for ACM Reference Format)
#let print-authors-list(authors, language) = {
#let print-authors-list(author-groups, language) = {
let authors = author-groups.map(e => if "members" in e { e.members } else { (e,) }).flatten()
if authors == none or authors.len() == 0 {
return none
}
Expand Down
Loading