Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Update bibliography for the current document' does not work with cites in captions #40

Open
LuisLauM opened this issue Apr 26, 2023 · 3 comments

Comments

@LuisLauM
Copy link

LuisLauM commented Apr 26, 2023

I got a caption like this:

\```{r fig_1, fig.cap='A caption  with a cite @AnAuthor2021'}
plot(1, 1)
\```

Then I try to update the bibliography using the addin, but reference of @AnAuthor2021 is never added.

PS: omit the \ before the ` (is just to avoid the Rmd interpreter of Github).

@LuisLauM
Copy link
Author

Dear @paleolimbot

In order to move on in this point, I have made the next commit in my fork LuisLauM@bfafeb2

There, I include a new argument (include.chunks = TRUE). Now it works great for me but of course I do not know if you feel that it is a good solution.

Let me know it, please. Regards.

@dmi3kno
Copy link
Contributor

dmi3kno commented Jun 28, 2023

This should be taken care of together with references in Quarto #| tbl-caption: ... and #| fig-caption: ... etc (including sub-captions if any. Also include chunks is confusing because you are talking about chunk options.

Also, if you (optionally) include chunk options, why not the rest of the carved-out instances, i.e. in-line code? I think the interface should be consistent.

References in chunks would refer to, for example, table output.

@LuisLauM
Copy link
Author

This should be taken care of together with references in Quarto #| tbl-caption: ... and #| fig-caption: ... etc (including sub-captions if any. Also include chunks is confusing because you are talking about chunk options.

Also, if you (optionally) include chunk options, why not the rest of the carved-out instances, i.e. in-line code? I think the interface should be consistent.

References in chunks would refer to, for example, table output.

Yes, that solution was made quickly and then I realized that it is not the good one at all. I have written some lines that extract @refs from 1) header of chunks and, 2) within the chunks, only from those lines that starts with #| tbl-caption: ... and #| fig-caption:. However, I have not submitted yet because I was planing to test it well before and right now I have been busy with another activities in my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants