メインコンテンツにスキップ

Get a CSL item’s pinned citekey, however it is pinned

R/keys.R

cz_item_key

Description

Checks the native citation-key property first, then falls back to a Citation Key: line in note.

Usage

cz_item_key(item)

Arguments

Arguments Description
item A single CSL-JSON item (a list).

Value

The citekey, or NA_character_.

Examples

cz_item_key(list(`citation-key` = "Darwin1859"))
[1] "Darwin1859"
cz_item_key(list(note = "Citation Key: Darwin1859"))
[1] "Darwin1859"
cz_item_key(list(title = "No key pinned"))
[1] NA