diff --git a/generic-manuscript/_extensions/generic-manuscript/_extension.yml b/generic-manuscript/_extensions/generic-manuscript/_extension.yml new file mode 100644 index 0000000..04c3094 --- /dev/null +++ b/generic-manuscript/_extensions/generic-manuscript/_extension.yml @@ -0,0 +1,11 @@ +title: Generic Manuscript +author: Callum Arnold +version: 1.0.0 +quarto-required: ">=1.5.0" +contributes: + formats: + typst: + template-partials: + - typst-template.typ + - typst-show.typ + diff --git a/generic-manuscript/_extensions/generic-manuscript/typst-show.typ b/generic-manuscript/_extensions/generic-manuscript/typst-show.typ new file mode 100644 index 0000000..25b14e0 --- /dev/null +++ b/generic-manuscript/_extensions/generic-manuscript/typst-show.typ @@ -0,0 +1,86 @@ + // title: "Title", + // header-title: "Header Title", + // authors: ( + // "Author 1": ( + // "affiliation": ("affil-1", "affil-2"), + // "email": "a1-email", + // ), + // "Author 2": ( + // "affiliation": ("affil-1", "affil-3"), + // "email": "a2-email", + // ), + // ), + // affiliations: ( + // "affil-1": "Affiliation 1", + // "affil-2": "Affiliation 2", + // "affil-3": "Affiliation 3", + // ), + // abstract: [ + // == Background + // Abstract Background + // + // == Methods + // Abstract Methods + // + // == Result + // Abstract Results + // + // == Conclusions + // Abstract Conclusions + // ], + // keywords: (), + // bib: "refs.bib", + // bib-title: "Refs", + // word-count: false, + // line-numbers: false, + +#show: body => article( + $if(title)$ + title: "$title$", + $endif$ + $if(header-title)$ + header-title: "$header-title$", + $endif$ + $if(by-author)$ + authors: ( + $for(by-author)$ + $if(it.name.literal)$ + "$it.name.literal$": ( + affiliation: ($for(it.affiliations)$"$it.id$"$sep$, $endfor$), + $if(it.attributes.corresponding)$corresponding: "true",$endif$ + $if(it.attributes.equal-contributor)$equal-contributor: "true",$endif$ + $if(it.email)$email: "$it.email$",$endif$ + ),$endif$ + $endfor$ + ), + $endif$ + $if(by-affiliation)$ + affiliations: ( + $for(by-affiliation)$ + "$it.id$": "$it.address$"$sep$, + $endfor$ + ), + $endif$ + $if(date)$ + date: $date$, + $endif$ + $if(bibliography)$ + bib: "$bibliography$", + $if(bibliographytitle)$ + bib-title: "$bibliographytitle$", + $endif$ + $endif$ + $if(keywords)$ + keywords: ($for(keywords)$"$it$"$sep$,$endfor$), + $endif$ + $if(abstract)$ + abstract: [$abstract$], + $endif$ + $if(word-count)$ + word-count: $word-count$, + $endif$ + $if(line-numbers)$ + line-numbers: $line-numbers$, + $endif$ + body, +) diff --git a/generic-manuscript/_extensions/generic-manuscript/typst-template.typ b/generic-manuscript/_extensions/generic-manuscript/typst-template.typ new file mode 100644 index 0000000..60d9b25 --- /dev/null +++ b/generic-manuscript/_extensions/generic-manuscript/typst-template.typ @@ -0,0 +1,229 @@ +#let article( + // Article's Title + title: "Article Title", + header-title: none, + + // A dictionary of authors. + // Dictionary keys are authors' names. + // Dictionary values are meta data of every author, including + // label(s) of affiliation(s), email, contact address, + // or a self-defined name (to avoid name conflicts). + // Once the email or address exists, the author(s) will be labelled + // as the corresponding author(s), and their address will show in footnotes. + // + // Example: + // ( + // "Author Name": ( + // "affiliation": "affil-1", + // "email": "author.name@example.com", // Optional + // "address": "Mail address", // Optional + // "name": "Alias Name" // Optional + // ) + // ) + authors: (), + + // A dictionary of affiliation. + // Dictionary keys are affiliations' labels. + // These labels show be constent with those used in authors' meta data. + // Dictionary values are addresses of every affiliation. + // + // Example: + // ( + // "affil-1": "Institution Name, University Name, Road, Post Code, Country" + // ) + affiliations: (), + + // The paper's abstract. + abstract: [], + + // The paper's keywords. + keywords: (), + + // The path to a bibliography file if you want to cite some external + // works. + bib: none, + bib-title: "References", + + // Word count + word-count: false, + + // Line numbers + line-numbers: false, + + // Paper's content + body +) = { + // Set document properties + set bibliography(title: bib-title) + + // Line numbers have not yet been implemented in a release version, but are coming soon + // https://github.com/typst/typst/issues/352 + // https://github.com/typst/typst/pull/4516 + //if line-numbers { + // set par.line(numbering: "1") + // show figure: set par.line(numbering: none) + //} + + set document(title: title, author: authors.keys()) + set page(numbering: "1", number-align: center) + set text(font: ("Linux Libertine", "STIX Two Text", "serif"), lang: "en") + show footnote.entry: it => [ + #set par(hanging-indent: 0.7em) + #set align(left) + #numbering(it.note.numbering, ..counter(footnote).at(it.note.location())) #it.note.body + ] + show figure.caption: emph + set table( + fill: (x, y) => { + if y == 0 {gray} + } + ) + show table.cell: it => { + if it.y == 0 { + strong(it) + } else { + it + } + } + + // Title block + align(center)[ + #block(text(size: 14pt, weight: "bold", title)) + + #v(1em) + + // Authors and affiliations + + // Restore affiliations' keys for looking up later + // to show superscript labels of affiliations for each author. + #let inst_keys = affiliations.keys() + + // Authors' block + #block([ + // Process the text for each author one by one + #for (ai, au) in authors.keys().enumerate() { + let au_meta = authors.at(au) + // Don't put comma before the first author + if ai != 0 { + text([, ]) + } + // Write auther's name + let au_name = if au_meta.keys().contains("name") {au_meta.name} else {au} + text([#au_name]) + + // Get labels of author's affiliation + let au_inst_id = au_meta.affiliation + let au_inst_primary = "" + // Test whether the author belongs to multiple affiliations + if type(au_inst_id) == "array" { + // If the author belongs to multiple affiliations, + // record the first affiliation as the primary affiliation, + au_inst_primary = affiliations.at(au_inst_id.first()) + // and convert each affiliation's label to index + let au_inst_index = au_inst_id.map(id => inst_keys.position(key => key == id) + 1) + // Output affiliation + super([#(au_inst_index.map(id => [#id]).join([,]))]) + } else if (type(au_inst_id) == "string") { + // If the author belongs to only one affiliation, + // set this as the primary affiliation + au_inst_primary = affiliations.at(au_inst_id) + // convert the affiliation's label to index + let au_inst_index = inst_keys.position(key => key == au_inst_id) + 1 + // Output affiliation + super([#au_inst_index]) + } + + // Corresponding author + if au_meta.keys().contains("corresponding") and (au_meta.corresponding == "true" or au_meta.corresponding == true) { + [#super[,]#footnote(numbering: "*")[ + Corresponding author. #au_name. Address: + #if not au_meta.keys().contains("address") or au_meta.address == "" { + [#au_inst_primary.] + } + #if au_meta.keys().contains("email") { + [Email: #link("mailto:" + au_meta.email.replace("\\", "")).] + } + ]] + } + + if au_meta.keys().contains("equal-contributor") and (au_meta.equal-contributor == "true" or au_meta.equal-contributor == true){ + if ai == 0 { + [#super[,]#footnote(numbering: "*")[Equal contributors.]] + } else { + [#super[,]#footnote(numbering: "*", )] + } + } + } + ]) + + #v(1em) + + // Affiliation block + #align(left)[#block([ + #set par(leading: 0.4em) + #for (ik, key) in inst_keys.enumerate() { + text(size: 0.8em, [#super([#(ik+1)]) #(affiliations.at(key))]) + linebreak() + } + ])] + ] + + if header-title == "true" { + header-title = title + } + + set page( + header: [ + #set text(8pt) + #align(right)[#header-title] + ], + ) + if word-count { + import "@preview/wordometer:0.1.2": word-count, total-words + show: word-count.with(exclude: (heading, table, figure.caption)) + } + + // Abstract and keyword block + if abstract != [] { + pagebreak() + + block([ + #if word-count { + import "@preview/wordometer:0.1.2": word-count, word-count-of, total-words + text(weight: "bold", [Word count: ]) + text([#word-count-of(exclude: (heading))[#abstract].words]) + } + #heading([Abstract]) + #abstract + + #if keywords.len() > 0 { + linebreak() + text(weight: "bold", [Key words: ]) + text([#keywords.join([; ]).]) + } + ]) + + v(1em) + } + + // Display contents + + pagebreak() + + show heading.where(level: 1): it => block(above: 1.5em, below: 1.5em)[ + #set pad(bottom: 2em, top: 1em) + #it.body + ] + + set par(first-line-indent: 0em) + + if word-count { + import "@preview/wordometer:0.1.2": word-count, word-count-of, total-words + text(weight: "bold", [Word count: ]) + text([#word-count-of(exclude: (heading, table, figure.caption))[#body].words]) + } + + body + +} + diff --git a/generic-manuscript/elephant.png b/generic-manuscript/elephant.png new file mode 100644 index 0000000..9fb752b Binary files /dev/null and b/generic-manuscript/elephant.png differ diff --git a/generic-manuscript/refs.bib b/generic-manuscript/refs.bib new file mode 100644 index 0000000..6a024b6 --- /dev/null +++ b/generic-manuscript/refs.bib @@ -0,0 +1,9 @@ +@article{netwok2020, + title={At-scale impact of the {Net Wok}: A culinarically holistic investigation of distributed dumplings}, + author={Astley, Rick and Morris, Linda}, + journal={Armenian Journal of Proceedings}, + volume={61}, + pages={192--219}, + year=2020, + publisher={Automatic Publishing Inc.} +} diff --git a/generic-manuscript/template.qmd b/generic-manuscript/template.qmd new file mode 100644 index 0000000..1f11303 --- /dev/null +++ b/generic-manuscript/template.qmd @@ -0,0 +1,163 @@ +--- +title: "Long Manuscript Title" +# comment out (or set to `false`) to not display title in header, and set to `true` to display the manuscript title in the header +header-title: "Header Title" +authors: + - name: "Author 1" + affiliations: + - ref: "affil-1" + - ref: "affil-2" + corresponding: true + equal-contributor: true + email: "a1-email" + - name: "Author 2" + affiliations: + - ref: "affil-1" + - ref: "affil-3" + equal-contributor: true +affiliations: + - id: "affil-1" + address: "Affiliation 1" + - id: "affil-2" + address: "Affiliation 2" + - id: "affil-3" + address: "Affiliation 3" +execute: + echo: false + warning: false + message: false + # path to your bib +bibliography: refs.bib +# Typst bib style (see here for all available styles https://typst.app/docs/reference/model/bibliography/#parameters-style) +# Alternatively, you can provide the path to a csl file +bibliographystyle: springer-vancouver +# Alternatively, you can use Pandoc citeproc by uncommenting the below options (and commenting out `bibliographystyle`) +# citeproc: true +# csl: my-csl.csl +# set bibliography title. Defaults to "References" +bibliographytitle: "Bibliography" +# set to `false` (or comment out) if you don't want to produce a word count for the abstract and main text +word-count: true +abstract: | + ## Background + + Abstract Background + + ## Methods + + Abstract Methods + + ## Results + + Abstract Results + + ## Conclusions + + Abstract Conclusions +toc: false +format: + generic-manuscript-typst: + keep-typ: true +--- + +```{r libraries} +# load r libraries and write code in R chunks +# library(tidyverse) +``` + +# Background + +You can cite using `[@citation]` e.g., [@netwok2020]. + +You can include raw typst as below + +````md +#| echo: true +#| include: false +```{=typst} +#set math.equation(numbering: "1") +#let boldred(x) = text(fill: rgb("#8B0000"), $bold(#x)$) + +$ +rho mat( + beta_(H H), beta_(H M), beta_(H L) ; + beta_(M H), beta_(H M), beta_(M L) ; + beta_(L H), beta_(H M), beta_(L L) ; +) +$ +``` +```` + +```{=typst} +#set math.equation(numbering: "1") +#let boldred(x) = text(fill: rgb("#8B0000"), $bold(#x)$) + +$ +rho mat( + beta_(H H), beta_(H M), beta_(H L) ; + beta_(M H), beta_(H M), beta_(M L) ; + beta_(L H), beta_(H M), beta_(L L) ; +) +$ +``` + +You can insert images and cross-reference them using Markdown syntax `![An image of an elephant](elephant.png){#fig-elephant}`. + +> **Note:** you need to use `-` to separate words in the figure tables. Trying to use `_` will result in an error as Quarto will search your bib file for a reference. + +![An image of an elephant](./elephant.png){#fig-elephant} + +And this is a reference to the @fig-elephant using `@fig-elephant`. + +You can insert page breaks using Quarto shortcode syntax `{{< shortcode >}}`, where `shortcode` is `pagebreak` + +{{< pagebreak >}} + +## Lorem + +{{< lipsum 2 >}} + +{{< pagebreak >}} + +# Acknowledgements + +## Author Contributions + +*Conceptualization:* + +*Data curation:* + +*Formal analysis:* + +*Funding acquisition:* + +*Investigation:* + +*Methodology:* + +*Project administration:* + +*Software:* + +*Supervision:* + +*Validation:* + +*Visualization:* + +*Writing - original draft:* + +*Writing - review and editing:* + +## Conflicts of Interest and Financial Disclosures + +## Data Access, Responsibility, and Analysis + +## Data Availability + +## Collaborators + +{{< pagebreak >}} + +::: {#refs} +::: diff --git a/generic-manuscript/template.typ b/generic-manuscript/template.typ new file mode 100644 index 0000000..6adf593 --- /dev/null +++ b/generic-manuscript/template.typ @@ -0,0 +1,593 @@ +// Some definitions presupposed by pandoc's typst output. +#let blockquote(body) = [ + #set text( size: 0.92em ) + #block(inset: (left: 1.5em, top: 0.2em, bottom: 0.2em))[#body] +] + +#let horizontalrule = [ + #line(start: (25%,0%), end: (75%,0%)) +] + +#let endnote(num, contents) = [ + #stack(dir: ltr, spacing: 3pt, super[#num], contents) +] + +#show terms: it => { + it.children + .map(child => [ + #strong[#child.term] + #block(inset: (left: 1.5em, top: -0.4em))[#child.description] + ]) + .join() +} + +// Some quarto-specific definitions. + +#show raw.where(block: true): block.with( + fill: luma(230), + width: 100%, + inset: 8pt, + radius: 2pt + ) + +#let block_with_new_content(old_block, new_content) = { + let d = (:) + let fields = old_block.fields() + fields.remove("body") + if fields.at("below", default: none) != none { + // TODO: this is a hack because below is a "synthesized element" + // according to the experts in the typst discord... + fields.below = fields.below.amount + } + return block.with(..fields)(new_content) +} + +#let empty(v) = { + if type(v) == "string" { + // two dollar signs here because we're technically inside + // a Pandoc template :grimace: + v.matches(regex("^\\s*$")).at(0, default: none) != none + } else if type(v) == "content" { + if v.at("text", default: none) != none { + return empty(v.text) + } + for child in v.at("children", default: ()) { + if not empty(child) { + return false + } + } + return true + } + +} + +// Subfloats +// This is a technique that we adapted from https://github.com/tingerrr/subpar/ +#let quartosubfloatcounter = counter("quartosubfloatcounter") + +#let quarto_super( + kind: str, + caption: none, + label: none, + supplement: str, + position: none, + subrefnumbering: "1a", + subcapnumbering: "(a)", + body, +) = { + context { + let figcounter = counter(figure.where(kind: kind)) + let n-super = figcounter.get().first() + 1 + set figure.caption(position: position) + [#figure( + kind: kind, + supplement: supplement, + caption: caption, + { + show figure.where(kind: kind): set figure(numbering: _ => numbering(subrefnumbering, n-super, quartosubfloatcounter.get().first() + 1)) + show figure.where(kind: kind): set figure.caption(position: position) + + show figure: it => { + let num = numbering(subcapnumbering, n-super, quartosubfloatcounter.get().first() + 1) + show figure.caption: it => { + num.slice(2) // I don't understand why the numbering contains output that it really shouldn't, but this fixes it shrug? + [ ] + it.body + } + + quartosubfloatcounter.step() + it + counter(figure.where(kind: it.kind)).update(n => n - 1) + } + + quartosubfloatcounter.update(0) + body + } + )#label] + } +} + +// callout rendering +// this is a figure show rule because callouts are crossreferenceable +#show figure: it => { + if type(it.kind) != "string" { + return it + } + let kind_match = it.kind.matches(regex("^quarto-callout-(.*)")).at(0, default: none) + if kind_match == none { + return it + } + let kind = kind_match.captures.at(0, default: "other") + kind = upper(kind.first()) + kind.slice(1) + // now we pull apart the callout and reassemble it with the crossref name and counter + + // when we cleanup pandoc's emitted code to avoid spaces this will have to change + let old_callout = it.body.children.at(1).body.children.at(1) + let old_title_block = old_callout.body.children.at(0) + let old_title = old_title_block.body.body.children.at(2) + + // TODO use custom separator if available + let new_title = if empty(old_title) { + [#kind #it.counter.display()] + } else { + [#kind #it.counter.display(): #old_title] + } + + let new_title_block = block_with_new_content( + old_title_block, + block_with_new_content( + old_title_block.body, + old_title_block.body.body.children.at(0) + + old_title_block.body.body.children.at(1) + + new_title)) + + block_with_new_content(old_callout, + new_title_block + + old_callout.body.children.at(1)) +} + +// 2023-10-09: #fa-icon("fa-info") is not working, so we'll eval "#fa-info()" instead +#let callout(body: [], title: "Callout", background_color: rgb("#dddddd"), icon: none, icon_color: black) = { + block( + breakable: false, + fill: background_color, + stroke: (paint: icon_color, thickness: 0.5pt, cap: "round"), + width: 100%, + radius: 2pt, + block( + inset: 1pt, + width: 100%, + below: 0pt, + block( + fill: background_color, + width: 100%, + inset: 8pt)[#text(icon_color, weight: 900)[#icon] #title]) + + if(body != []){ + block( + inset: 1pt, + width: 100%, + block(fill: white, width: 100%, inset: 8pt, body)) + } + ) +} + +#let article( + // Article's Title + title: "Article Title", + header-title: none, + + // A dictionary of authors. + // Dictionary keys are authors' names. + // Dictionary values are meta data of every author, including + // label(s) of affiliation(s), email, contact address, + // or a self-defined name (to avoid name conflicts). + // Once the email or address exists, the author(s) will be labelled + // as the corresponding author(s), and their address will show in footnotes. + // + // Example: + // ( + // "Author Name": ( + // "affiliation": "affil-1", + // "email": "author.name@example.com", // Optional + // "address": "Mail address", // Optional + // "name": "Alias Name" // Optional + // ) + // ) + authors: (), + + // A dictionary of affiliation. + // Dictionary keys are affiliations' labels. + // These labels show be constent with those used in authors' meta data. + // Dictionary values are addresses of every affiliation. + // + // Example: + // ( + // "affil-1": "Institution Name, University Name, Road, Post Code, Country" + // ) + affiliations: (), + + // The paper's abstract. + abstract: [], + + // The paper's keywords. + keywords: (), + + // The path to a bibliography file if you want to cite some external + // works. + bib: none, + bib-title: "References", + + // Word count + word-count: false, + + // Line numbers + line-numbers: false, + + // Paper's content + body +) = { + // Set document properties + set bibliography(title: bib-title) + + // Line numbers have not yet been implemented in a release version, but are coming soon + // https://github.com/typst/typst/issues/352 + // https://github.com/typst/typst/pull/4516 + //if line-numbers { + // set par.line(numbering: "1") + // show figure: set par.line(numbering: none) + //} + + set document(title: title, author: authors.keys()) + set page(numbering: "1", number-align: center) + set text(font: ("Linux Libertine", "STIX Two Text", "serif"), lang: "en") + show footnote.entry: it => [ + #set par(hanging-indent: 0.7em) + #set align(left) + #numbering(it.note.numbering, ..counter(footnote).at(it.note.location())) #it.note.body + ] + show figure.caption: emph + set table( + fill: (x, y) => { + if y == 0 {gray} + } + ) + show table.cell: it => { + if it.y == 0 { + strong(it) + } else { + it + } + } + + // Title block + align(center)[ + #block(text(size: 14pt, weight: "bold", title)) + + #v(1em) + + // Authors and affiliations + + // Restore affiliations' keys for looking up later + // to show superscript labels of affiliations for each author. + #let inst_keys = affiliations.keys() + + // Authors' block + #block([ + // Process the text for each author one by one + #for (ai, au) in authors.keys().enumerate() { + let au_meta = authors.at(au) + // Don't put comma before the first author + if ai != 0 { + text([, ]) + } + // Write auther's name + let au_name = if au_meta.keys().contains("name") {au_meta.name} else {au} + text([#au_name]) + + // Get labels of author's affiliation + let au_inst_id = au_meta.affiliation + let au_inst_primary = "" + // Test whether the author belongs to multiple affiliations + if type(au_inst_id) == "array" { + // If the author belongs to multiple affiliations, + // record the first affiliation as the primary affiliation, + au_inst_primary = affiliations.at(au_inst_id.first()) + // and convert each affiliation's label to index + let au_inst_index = au_inst_id.map(id => inst_keys.position(key => key == id) + 1) + // Output affiliation + super([#(au_inst_index.map(id => [#id]).join([,]))]) + } else if (type(au_inst_id) == "string") { + // If the author belongs to only one affiliation, + // set this as the primary affiliation + au_inst_primary = affiliations.at(au_inst_id) + // convert the affiliation's label to index + let au_inst_index = inst_keys.position(key => key == au_inst_id) + 1 + // Output affiliation + super([#au_inst_index]) + } + + // Corresponding author + if au_meta.keys().contains("corresponding") and (au_meta.corresponding == "true" or au_meta.corresponding == true) { + [#super[,]#footnote(numbering: "*")[ + Corresponding author. #au_name. Address: + #if not au_meta.keys().contains("address") or au_meta.address == "" { + [#au_inst_primary.] + } + #if au_meta.keys().contains("email") { + [Email: #link("mailto:" + au_meta.email.replace("\\", "")).] + } + ]] + } + + if au_meta.keys().contains("equal-contributor") and (au_meta.equal-contributor == "true" or au_meta.equal-contributor == true){ + if ai == 0 { + [#super[,]#footnote(numbering: "*")[Equal contributors.]] + } else { + [#super[,]#footnote(numbering: "*", )] + } + } + } + ]) + + #v(1em) + + // Affiliation block + #align(left)[#block([ + #set par(leading: 0.4em) + #for (ik, key) in inst_keys.enumerate() { + text(size: 0.8em, [#super([#(ik+1)]) #(affiliations.at(key))]) + linebreak() + } + ])] + ] + + if header-title == "true" { + header-title = title + } + + set page( + header: [ + #set text(8pt) + #align(right)[#header-title] + ], + ) + if word-count { + import "@preview/wordometer:0.1.2": word-count, total-words + show: word-count.with(exclude: (heading, table, figure.caption)) + } + + // Abstract and keyword block + if abstract != [] { + pagebreak() + + block([ + #if word-count { + import "@preview/wordometer:0.1.2": word-count, word-count-of, total-words + text(weight: "bold", [Word count: ]) + text([#word-count-of(exclude: (heading))[#abstract].words]) + } + #heading([Abstract]) + #abstract + + #if keywords.len() > 0 { + linebreak() + text(weight: "bold", [Key words: ]) + text([#keywords.join([; ]).]) + } + ]) + + v(1em) + } + + // Display contents + + pagebreak() + + show heading.where(level: 1): it => block(above: 1.5em, below: 1.5em)[ + #set pad(bottom: 2em, top: 1em) + #it.body + ] + + set par(first-line-indent: 0em) + + if word-count { + import "@preview/wordometer:0.1.2": word-count, word-count-of, total-words + text(weight: "bold", [Word count: ]) + text([#word-count-of(exclude: (heading, table, figure.caption))[#body].words]) + } + + body + +} + + // title: "Title", + // header-title: "Header Title", + // authors: ( + // "Author 1": ( + // "affiliation": ("affil-1", "affil-2"), + // "email": "a1-email", + // ), + // "Author 2": ( + // "affiliation": ("affil-1", "affil-3"), + // "email": "a2-email", + // ), + // ), + // affiliations: ( + // "affil-1": "Affiliation 1", + // "affil-2": "Affiliation 2", + // "affil-3": "Affiliation 3", + // ), + // abstract: [ + // == Background + // Abstract Background + // + // == Methods + // Abstract Methods + // + // == Result + // Abstract Results + // + // == Conclusions + // Abstract Conclusions + // ], + // keywords: (), + // bib: "refs.bib", + // bib-title: "Refs", + // word-count: false, + // line-numbers: false, + +#show: body => article( + title: "Long Manuscript Title", + header-title: "Header Title", + authors: ( + "Author 1": ( + affiliation: ("affil-1", "affil-2"), + corresponding: "true", + equal-contributor: "true", + email: "a1-email", + ), "Author 2": ( + affiliation: ("affil-1", "affil-3"), + + equal-contributor: "true", + + ), ), + affiliations: ( + "affil-1": "Affiliation 1", + "affil-2": "Affiliation 2", + "affil-3": "Affiliation 3" ), + bib: "refs.bib", + bib-title: "Bibliography", + abstract: [== Background + +Abstract Background + +== Methods + +Abstract Methods + +== Results + +Abstract Results + +== Conclusions + +Abstract Conclusions + +], + word-count: true, + body, +) + + += Background + +You can cite using `[@citation]` e.g., @netwok2020. + +You can include raw typst as below + +````md +#| echo: true +#| include: false +```{=typst} +#set math.equation(numbering: "1") +#let boldred(x) = text(fill: rgb("#8B0000"), $bold(#x)$) + +$ +rho mat( + beta_(H H), beta_(H M), beta_(H L) ; + beta_(M H), beta_(H M), beta_(M L) ; + beta_(L H), beta_(H M), beta_(L L) ; +) +$ +``` +```` + +#set math.equation(numbering: "1") +#let boldred(x) = text(fill: rgb("#8B0000"), $bold(#x)$) + +$ +rho mat( + beta_(H H), beta_(H M), beta_(H L) ; + beta_(M H), beta_(H M), beta_(M L) ; + beta_(L H), beta_(H M), beta_(L L) ; +) +$ +You can insert images and cross-reference them using Markdown syntax `![An image of an elephant](elephant.png){#fig-elephant}`. + +#quote(block: true)[ +#strong[Note:] you need to use `-` to separate words in the figure tables. Trying to use `_` will result in an error as Quarto will search your bib file for a reference. +] + +#figure([ +#box(image("./elephant.png")) +], caption: figure.caption( +position: bottom, +[ +An image of an elephant +]), +kind: "quarto-float-fig", +supplement: "Figure", +) + + + +And this is a reference to the @fig-elephant using `@fig-elephant`. + +You can insert page breaks using Quarto shortcode syntax `{{< shortcode >}}`, where `shortcode` is `pagebreak` + +#pagebreak() +== Lorem + +Nulla eget cursus ipsum. Vivamus porttitor leo diam, sed volutpat lectus facilisis sit amet. Maecenas et pulvinar metus. Ut at dignissim tellus. In in tincidunt elit. Etiam vulputate lobortis arcu, vel faucibus leo lobortis ac. Aliquam erat volutpat. In interdum orci ac est euismod euismod. Nunc eleifend tristique risus, at lacinia odio commodo in. Sed aliquet ligula odio, sed tempor neque ultricies sit amet. + +Etiam quis tortor luctus, pellentesque ante a, finibus dolor. Phasellus in nibh et magna pulvinar malesuada. Ut nisl ex, sagittis at sollicitudin et, sollicitudin id nunc. In id porta urna. Proin porta dolor dolor, vel dapibus nisi lacinia in. Pellentesque ante mauris, ornare non euismod a, fermentum ut sapien. Proin sed vehicula enim. Aliquam tortor odio, vestibulum vitae odio in, tempor molestie justo. Praesent maximus lacus nec leo maximus blandit. + +#pagebreak() += Acknowledgements + +== Author Contributions + +#emph[Conceptualization:] + +#emph[Data curation:] + +#emph[Formal analysis:] + +#emph[Funding acquisition:] + +#emph[Investigation:] + +#emph[Methodology:] + +#emph[Project administration:] + +#emph[Software:] + +#emph[Supervision:] + +#emph[Validation:] + +#emph[Visualization:] + +#emph[Writing - original draft:] + +#emph[Writing - review and editing:] + +== Conflicts of Interest and Financial Disclosures + +== Data Access, Responsibility, and Analysis + +== Data Availability + +== Collaborators + +#pagebreak() +#block[ +] + + + +#set bibliography(style: "springer-vancouver") + +#bibliography("refs.bib") +