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

Add a way to number figures and tables sequentially even when sections are numbered #1057

Closed
3 tasks done
Kodiologist opened this issue Jan 8, 2021 · 5 comments
Closed
3 tasks done
Labels
feature a feature request or enhancement next to consider for next release

Comments

@Kodiologist
Copy link

When section numbering is on, tables and figures get two-part numbers like "1.2" (where 1 is the section number). When section numbering is off, they get simple sequential numbers like "2". There ought to be a way to get the latter behavior even when section numbering is on.

Related: #855

> xfun::session_info('rmarkdown')
R version 4.0.2 (2020-06-22)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.10

Locale:
  LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
  LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
  LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
  LC_PAPER=en_US.UTF-8       LC_NAME=C                 
  LC_ADDRESS=C               LC_TELEPHONE=C            
  LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

Package version:
  base64enc_0.1.3 digest_0.6.27   evaluate_0.14  
  glue_1.4.2      graphics_4.0.2  grDevices_4.0.2
  highr_0.8       htmltools_0.5.0 jsonlite_1.7.1 
  knitr_1.30      magrittr_2.0.1  markdown_1.1   
  methods_4.0.2   mime_0.9        rlang_0.4.9    
  rmarkdown_2.5   stats_4.0.2     stringi_1.5.3  
  stringr_1.4.0   tinytex_0.27    tools_4.0.2    
  utils_4.0.2     xfun_0.19       yaml_2.2.1     

Pandoc version: 2.9.2.1

By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('rmarkdown'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/rmarkdown').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@cderv
Copy link
Collaborator

cderv commented Jan 8, 2021

It is currently linked directly to number_section

x = resolve_refs_html(x, global = !number_sections)

I think it would be easy and possible to offer a switch to the value of global here (documented in ?resolve_refs_html).

Currently you cannot change this in the format.

Thanks for the suggestion ! We'll consider it for next version.

@cderv cderv added feature a feature request or enhancement and removed enhancement labels Mar 15, 2021
@cderv cderv added the next to consider for next release label Mar 31, 2021
@cderv
Copy link
Collaborator

cderv commented Mar 31, 2021

Duplicate of #948

@cderv cderv marked this as a duplicate of #948 Mar 31, 2021
@cderv
Copy link
Collaborator

cderv commented Mar 31, 2021

We will track that in the other issue.

Thanks for the suggestion

@cderv cderv closed this as completed Mar 31, 2021
@yihui
Copy link
Member

yihui commented Aug 11, 2021

Please see #948 (comment). Thanks!

@github-actions
Copy link

github-actions bot commented Feb 9, 2022

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 Feb 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature a feature request or enhancement next to consider for next release
Projects
None yet
Development

No branches or pull requests

3 participants