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

Feature request: more manual control of figure/table caption numbering #855

Open
3 tasks done
lbramley opened this issue Jan 20, 2020 · 4 comments · May be fixed by #1427
Open
3 tasks done

Feature request: more manual control of figure/table caption numbering #855

lbramley opened this issue Jan 20, 2020 · 4 comments · May be fixed by #1427
Labels
feature a feature request or enhancement

Comments

@lbramley
Copy link

It would be great to have more manual control over figure and table caption numbering - specifically, to be able to restart numbering and to add a prefix. Many journals allow the inclusion of supplementary materials but captions need to be marked as e.g. "Supplementary table X:" and the numbers need to restart from 1. Ideally it'd need to work for the bookdown::word_document2 format as journals often require submission as a .docx.

This has been asked as well by others on StackOverflow, but I didn't see any answers, so I'm assuming it'd be a feature request.


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('bookdown'). 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/bookdown').
    • 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.

@vkehayas
Copy link

vkehayas commented Jun 19, 2020

I am also interested in this feature. In addition to the above-mentioned questions, I found this answer in SO that works for Supplementary figures in PDF output but not for HTML/DOCX:
https://stackoverflow.com/a/51337664

@rikudoukarthik
Copy link

Commenting here to emphasise that this is a much-needed feature; I feel it cannot be overstated how prevalent .docx manuscripts are in lieu of .pdf in some of the fields I'm aware of.

I see that it's been a few years since this issue was opened (and a bit more since questions have come in on SO), so I wonder if it can be given slightly higher priority? As it stands, this is one of two things that's preventing my manuscript-writing process from becoming fully reproducible.

@yihui
Copy link
Member

yihui commented May 7, 2023

Actually this has been possible since bookdown v0.22 (PR #1120), but as I tried to use a custom function to reformat the caption numbers, I found a problem that's not easy for me to fix. Please see #1427 for details. If you don't cross-reference those figures/tables with custom numbering, you should be fine.

@rikudoukarthik
Copy link

Thanks @yihui. Unfortunately, supplementary items very often get cross-referenced in the main text, so that feature is rather important. But regardless, I think #1427 is definitely better than nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
Status: Backlog
Development

Successfully merging a pull request may close this issue.

5 participants