Citações e referências
Cite com [@key]. As fontes vêm de um arquivo BibTeX, de elementos Source, ou de ambos:
<KScript.Document template="paper" title="Cited" to="'cited.pdf'">
<Paragraph>Life is universal [@berlekamp1982; @rendell2002].</Paragraph>
<Bibliography path="refs.bib">
<Source id="rendell2002" type="inproceedings" author="Paul Rendell" title="Turing Universality of the Game of Life" booktitle="Collision-Based Computing" year="2002" />
</Bibliography>
</KScript.Document>import KScript.Document
Document(template: paper, title: 'Cited', to: 'cited.pdf') {
Paragraph "Life is universal [@berlekamp1982; @rendell2002]."
Bibliography(path: 'refs.bib') {
Source(id: 'rendell2002', type: 'inproceedings', author: 'Paul Rendell', title: 'Turing Universality of the Game of Life', booktitle: "Collision-Based Computing", year: 2002)
}
}Somente as fontes citadas são listadas. Com citations: numeric (o padrão), elas são numeradas na ordem em que são citadas pela primeira vez, como [1]. Com citations: author-year, aparecem como (Berlekamp et al., 1982) e a lista é ordenada por autor. Um Source aceita qualquer campo do BibTeX como atributo; author separa as pessoas com and. Se você citar fontes, mas omitir Bibliography, as referências são colocadas no final.
Uma citação ou referência cruzada para um id que não existe é um erro, assim como o mesmo id usado duas vezes. Um id: é texto como qualquer outro, então um loop pode criar um para cada item: Section(title: $chapter.title, id: "ch-{ $chapter.number }").