bot
September 18, 2020, 5:38am
1
Hello,
If I have two chapters (2 RMD files) but within the 2 RMD files, I have sub titles (## something) that are the same. When I knit the book, when I click on the subchapter within the second RMD file, it takes me to the subchapter in the first RMD file.
Is this typical behavior? Do I need to name each subtitle differently? The 2 RMD files have different chapter headings.
cderv
September 18, 2020, 7:38am
2
Hi,
which version of the packages do you have ? I remember a similar issue that has been fixed now in dev version
# CHANGES IN bookdown VERSION 0.21
## NEW FEATURES
- Add the `number_sections` argument to `markdown_document2()` and its family. This allows to have now figure references numbered by chapters in these formats, like `word_document2()` or `odt_document2()` for example. This argument default to `TRUE` like `html_document2()` and `pdf_document2()`. Set it to `number_sections = FALSE` to get the same output as previous version without numbered chapters (thanks, @atusy, #756).
## BUG FIXES
- Correctly encode the document title when creating the twitter sharing link from a bookdown chapter (thanks, @maelle, #934).
- Make sure `search_index.json` contains valid characters for the JSON format (thanks, @wlandau, #913).
## MAJOR CHANGES
- The `--file-scope` behavior introduced in bookdown v0.20 is now disabled by default. This is due to broken TOC links for duplicate section names (e.g., "Exercises"; see #909) that have automatically generated identifiers.
- The `clean_envir` argument of `bookdown::render_book()` has been deprecated and will be removed in the future (thanks, @jenslaufer, #932).
# CHANGES IN bookdown VERSION 0.20
This file has been truncated. show original
You need to either install previous CRAN version (using remotes::install_version
) or install current dev version (using remotes::install_github()
)
You could also avoid this type of issue by defining manually your header identifier when you have duplicates using this syntax
## Custom title {#custom-title}
## Custom title {#other-custom-title}
See https://bookdown.org/yihui/bookdown/cross-references.html
system
Closed
October 9, 2020, 7:38am
3
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.