User:Kim/Prototyping 2nd year/GitPub Cite: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
Line 17: Line 17:


# specific terms (e.g. 'id', 'categories', 'note', 'language') these are predefined in the fixed vocabulary of csl
# specific terms (e.g. 'id', 'categories', 'note', 'language') these are predefined in the fixed vocabulary of csl
# csl required term: 'type'
# which relate to specified object types (e.g. id = string or number, categories = array of string)
# which relate to specified object types (e.g. id = string or number, categories = array of string)
# cant have too nested structure but must follow object types above
# cant have too nested structure but must follow object types above


examples of bibliographies [https://github.com/jgm/pandoc/issues/8366 yaml/json] and [https://gist.github.com/bwiernik/9343f1188127799baff0fbeedcde5217 yaml] for formatting.
examples of bibliographies [https://github.com/jgm/pandoc/issues/8366 yaml/json] and [https://gist.github.com/bwiernik/9343f1188127799baff0fbeedcde5217 yaml] for formatting.
yaml metadata example:
---
references:
- id: 0ed2ae3
  type: dataset
  status: 2026-01-28
  publisher: Kim Kleinert
  note: >-
    small changes and tests csl nothing chnaged so far, rendering metadata references the correct id and outputs status content
  locator:
- id: 7812e56
  type: dataset
  status: 2026-01-27
  publisher: Kim Kleinert
  note: >-
    metadata taxonomy change pomerantz to gartner
  locator:  (origin/main, main)
bibliography: ['./references.bib', 'chapter_1.yaml']
supress-bibliography: true
csl: harvard-meta.csl
---


==CSL==
==CSL==

Revision as of 09:47, 29 January 2026

Objective

inline cite my own metadata

  1. metadata record formatted as yaml bibliography
  2. custom csl (defining inline citation style)
  3. pandoc citeproc for rendering

regular citation using .bib file works like this [@coombs1987] and is then rendered (pandoc) into the format defined in csl (Coombs, DeRose and Renear, 1987). see VS Codium - Zotero - BibTex

GitPub cite now enables to inline reference a commit hash [@7ddda5e] which will then be rendered into the metadata it refers to (7ddda5e - commit message - date).

to make this work, two main steps had to be taken:

Yaml Metadata

Git log output (metadata) formatted as yaml bibliogrpahy.

in order to be legible for CSL, yaml has to comply to: (documented in this list)

  1. specific terms (e.g. 'id', 'categories', 'note', 'language') these are predefined in the fixed vocabulary of csl
  2. csl required term: 'type'
  3. which relate to specified object types (e.g. id = string or number, categories = array of string)
  4. cant have too nested structure but must follow object types above

examples of bibliographies yaml/json and yaml for formatting.

yaml metadata example:

---
references:
- id: 0ed2ae3
  type: dataset
  status: 2026-01-28
  publisher: Kim Kleinert
  note: >-
    small changes and tests csl nothing chnaged so far, rendering metadata references the correct id and outputs status content
  locator: 
- id: 7812e56
  type: dataset
  status: 2026-01-27
  publisher: Kim Kleinert
  note: >-
    metadata taxonomy change pomerantz to gartner
  locator:  (origin/main, main)
bibliography: ['./references.bib', 'chapter_1.yaml']
supress-bibliography: true
csl: harvard-meta.csl
---

CSL

Citation Style Language

is an xml based markup language for formatting references, bibliographies and inline citations using standard citation styles such as APA, Harvard etc.

CSL is divided in dependent (linked/ based on an independent style, usually linked in the head, less metadata needs to be defined bc the actual citation formatting is only linked to) and independent (defines citation format, relies on locale files specifying languages dates, terms and grammar) styles.

resources