-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
tab.cap
in eval.after
not evaluating R code properly
#2352
Comments
That's because
Please read the issue guide when filing issues. |
Interesting, I didn't consider that! So the Also, even if the table caption is evaluated in the middle of chunk evaluation, |
No. It's not specific to
I don't know. This issue appears to be specific to ---
title: "Test"
---
```{r}
cap_x <- '100'
```
```{r, tab.cap=glue::glue("This is my caption with {cap_x}.")}
knitr::kable(iris[1:10,])
``` |
Firstly, apologies for the huge delay in responding---this is following on from #2305 which got locked after inactivity.
While @yihui showed how
eval.after = "tab.cap"
can be included in theknitr::opts_knit$set()
call, the issue is still unresolved because thetab.cap
is not functioning as expected. Please see the small reprex below (add a single ` to chunk open and close calls).Ideally, assuming
fig.cap
behaviour, the caption for the above table should read "This is my caption; neither 12,345 or 45,678 appears.", but instead I get this:Why is
tab.cap
not behaving asfig.cap
does?The text was updated successfully, but these errors were encountered: