-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gitbook split_by : "section+number" works no more #1369
Comments
Thanks for the report and for the reproducible example. I believe the issue comes from this line Line 416 in d4e71eb
The title extracted that should be used to create the filenames will be like this
Using > basename(with_ext(nms, ".html"))
[1] "index.html" "1-first-chapter.html"
[3] "1.html" "1.html"
[5] "1.html" "2-second-chapter.html"
[7] "2.html" "2.html"
[9] "2.html" This is because the name doesn't have another extension and so it replaces anything after the period. @yihui Maybe it is pandoc who have change the numbering with a I think we could just replace the Thoughts ? |
I still get the same result with Pandoc 2.7.3 which seems old enough.
I am not quite sure to see what maybe have cause this issue to arise at this timing. Strange. |
Thanks for addressing this problem. I have been experimenting and I think the problem is in package xfun. The HTML is correctly split by section and number with xfun versions 0.31 and below, but not with xfun version 0.32. Hope this helps.
|
@WdeNooy can you confirm to us the name of the HTML files inside the output folder please ? |
I think this is caused by a change in xfun: yihui/xfun@49a9c7e I'll see what I can do. |
I can confirm that xfun 0.31 handles those
Too bad we have some tests, but not for this situation bookdown/tests/testit/test-utils.R Lines 10 to 23 in b428ade
That is why we missed before 0.32 release |
Yes, the HTML files have the correct names.
Kind regards,
Wouter.
|
Should be fixed in the dev version of xfun now: remotes::install_github('yihui/xfun') Thanks! |
The new version of xfun is on CRAN now. Its Windows binary package may take one or two more days to be available there. |
Christophe Dervieux (1): Use ubuntu-latest on GHA (#69) Yihui Xie (4): deprecate stringsAsStrings() fix rstudio/bookdown#1369: revert 49a9c7ec79879ce26891e6dace662c771efbc5cb and provide another way for users to specify which extra characters are allowed in filename extensions (#68) create an empty `recheck` file instead of writing placeholder text into it, because the latter will cause rev_check() to skip all rev deps, e.g., mitchelloharawild/crandalf@91169cd CRAN release 0.33
# CHANGES IN xfun VERSION 0.35 - Added a new argument `token` to `protect_math()` to optionally include a token around math expressions. - `base64_uri()` relies less on the **mime** package now. For some common file extensions (e.g., `.jpg`/`.png`), this function knows their MIME types. - `stringsAsStrings()` has been removed from this package. # CHANGES IN xfun VERSION 0.34 - Added a new function `alnum_id()` to generate ID strings from a character vector. - The function `stringsAsStrings()` has been deprecated. # CHANGES IN xfun VERSION 0.33 - Reverted the change for #68: the characters `-+!_#` are no longer accepted by default in filename extensions, since they are relatively rare and caused a breakage in rstudio/bookdown#1369. If you wish to allow for these characters, you may use the new `extra` argument in `file_ext()` and related functions, e.g., `xfun::file_ext(x, extra = '-+!_#')`. - The function `stringsAsStrings()` will be deprecated in a future release of **xfun**, because the global option `stringsAsFactors = FALSE` has become the default in base R since 4.0.0. # CHANGES IN xfun VERSION 0.32 - Added a function `shrink_images()` to shrink images to a maximum width using the **magick** package (thanks, @apreshill, rstudio/blogdown#614). - Added a function `tinify_dir()` as a wrapper of `tinify()` to compress images under a directory. - `file_ext()` supports more file extensions now, such as `.c++`, `.FB2K-COMPONENT`, and so on (thanks, @tentacles-from-outer-space, #68). - Fixed the issue that `xfun::base_pkgs()` could hang R (thanks, @mmaechler, #66). - The `...` argument in `dir_create()` was not passed to `dir.create()`.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary. |
If a multiple-chapter book is built into a gitbook with option
split_by : "section+number"
, no separate HTML files are produced for sections. Warning message(s):In contrast, the options
split_by : "section"
andsplit_by : "chapter+number"
work fine.The problem has arisen between mid July and mid August. I rolled back packages 'bookdown', 'rmarkdown', and 'tinytex' to previous versions (0.25, 2.13, 0.38 respectively), which are versions on another computer that renders a gitbook with option
split_by : "section+number"
correctly. However, rolling back these packages did not remedy the problem. Apparently, the problem is situated in another package.A test set can be found in the attached zip file (containing 3 Rmd files): RenderProblems.zip
My session info:
The text was updated successfully, but these errors were encountered: