This function is used to access and set package options for RefManageR, similar to options
.
The options are listed in the details
BibOptions(..., restore.defaults = FALSE)
if a vector of option names is supplied, the current value of the requested options, or if ...
is missing,
all current option values; otherwise, when setting options the old values of the changed options are (invisibly)
returned as a list.
a character vector or strings specifying option names to access; or to set options values, a named list or vector of option values or options specified in name=value pairs.
logical; if TRUE, ...
's are ignored and all package options are restored to their
defaults.
The following are valid package options.
Options for searching/indexing a BibEntry object. See [.BibEntry
and
[<-.BibEntry
match.author
- string; controls how name list fields (author, editor, translator, etc.) are matched
when searching for names.
“family.with.initials” require family names and given name initials to match, “exact” requires names to match
exactly, and any other value results in only family names being compared (the default).
match.date
- string; controls how date fields are matched when searching. If “year.only” (the default),
only years are checked for equality when comparing dates, otherwise months and days will also be compared,
if they are available.
use.regex
- logical; if TRUE
, regular expressions are used when searching non-date fields; otherwise, exact
matching is used.
ignore.case
- logical; if TRUE
, case is ignored when searching.
return.ind
- logical; if TRUE
the return value of SearchBib
and the operators
[.BibEntry
, will be the indices of any matches; otherwise, a BibEntry
object is returned.
Options for Printing with print.BibEntry
and PrintBibliography
bib.style
- string; Biblatex bibliography style to use when printing and formatting a BibEntry object. Possible
values are “numeric” (default), “authoryear”, “authortitle”, “alphabetic”, “draft”.
first.inits
- logical; if TRUE
, only given name initials are displayed when printing; otherwise, full names
are used.
dashed
- logical; if TRUE
and bib.style = "authoryear"
or bib.style = "authortitle"
,
recurring author and editor names are replaced with “---” when printing.
sorting
- string; controls how BibEntry objects are sorted. Possible values are “nty”, “nyt”,
“nyvt”, “anyt”, “anyvt”, “ynt”, “ydnt”, “none”, “debug”; see
sort.BibEntry
max.names
- numeric; maximum number of names to display before using
“et al.” when formatting and printing name list fields. This is also the minimum
number of names that will be displayed if “et al.” is used (corresponding
to the ‘minnames’ package option in Biblatex). See below and option
longnamesfirst
when using this argument with the citation
functions (Citet
, etc.).
no.print.fields
character vector; fields that should not be printed,
e.g., doi, url, isbn, etc.
style
- character string naming the printing style. Possible values are
plain text (style “text”), BibTeX (“Bibtex”), BibLaTeX (“Biblatex”),
a mixture of plain text and BibTeX as
traditionally used for citations (“citation”), HTML (“html”),
LaTeX (“latex”), “markdown”, “yaml”,
R code (“R”), and a simple copy of the textVersion elements
(style “textVersion”, see BibEntry
)
Options for the Cite
functions
cite.style
- character string; bibliography style to use to generate citations.
style
- as above, but used to format the citations.
hyperlink
- character string or logical; for use with style = "markdown"
and style = "html"
(ignored otherwise). If FALSE
, no hyperlink
will be generated for the citation or in the bibliography when printing. If
set equal to "to.bib"
, then hyperlinks will be
generated linking the citation and bibliography. The default value, "to.doc"
,
will try to create the hyperlink using the url
, doi
, or eprint
fields of
entry. If these fields are not available, the hyperlink will point to the bibliography. See
also open.BibEntry
.
super
- logical; should superscripts be used for numeric citations? Ignored if
cite.style != "numeric"
.
max.names
- numeric; same as above, except for citations. Note, that the
first time a reference is cited, this option will be ignored if longfirstnames
is TRUE
.
longnamesfirst
logical; should the first time a citation appears in the text
not be truncated at max.names
?
bibpunct
- character vector; punctuation to use in a citation. The entries
in bibpunct
are as follows
The left delimiter for non-alphabetic and non-numeric citation styles
The right delimiter for non-alphabetic and non-numeric citation styles
The left delimiter for alphabetic and numeric citation styles
The right delimiter for alphabetic and numeric citation styles
The separator between references in a citation.
Punctuation to go between the author and year.
Other
check.entries
- string or FALSE
; if FALSE
entries are not checked to ensure that they have all the
required fields for the type of entry; if “warn” then entries are checked, but only a warning is issued and the
entry is processed anyway; otherwise an error is produced if an entry does not have the required fields (default). Note that
the majority of fields listed as required for a particular entry type in the Biblatex manual are not actually required for
Biblatex to produce an entry.
merge.fields.to.check
- character vector; for merge.BibEntry
and the operator +.BibEntry
,
the fields that should be checked when comparing entries for equality when merging BibEntry objects. Specifying
“all” results in all fields be checked with duplicated
. The default is “key” to only check for
duplicated keys.
print.BibEntry
, BibEntry
, options
BibOptions()
BibOptions("first.inits", "bib.style")
oldopts <- BibOptions(first.inits = FALSE, bib.style = "authoryear")
oldopts
BibOptions(oldopts)
BibOptions(restore.defaults = TRUE)
Run the code above in your browser using DataLab