|
1 |
| -citHeader("To cite the 'bookdown' package in publications use:") |
2 |
| - |
3 | 1 | year = sub('.*(2[[:digit:]]{3})-.*', '\\1', meta$Date, perl = TRUE)
|
4 | 2 | vers = paste('R package version', meta$Version)
|
| 3 | +if (length(year) == 0) year = format(Sys.Date(), '%Y') |
5 | 4 |
|
6 |
| -citEntry( |
7 |
| - entry = 'manual', |
| 5 | +bibentry( |
| 6 | + 'manual', |
8 | 7 | title = paste('bookdown:', meta$Title),
|
9 | 8 | author = Filter(function(p) 'aut' %in% p$role, as.person(meta$Author)),
|
10 | 9 | year = year,
|
11 | 10 | note = vers,
|
12 |
| - url = strsplit(meta$URL, ',')[[1]][1], |
13 |
| - textVersion = paste('Yihui Xie (', year, '). bookdown: ', meta$Title, '. ', vers, '.', sep = '') |
| 11 | + url = strsplit(meta$URL, ',')[[1]][1] |
14 | 12 | )
|
15 | 13 |
|
16 |
| -citEntry( |
17 |
| - entry = 'book', |
| 14 | +bibentry( |
| 15 | + 'book', |
18 | 16 | title = 'bookdown: Authoring Books and Technical Documents with {R} Markdown',
|
19 | 17 | author = 'Yihui Xie',
|
20 | 18 | publisher = 'Chapman and Hall/CRC',
|
21 | 19 | address = 'Boca Raton, Florida',
|
22 | 20 | year = '2016',
|
23 | 21 | note = 'ISBN 978-1138700109',
|
24 |
| - url = 'https://bookdown.org/yihui/bookdown', |
25 |
| - textVersion = paste( |
26 |
| - 'Yihui Xie (2016).', |
27 |
| - 'bookdown: Authoring Books and Technical Documents with R Markdown.', |
28 |
| - 'Chapman and Hall/CRC. ISBN 978-1138700109' |
29 |
| - ) |
| 22 | + url = 'https://bookdown.org/yihui/bookdown' |
30 | 23 | )
|
0 commit comments