You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Insert cross reference widget doesn't pick up fig-cap from the next line (Support multiline yaml chunk options) #11199
RStudio Edition : Desktop
RStudio Version : RStudio 2022.06.0-daily+388 "Spotted Wakerobin" Daily (499ab6bd1e80eb3e38940fe81878d162dbd1f769, 2022-05-11) for macOS Mozilla/5.0 (Macintosh; Intel Mac OS X 12_3_1) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36
OS Version : macOS 12.3.1
R Version : 4.1.3
Steps to reproduce the problem
Create a Quarto book and add the following to one of the qmd files.
If you like cars see .
```{r}#| label: fig-cars-1#| fig-cap: Dist vs. speed of cars.plot(dist ~ speed, cars)``````{r}#| label: fig-cars-2#| fig-cap: >#| Speed vs. dist of cars.plot(speed ~ dist, cars)``````{r}#| label: fig-cars-3#| fig-cap: |#| Speed^2 vs. dist of cars.plot(speed^2 ~ dist, cars)```
Then, switch over to the visual editor. Put your curser after "see" and use the Insert Anything tool to insert a cross reference.
Describe the problem in detail
Only the caption of the first figure is visible, since the others start with > or |, which are commonly used for long captions spanning multiple lines. If working in a book chapter with lots of figures that use this style for captions, it's impossible to use this tool alone to pick the right figure to reference.
Describe the behavior you expected
I would expect the next line to be picked up so the caption would be visible in the widget.
Note: I think this is a bug and not a feature request, but I'm not sure.
I just made some changes to support the yaml chunk options format (based on mine-cetinkaya-rundel's previously reported issue, but I wasn't aware that these multiline options starting with > or | were valid, so I didn't add support for this format. We can add support for these at some point.
Regarding the CLI: Installing the CLI from quarto.org is a good thing. My main concern is that it doesn't have to be installed, so I want to make sure that we take that into account, because they might be different versions.
changed the title [-]Insert cross reference widget doesn't pick up `fig-cap` from the next line[/-][+]Insert cross reference widget doesn't pick up `fig-cap` from the next line (support multiline yaml chunk options)[/+]on May 24, 2022
changed the title [-]Insert cross reference widget doesn't pick up `fig-cap` from the next line (support multiline yaml chunk options)[/-][+]Insert cross reference widget doesn't pick up `fig-cap` from the next line[/+]on May 24, 2022
changed the title [-]Insert cross reference widget doesn't pick up `fig-cap` from the next line[/-][+]Insert cross reference widget doesn't pick up `fig-cap` from the next line (Support multiline yaml chunk options)[/+]on May 24, 2022
Activity
romainfrancois commentedon May 13, 2022
In addition, I see this source marker in the
>case.romainfrancois commentedon May 13, 2022
I get this with RStudio 2022.06.0-daily+400 "Spotted Wakerobin" Daily.
Do you by any chance have quarto installed from https://quarto.org/docs/get-started/ ? Maybe the takes precedence over the one included by recent daily builds of rstudio ? I'm not sure about this, but I've seen @ronblum recommend to remove the one installed from the cli.
jgutman commentedon May 13, 2022
I just made some changes to support the yaml chunk options format (based on mine-cetinkaya-rundel's previously reported issue, but I wasn't aware that these multiline options starting with
>or|were valid, so I didn't add support for this format. We can add support for these at some point.ronblum commentedon May 13, 2022
Regarding the CLI: Installing the CLI from quarto.org is a good thing. My main concern is that it doesn't have to be installed, so I want to make sure that we take that into account, because they might be different versions.
romainfrancois commentedon May 13, 2022
Thanks @ronblum, that clarifies it for me :-)
[-]Insert cross reference widget doesn't pick up `fig-cap` from the next line[/-][+]Insert cross reference widget doesn't pick up `fig-cap` from the next line (support multiline yaml chunk options)[/+][-]Insert cross reference widget doesn't pick up `fig-cap` from the next line (support multiline yaml chunk options)[/-][+]Insert cross reference widget doesn't pick up `fig-cap` from the next line[/+][-]Insert cross reference widget doesn't pick up `fig-cap` from the next line[/-][+]Insert cross reference widget doesn't pick up `fig-cap` from the next line (Support multiline yaml chunk options)[/+]