Skip to content
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

Unnumbered didn't work properly #1456

Closed
sonv opened this issue Feb 24, 2024 · 9 comments
Closed

Unnumbered didn't work properly #1456

sonv opened this issue Feb 24, 2024 · 9 comments
Labels
bug an unexpected problem or unintended behavior pandoc concerns upstream pandoc

Comments

@sonv
Copy link

sonv commented Feb 24, 2024

Hi,

I'm not sure what happened but this morning when I rendered the HTML version of my notes, the numbering of the chapters didn't work properly.

Screenshot 2024-02-24 at 16 51 27

Specifically, the chapter counter seems to keep increasing even though I marked the chapter unnumbered (please see picture). Could someone explain this to me?

Here's my xfun::session_info('rmarkdown'):

Screenshot 2024-02-25 at 08 18 52

My _output.yml is:

Screenshot 2024-02-25 at 08 35 21

I attach here my bookdown folder.
MATH310.zip

I'm not sure what's going on. A week ago things were still fine. My PDF output has the correct numbering.

Thank you!

@yihui
Copy link
Member

yihui commented Feb 24, 2024

Could you read and follow the issue guide to provide all the required information when filing a bug report? Otherwise it is usually hard for us to help you. At a bare minimum, we need to know your package versions: xfun::session_info(c('bookdown', 'rmarkdown')). Thanks!

@sonv
Copy link
Author

sonv commented Feb 25, 2024

Hi, I apologize for my mistake. I've updated the bug report according to the issue guide. Thank you very much for your patience.

@cderv
Copy link
Collaborator

cderv commented Feb 26, 2024

A week ago things were still fine

🤔 This could be related to Pandoc's update as I see you are using 3.1.12.1 which is quite recent. Did you update Pandoc, or any tools providing pandoc (RStudio IDE ? Quarto ? )

They did some changes on chapter numbering and this possibly messing this up. I still need to assess all the impact

but it could also be another change. I'll try to reproduce and check different pandoc versions with the project you provided as zip

@cderv cderv added the bug an unexpected problem or unintended behavior label Feb 26, 2024
@cderv
Copy link
Collaborator

cderv commented Feb 26, 2024

This could be related to Pandoc's update as I see you are using 3.1.12.1 which is quite recent.

I can confirm this:

  • Using Pandoc 3.1.11.1 with your project ends up with the expected rendering
  • Using Pandoc 3.1.12 with your project messes up the numbering.

So as a workaround, you need to use a different Pandoc version with your project for now. We'll definitely fix this for next bookdown version.

To use a different Pandoc version, you can do that with rmarkdown and a version you install yourself (https://bookdown.org/yihui/rmarkdown-cookbook/install-pandoc.html) or you can leverage the pandoc package that I use for debugging (https://cderv.github.io/pandoc/à which has way to install pandoc versions in a dedicated folder and a function (pandoc_activate()) to set up a pandoc version for use with rmarkdown in a R session.

Hope it helps We'll update here soon

@cderv cderv added the pandoc concerns upstream pandoc label Feb 26, 2024
@sonv
Copy link
Author

sonv commented Feb 26, 2024

This could be related to Pandoc's update as I see you are using 3.1.12.1 which is quite recent.

I can confirm this:

  • Using Pandoc 3.1.11.1 with your project ends up with the expected rendering
  • Using Pandoc 3.1.12 with your project messes up the numbering.

Yes, I updated pandoc recently.

So as a workaround, you need to use a different Pandoc version with your project for now. We'll definitely fix this for next bookdown version.

To use a different Pandoc version, you can do that with rmarkdown and a version you install yourself (https://bookdown.org/yihui/rmarkdown-cookbook/install-pandoc.html) or you can leverage the pandoc package that I use for debugging (https://cderv.github.io/pandoc/à which has way to install pandoc versions in a dedicated folder and a function (pandoc_activate()) to set up a pandoc version for use with rmarkdown in a R session.

Hope it helps We'll update here soon

Thank you very much! You're awesome!

Best regards,

@cderv
Copy link
Collaborator

cderv commented Feb 27, 2024

To update here also, this is a bug in Pandoc

So this will be fixed with a new version of Pandoc.

@cderv
Copy link
Collaborator

cderv commented Feb 29, 2024

This is fixed in Pandoc development version. Next pandoc version will solve this. I'll close this when it will be out.

@cderv cderv moved this from Backlog to Todo In Progress in R Markdown Team Projects Feb 29, 2024
@cderv
Copy link
Collaborator

cderv commented Mar 1, 2024

Pandoc's new version is out: https://github.com/jgm/pandoc/releases/tag/3.1.12.2

Using the latest version will solve this issue. When building on CI, you can now use r-lib/actions/setup-pandoc@v2 with latest as Pandoc version. This will build your book using the latest pandoc released version.

Locally if you install latest version (with method you want) and put it on PATH, rmarkdown will use the greater version among binaries found including the one found on PATH.

Copy link

github-actions bot commented Sep 4, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior pandoc concerns upstream pandoc
Projects
Archived in project
Development

No branches or pull requests

3 participants