quarto-dev / quarto-dev/quarto-cli
Feature request: fragment-index for code-line-numbers
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
One possibility to address the problem of setting fragment order easily in Rmarkdown for code-line-numbers, discussed here:
https://github.com/hakimel/reveal.js/issues/3055#issuecomment-1477534636
Include a new option #| fragment-index: ""
```{r, echo=T}
#| fragment-index: "0"
#| code-line-numbers: "|1|2|3"
x <- 1:10
x
LETTERS[x]
```
This would set the "start" index of the first code highlighting fragment, which would already solve my use case, which would be going through code in one chunk with highlight fragments in one column, after all those fragments showing the plot output as a fragment in the second column and then displaying some text fragment in the first column below the code chunk.
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 R Markdown options for code-line-numbers are passed into the reveal.js output, using the linked reveal.js discussion for the intended fragment ordering. Confirm how a fragment-index value should affect the first highlighting fragment and verify the example produces the requested sequence across code, plot, and text fragments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100