Closed danieltomasz closed 2 weeks ago
I will push in next PR code fixing this (a slightly changing the way author_string is created, [] was the culprit https://forum.typst.app/t/suppresing-space-between-affiliataon-superscipt-name-and-comma-in-custom-template/1589/6?u=danborek
// Format author strings here, so can use in author note
let author_strings = ()
if authors != none {
for a in authors {
let author_string = box[#{
a.name
if authors.len() > 1 {super(a.affiliation)}
if a.keys().contains("email") {[\*]}
if a.keys().contains("orcid") {
box(
height: 1em,
link(
a.orcid,
figure(
image("orcid.svg", height: 0.9em)
)
)
)
}
}]
if a.keys().contains("corresponding") {
authornote = [\*Send correspondence to: #a.name, #a.email.\ #authornote]
}
author_strings.push( author_string)
}
}
@mvuorre with my changes and box around the string gone, the spacing between is much more tight now, I replicate current behaviour by adding double spaces after the comma (EDIT: after testing I am not adding any additional space)
if authors != none {
titleblock(
weight: "regular", size: 1.25em,
[#author_strings.join(", ", last: " & ")]
)
}
When the coma appears (at least 3 authors) and the authors doesnt have orcid and they aren't corresponding, additional space appears after affiliation superscript and before coma, example below: