Skip to content

Conversation

@atusy
Copy link
Collaborator

@atusy atusy commented Aug 26, 2020

Please merge after rstudio/rmarkdown#1879

This PR adds number_sections argument to markdown_document2 and its family (e.g., word_document2).

I set TRUE as a default value to be consistent with other formats (e.g., html_document2).
However, this may not be a good idea in case users' Rmd files manually numbered sections...

Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atusy Thanks!

@cderv Feel free to merge this one after rstudio/rmarkdown#1879 is merged.

@cderv
Copy link
Collaborator

cderv commented Sep 9, 2020

LGTM.

Only one think: This feature relies on newer rmarkdown. So I did this 7f5af9c which is what to do in my experience.
@yihui do you work that way or have you another process for this ? Waiting for you answer before merging.

And we don't see this because ... we don't correctly test IMO. Once again, I think we should add test each time we add something. For now, I don't think the current test suite in bookdown allow to easily add test for this, so I'll do it later.

@cderv
Copy link
Collaborator

cderv commented Sep 9, 2020

It is not a perfect way to do it but I added a quick test because that is better to have one.

Copy link
Contributor

@yihui yihui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cderv 7f5af9c looks good to me. Yes, we should use Remotes in DESCRIPTION when it requires a Github version of a package. Thanks!

@atusy
Copy link
Collaborator Author

atusy commented Sep 9, 2020

@cderv Thanks for changes!

@cderv cderv merged commit f93e712 into rstudio:master Sep 10, 2020
@cderv
Copy link
Collaborator

cderv commented Sep 10, 2020

Thanks a lot @atusy !

yihui added a commit that referenced this pull request Sep 13, 2020
jonathan-g added a commit to jonathan-g/bookdown that referenced this pull request Sep 24, 2020
Merge remote-tracking branch 'rstudio/master' into master

# By Yihui Xie (4) and others
# Via Yihui Xie
* rstudio/master:
  the filenames use the separator - instead of _
  with a4c97d8, when rendering multiple output formats, each format is rendered in a new session, so we no longer need clean_envir = TRUE
  Add a precision that `number_sections` default to TRUE and this will change outputs
  add number_sections argument to markdown_document2 (closes rstudio#756) (rstudio#938)
  fix rstudio#932: deprecate the clean_envir argument of render_book(), and use xfun::Rscript_call() to render multiple output formats (with each format in a new R session, so the formats aren rendered independently)
  make 'word' an alias of 'docx' in _bookdown.yml: https://stackoverflow.com/q/63678601/559676
  Correctly encode twitter sharing url (rstudio#935)

# Conflicts:
#	R/render.R
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Would you mind developing word_book() output format?

3 participants