quarto-dev / quarto-dev/quarto-cli
Teach engine about new custom crossref
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Discussed in https://github.com/quarto-dev/quarto-cli/discussions/7653 and https://github.com/quarto-dev/quarto-cli/discussions/11394
This would work:
---
title: "Estimating associations..."
format: html
keep-md: true
crossref:
custom:
- kind: float
ref-type: supptbl
latex-env: supptbl
prefix: Table S
name: Table S
space-before-numbering: false
execute:
echo: false
---
::: {#supptbl-info-chems}
```{r info-chems}
knitr::kable(head(cars))
```
Information about non-persistent EDCs
:::
See @supptbl-info-chems
However, OP is trying to use cell options
---
title: "Estimating associations..."
format: html
keep-md: true
crossref:
custom:
- kind: float
ref-type: supptbl
latex-env: supptbl
prefix: Table S
name: Table S
space-before-numbering: false
execute:
echo: false
---
```{r}
#| label: supptbl-info-chems
#| tbl-cap: "Information about non-persistent EDCs"
knitr::kable(head(cars))
```
See @supptbl-info-chems
Should it work ?
Intermediate .md
::: {.cell tbl-cap='Information about non-persistent EDCs'}
::: {.cell-output-display}
| speed| dist|
|-----:|----:|
| 4| 2|
| 4| 10|
| 7| 4|
| 7| 22|
| 8| 16|
| 9| 10|
:::
:::
See @supptbl-info-chems
Currently label is not identified as tbl- or fig- so is unknown and not passed through
We could:
- Teach engine about
crossrefand parse it to know we should pass the labels on the.cellsas for Table and Figures - Don't filter labels, and always add a cell engine label as ID to the .cell div - may have some side effect as we don't do that by filtering out other labels.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the crossref.custom configuration and the intermediate .md cell are processed, focusing on why only tbl- and fig- labels are passed through. Compare the two proposed approaches and verify the chosen behavior against the custom supptbl example. Done means the cell label is retained as an identifier and See @supptbl-info-chems resolves correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100