quarto-dev / quarto-dev/quarto-cli

Custom Section Numbering Not Functioning

Open
#1,771 1 comment 1 reaction 1 assignee View on GitHub

@cscheid is already working on this.

Since Nov 15, 2022.

bug crossref
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

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

Discussed in https://github.com/quarto-dev/quarto-cli/discussions/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. (#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. (#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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.