个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证Extra functions for dealing with citation keys, inline citations and references
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗
This package focuses solely on “extra” functions related to citeing
bibliography items such as processing .bib files to get citation keys,
processing BiBtex keys to get inline citations, etc. We are calling it
“extra” because we rely heavily on
rbbt and standard
rmarkdown::render magic to almost everything we need to do. Some
functions for rendering citation keys as inline references wrap calls to
pandoc so that needs to be installed. If you have Rstudion you likely
have it already.
This package deals with a few problems as follows:
NewGraphEnvironment.bib file representing our shared library. Can be
found here
path_bib <- system.file("extdata", "NewGraphEnvironment.bib", package = "xciter")You can install the development version of xciter from GitHub with:
# install.packages("devtools")
pak::pkg_install("NewGraphEnvironment/xciter")
This is a basic example of subbing citation keys for inline references within a table so that it can be rendered as is after the changes are made:
library(xciter)
## basic example code
path_bib <- system.file("extdata", "NewGraphEnvironment.bib", package = "xciter")
dat <- data.frame(
id = 1:3,
bib_keys = c(
"Outside block quotes @busch_etal2011LandscapeLevelModela and in [@woll_etal2017SalmonEcological]",
"This is many [@busch_etal2011LandscapeLevelModela; @woll_etal2017SalmonEcological; @kirsch_etal2014Fishinventorya]",
"this is a failed key @key3"
)
)
result <- xct_keys_to_inline_table_col(dat, col_format = "bib_keys", path_bib = path_bib)
print(result)
#> id
#> 1 1
#> 2 2
#> 3 3
#> bib_keys
#> 1 Outside block quotes Busch et al. (2011) and in (Woll, Albert, and Whited 2017)
#> 2 This is many (Busch et al. 2011; Woll, Albert, and Whited 2017; Kirsch, Buckwalter, and Reed 2014)
#> 3 this is a failed key (key3?)
This is a basic example of checking if the citation keys within a
bookdown document are found within a specified .bib file.
key_missing <- xct_bib_keys_missing(path_bib, "kirsch_etal2014Fishinventory")
#> ! The following citations were not found in the BibTeX file:
#> [1] "kirsch_etal2014Fishinventory"
This is an example of how to search for the closest match for an unmatched key.
xct_keys_guess_match(key_missing, keys_bib = xct_bib_keys_extract(path_bib))
#> key_missing key_missing_guess_match
#> 1 kirsch_etal2014Fishinventory kirsch_etal2014Fishinventorya