Closed jobreu closed 5 years ago
Hello @jobreu, it looks like you may be missing the backslash before the inline reference. That means it should be \@ref(fig:code_chunk_name)
.
For tables the only difference is that you use tab
instead of fig
. Also you need to type out the word Figure or Table and then out in your reference because it will only generate the number for you not the word.
Let me know if that helps!
Hi @brentthorne, thanks for the quick response! I did what you suggested but the issue still persists.
Maybe try using a code chunk name without underscores? Otherwise I would need to see your session info and also what versions of the rmarkdown packages you are using to take another guess at it.
Can you try to reproduce the issue within a single pagedown or bookdown document also?
Thanks
Removing the underscore from the code chunk name was the solution. Thanks a lot!
First of all, thank you for this amazing package! When I knit the poster (using posterdown_betterport), the references and captions for my tables and figures are not displayed properly. When I use the same code as in the template (\@ref(fig:code_chunk_name) + defining a figure caption via fig.cap in the code chunk options), what gets shown in the knitted HTML document is literally "@ref(#fig:code_chunk_name)" instead of "Figure 1". It's the same for tables. For reference: I generated the plot using ggplot2 and the table using kableExtra.