Citas y referencias
Cita con [@key]. Las fuentes proceden de un archivo BibTeX, de elementos Source, o 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)
}
}Solo se enumeran las fuentes citadas. Con citations: numeric (el valor predeterminado) se numeran en el orden en que se citan por primera vez, como [1]. Con citations: author-year aparecen como (Berlekamp et al., 1982) y la lista se ordena por autor. Un Source acepta cualquier campo de BibTeX como atributo; author separa a las personas con and. Si citas fuentes pero omites Bibliography, las referencias se colocan al final.
Una cita o referencia cruzada a un id que no existe es un error, al igual que usar el mismo id dos veces. Un id: es texto como cualquier otro, así que un bucle puede generar uno para cada elemento: Section(title: $chapter.title, id: "ch-{ $chapter.number }").