diff --git a/_extensions/apaish-document/typst-template.typ b/_extensions/apaish-document/typst-template.typ index 67af59e..1fa33be 100644 --- a/_extensions/apaish-document/typst-template.typ +++ b/_extensions/apaish-document/typst-template.typ @@ -62,20 +62,27 @@ align(center)[ #block(below: leading*2)[ #set text(size: fontsize*1.15) - #let alast = authors.pop() - #if authors.len() > 1 { - // If multiple authors, join appropriately + // Formatting depends on N authors 1, 2, or 2+ + #if authors.len() > 2 { for a in authors [ - #a.name#super[#a.affiliations], - ] + [and #alast.name#super[#alast.affiliations]] - } else { - // If only one author, format a string - [#alast.name#super[#alast.affiliations]] + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])]#if a!=authors.at(authors.len()-1) [#if a==authors.at(authors.len()-2) [, and] else [,]] + ] + } + #if authors.len() == 2 { + for a in authors [ + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])]#if a!=authors.at(authors.len()-1) [and] + ] + } + #if authors.len() == 1 { + for a in authors [ + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])] + ] } ] + #counter(footnote).update(0) ] } - + if affiliations != none { align(center)[ #block(below: leading*2)[ @@ -97,18 +104,6 @@ ] } - place( - bottom, float: true, clearance: 1em, - [ - #line(length: 100%, stroke: 0.5pt) - #set text(size: fontsize*0.85) - #authornote - // todo: The corresponding YAML field doesn't seem to work, so hacky - Correspondence concerning this article should be addressed to - #for a in authors [#if a.note == "true" [#a.name, #a.email]]. - ] - ) - /* Redefine headings up to level 5 */ show heading.where( level: 1 diff --git a/_extensions/apaish-journal/typst-template.typ b/_extensions/apaish-journal/typst-template.typ index 05782fe..0eff894 100644 --- a/_extensions/apaish-journal/typst-template.typ +++ b/_extensions/apaish-journal/typst-template.typ @@ -62,17 +62,24 @@ align(center)[ #block(below: leading*2)[ #set text(size: fontsize*1.3) - #let alast = authors.pop() - #if authors.len() > 1 { - // If multiple authors, join appropriately + // Formatting depends on N authors 1, 2, or 2+ + #if authors.len() > 2 { for a in authors [ - #a.name#super[#a.affiliations], - ] + [and #alast.name#super[#alast.affiliations]] - } else { - // If only one author, format a string - [#alast.name#super[#alast.affiliations]] + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])]#if a!=authors.at(authors.len()-1) [#if a==authors.at(authors.len()-2) [, and] else [,]] + ] + } + #if authors.len() == 2 { + for a in authors [ + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])]#if a!=authors.at(authors.len()-1) [and] + ] + } + #if authors.len() == 1 { + for a in authors [ + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])] + ] } ] + #counter(footnote).update(0) ] } @@ -97,18 +104,6 @@ ] } - place( - bottom, float: true, clearance: 1em, - [ - #line(length: 100%, stroke: 0.5pt) - #set text(size: fontsize*0.85) - #authornote - // todo: The corresponding YAML field doesn't seem to work, so hacky - Correspondence concerning this article should be addressed to - #for a in authors [#if a.note == "true" [#a.name, #a.email]]. - ] - ) - /* Redefine headings up to level 5 */ show heading.where( level: 1 diff --git a/_extensions/apaish-manuscript/typst-template.typ b/_extensions/apaish-manuscript/typst-template.typ index 63578d3..e58a08e 100644 --- a/_extensions/apaish-manuscript/typst-template.typ +++ b/_extensions/apaish-manuscript/typst-template.typ @@ -54,17 +54,24 @@ if authors != none { align(center)[ #block(above: leading, below: leading)[ - #let alast = authors.pop() - #if authors.len() > 1 { - // If multiple authors, join appropriately + // Formatting depends on N authors 1, 2, or 2+ + #if authors.len() > 2 { for a in authors [ - #a.name#super[#a.affiliations], - ] + [and #alast.name#super[#alast.affiliations]] - } else { - // If only one author, format a string - [#alast.name#super[#alast.affiliations]] + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])]#if a!=authors.at(authors.len()-1) [#if a==authors.at(authors.len()-2) [, and] else [,]] + ] + } + #if authors.len() == 2 { + for a in authors [ + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])]#if a!=authors.at(authors.len()-1) [and] + ] + } + #if authors.len() == 1 { + for a in authors [ + #a.name#super[#a.affiliations]#if a.note == "true" [#footnote(numbering: "*", [Send correspondence to #a.name, #a.email. #authornote])] + ] } ] + #counter(footnote).update(0) ] } @@ -78,16 +85,6 @@ ] } - align( - bottom, - [ - #align(center, text(weight: "bold", "Author note")) - #authornote - // todo: The corresponding YAML field doesn't seem to work, so hacky - Correspondence concerning this article should be addressed to - #for a in authors [#if a.note == "true" [#a.name, #a.email]]. - ] - ) pagebreak() if abstract != none {