@@ -8708,9 +8708,9 @@ UTF-8 in @LaTeX{} is quite low.
87088708@node Bibliographic citations and references
87098709@section Bibliographic citations and references
87108710
8711- For R at least 4.6.0 one can auto-generate bibliographic citations and
8711+ For @R{} at least 4.6.0 one can auto-generate bibliographic citations and
87128712references from bibentries in bibliographic databases in R or Bib@TeX{}
8713- formats. This is implemented via build stage @code{\Sexpr} macros
8713+ formats. This is implemented via build- stage @code{\Sexpr} macros
87148714(@pxref{Dynamic pages}) in the file @file{share/Rd/macros/system.Rd} of
87158715the @R{} source or home directory. For @HTML{} output, the citations
87168716are conveniently hyperlinked to the corresponding references.
@@ -8719,24 +8719,25 @@ Textual and parenthetical citations are obtained via, respectively,
87198719@code{\bibcitet} and @code{\bibcitep} (the naming follows that of
87208720@code{\citet} and @code{\citep} in the @LaTeX{} @code{natbib} package
87218721(@uref{https://mirrors.ctan.org/macros/latex/contrib/natbib, Daly
8722- 2010}). These macros both take a comma separated @var{citespec} list as
8723- argument, where a @var{citespec} can be a @var{keyspec} or of the form
8722+ 2010}). These single-argument macros both take either a comma- separated
8723+ list of one or more @var{keyspec}s or a single @var{citespec} of the form
87248724@code{@var{before}|@var{keyspec}|@var{after}} with both @samp{|}
87258725mandatory and @var{before} and @var{after} possibly empty text to be
8726- inserted before and after the citation if not empty. If these texts
8727- contain commas, these can be backslash-escaped: see the examples below.
8726+ inserted before and after the citation if not empty.
87288727
87298728A @var{keyspec} is either a simple @var{key} or of the form
8730- @code{@var{pkg}::@var{key}}. In the former case, @var{key} is taken as
8731- the key of a bibentry in R's system bibentry data base (available via
8732- the currently unexported @code{tools:::R_bibentries()} with sources in
8733- the @file{.R} files in the @file{share/bibentries} directory of the R
8734- sources). In the latter case, @var{key} is looked up in the bibentry
8729+ @code{@var{pkg}::@var{key}}.
8730+ In the latter case, @var{key} is looked up in the bibentry
87358731data base of package @var{pkg}, made available in the packages sources
87368732either as @file{inst/REFERENCES.R} in R format (an R code file encoded
87378733in UTF-8 with calls to @code{bibentry()}, as for the
87388734@file{inst/CITATION} file) or as @file{inst/REFERENCES.bib} in Bib@TeX{}
87398735format (this needs @CRANpkg{bibtex} to be installed).
8736+ A simple @var{key} without a @var{pkg} prefix is taken as the key of a
8737+ ``local'' bibentry (from the package containing the Rd file) or of R's
8738+ system bibentry data base (available via the currently unexported
8739+ @code{tools:::R_bibentries()}, with sources in R's
8740+ @file{share/bibliographies} directory).
87408741
87418742References (usually in the @code{\references} section) are obtained via
87428743@code{\bibshow}, which takes a comma-separated @var{keyspec} list as
@@ -8761,11 +8762,11 @@ For example,
87618762gives a textual citation of the ``@emph{Blue Book}''
87628763(`@I{Becker, Chambers, and Wilks (1988)}' when first encountered),
87638764@example
8764- \bibcitep@{e.g.\, |R:Chambers+Hastie:1992|page 123@}
8765+ \bibcitep@{|R:Chambers+Hastie:1992|page 123@}
87658766@end example
87668767@noindent
87678768gives a parenthetical citation of a page in the ``@emph{White Book}''
8768- (`@I{(e.g., Chambers and Hastie 1992, page 123)}' when first encountered).
8769+ (`@I{(Chambers and Hastie 1992, page 123)}' when first encountered).
87698770An Rd file having cited the above two and also wanting to include the
87708771``@emph{Green Book}'' in its references could use
87718772@example
@@ -8802,7 +8803,7 @@ disambiguate by manually adding the suffixes to the year fields, e.g.
88028803
88038804As these macros are evaluated at build stage, packages using these and
88048805built with R >= 4.6.0 can be used without problems for R < 4.6.0.
8805- (However, checking such packages with R < 4.6.0 will warn that these
8806+ (However, checking such packages with R < 4.5.3 will warn that these
88068807macros are unknown.)
88078808
88088809@node Processing documentation files
0 commit comments