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

Custom Section Numbering Not Functioning #1771

Open
Tracked by #4944
sammo3182 opened this issue Aug 9, 2022 Discussed in #1748 · 1 comment
Open
Tracked by #4944

Custom Section Numbering Not Functioning #1771

sammo3182 opened this issue Aug 9, 2022 Discussed in #1748 · 1 comment
Assignees
Labels
bug Something isn't working crossref
Milestone

Comments

@sammo3182
Copy link

The customizing numbering seems not to work. See more detailed discussion in Q&A #1748 below.

Discussed in #1748

Originally posted by sammo3182 August 9, 2022
I was excited about the custom setting of references but cannot find the correct way to set them. In the example below, I tried to change the section and figure labels to alphabetic and sub labels to roman. But as the screenshot shows, none of the section numbers, figure numbers, or their references changed in either pdf or HTML format. I tried to move number-sections: true and/or crossref under pdf. Nothing changed.

What I hope to get are:

  1. Customizing the section, table, and figure numbering and correctly cross-referring them. (Custom section numbering #873 discussed this issue, but I wonder if there is an easier way to do this for HTML, pdf, and docx all)
  2. Setting the numbering of some sections differently from the previous, for instance, arabic for main content sections and alpha for appendices. (Restart Chapter Numbers by Part #1283 post a similar demand but it seems no good solution yet)
---
title: "test"

number-sections: true

format: 
  pdf: default
  html: default
  
crossref:
  sec-labels: alpha A
  subref-labels: roman i
---

# section 

@fig-test

# section {#sec-test1}
## subsection {#sec-test2}

@sec-test1

@sec-test2

# section 

# References {.unnumbered}

```{r fig-test}
#| fig-cap: "A plot"

plot(mtcars$mpg)
```

image

@jjallaire
Copy link
Collaborator

Thanks for reporting! Our crossref numbering is indeed a bit uneven across formats and appears to not work at all for sections! We have a major work item for v1.2 to improve our crossrefs and will address this as part of that work.

@jjallaire jjallaire added this to the v1.2 milestone Aug 12, 2022
@dragonstyle dragonstyle modified the milestones: v1.2, v1.3 Sep 23, 2022
@cscheid cscheid self-assigned this Nov 15, 2022
@cscheid cscheid modified the milestones: v1.3, v1.4 Feb 28, 2023
@cscheid cscheid modified the milestones: v1.4, v1.5 Dec 1, 2023
@cscheid cscheid modified the milestones: v1.5, Future Mar 1, 2024
@mcanouil mcanouil added the bug Something isn't working label Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working crossref
Projects
None yet
Development

No branches or pull requests

5 participants