Skip to contents

We probably just want to use xct_keys_to_inline() or xct_keys_to_inline_table_col()but this will This function requires the RefManageR package. If it is not installed, you can install it with install.packages("RefManageR").

Usage

xct_keys_to_xref(
  citation_keys,
  path_bib,
  key_abort_on_missing = TRUE,
  key_check_response = "warn"
)

Arguments

citation_keys

A character vector of citation keys.

path_bib

Path to the .bib bibliography file.

key_abort_on_missing

Logical. If TRUE, aborts on missing citation keys.

key_check_response

Response level for missing fields in bib entries. Default is "warn". Passed to ReadBib in the RefManageR package

Value

A data frame with citation keys in one column and their formatted inline references in another.

Details

This function takes citation keys passed as a list and generates inline APA-style references for each item of the list.

Examples

if (FALSE) { # \dontrun{
path_bib <- "path/to/references.bib"
citation_keys <- c("@smith2000", "[@smith2001; @doe2005]")
xct_keys_to_xref(citation_keys, path_bib)
} # }