holtzy / quarto-tricks

A set of tips and tricks for Quarto
https://www.productive-r-workflow.com/quarto-tricks
50 stars 1 forks source link

Inconsistency between https://www.productive-r-workflow.com/quarto-tricks and the code #1

Closed mcanouil closed 9 months ago

mcanouil commented 1 year ago

Thanks for sharing the tips!

There are several inconsistencies between the content of this repository and what is highlighted on https://www.productive-r-workflow.com/quarto-tricks Such as number_sections which has no meaning in Quarto.

image image

This uses knitr inline syntax, while Quarto uses and recommends YAML syntax as it is compatible with other language not just R with knitr.

I made few separate PRs related to Quarto syntax/guidelines.

holtzy commented 9 months ago

Thanks so much! I just fixed the _ issue.

Can you point me to the other inconsistencies?

Thanks for your work in general, it is awesome.

mcanouil commented 9 months ago

Unfortunately, I deleted my fork which closed the PRs: https://github.com/holtzy/quarto-tricks/pulls?q=is%3Apr+is%3Aclosed

But you can see some of them.

holtzy commented 9 months ago

Hey @mcanouil 👋

I just included all your fixes. Thank you so much for taking the time 🙏

I did not know that the #| ... syntax was better practice than the {r, warning=F....} syntax.

More generally, I hope you find my work to democratise Quarto helpful. Any feedback is very welcome. Thanks again!

mcanouil commented 9 months ago

I did not know that the #| ... syntax was better practice than the {r, warning=F....} syntax.

In Quarto. Quarto uses YAML, using R inline syntax works but only when using knitr and bypass Quarto which can lead to unexpected things.

For example, knitr YAML takes precedence over R Inline

```{r fig-crossref}
#| labels: something
plot(1)


Here, even with the `fig-` prefix, the figure won't be a cross-refence figure because, "labels" overwrite the R inline label.
Basically, in Quarto, code cells should only be `` ```{r} `` not `` ```{r ...} ``.
holtzy commented 9 months ago

Thanks so much, I'm gonna have to update some things in my course!

holtzy commented 9 months ago

Btw, by any chance do you think my content could be featured in your "awesome quarto" repo?

mcanouil commented 9 months ago

It's been a while so cannot really answer now. I would suggest to open an issue with your suggestion or directly make a pull request. I'll review it likely in few weeks time after looking for some content and possibly removing outdated contents from the Awesome Quarto list.