Reputation: 651
If I have the same subsection titles in different chapters (the problem onlæy occurs if have a Rmd file for each chapter), then following the link in the menu goes to the first subsection.
I have tried to make a small reprex at https://github.com/relund/bookdown-reprex. The error only occurs when you have multiple files.
xfun::session_info('bookdown')
R version 3.6.3 (2020-02-29)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 17134), RStudio 1.3.959
Locale:
LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
LC_NUMERIC=C LC_TIME=English_United States.1252
Package version:
base64enc_0.1.3 bookdown_0.20 digest_0.6.25 evaluate_0.14 glue_1.4.2 graphics_3.6.3 grDevices_3.6.3 highr_0.8 htmltools_0.5.0
jsonlite_1.7.1 knitr_1.29 magrittr_1.5 markdown_1.1 methods_3.6.3 mime_0.9 rlang_0.4.7 rmarkdown_2.3 stats_3.6.3
stringi_1.4.6 stringr_1.4.0 tinytex_0.25 tools_3.6.3 utils_3.6.3 xfun_0.16 yaml_2.2.1
Upvotes: 1
Views: 49
Reputation: 30114
This issue has been fixed in bookdown v0.21 (which was just released to CRAN). You can update or reinstall bookdown from CRAN:
install.packages('bookdown')
# or
update.packages(ask = FALSE, checkBuilt = TRUE)
Upvotes: 1