I'm using the Officedown package to knit a Word document but I have over around 30 figures and 30 tables, which makes keeping up with where each figure is located in the doc a little confusing
I'd like to make my captions reflect the section they are in, e.g., "Figure 2.1", where "2" refers to the section and "1" indicates the 1st image in section 2
I have found a similar query from last year and it seems to properly reference each section, but the second digit does not reset with each new section and the post has not been responded
library(officedown)
library(ggplot2)
section 1
Figure1-1
display Figure1-1, it is ok.
ggplot(economics, aes(date, unemploy / pop)) +
geom_line() +
theme_minimal()
ggplot(economics, aes(date, unemploy / pop)) +
geom_line() +
theme_minimal()
section 2
Figure2-1
expected Figure2-1, but it display Figure 2-2.
ggplot(economics, aes(date, unemploy / pop)) +
geom_line() +
theme_minimal()
ggplot(economics, aes(date, unemploy / pop)) +
geom_line() +
theme_minimal()