最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

r markdown - R pkgdown equation numbering and referencing - Stack Overflow

programmeradmin2浏览0评论

I'm looking to dynamically number and reference equations in my .Rmd file to then be used in an Article for a package using pkgdown. I have read quite a few different approaches (which seem to depend on the Rmd output used) but I simply can't figure it out completely.

This is my yaml header:

output: 
  bookdown::html_vignette2:
    toc: true
    toc_depth: 3
    number_sections: true

My equation looks like this:

\begin{equation}

y_{t} = \beta_1 x_{1t} + \cdots + \beta_k x_{kt} + u_{t}, \qquad t=1,2,..., n 

  (\#eq:linear-regression-model)

\end{equation}

and I refer to it using something like this:

... nested in \@ref(eq:linear-regression-model).

This all renders well locally:

But then using pkgdown, this does not work anymore:

Any ideas?

发布评论

评论列表(0)

  1. 暂无评论