我正在尝试创建rmarkdown pdf文档,并在其中引入一个多行方程。标题如下:
title: "Cross-referencing figures, tables, and equations"
author: "Generated by bookdown"
output:
pdf_document: default
bookdown::pdf_document2: default
bookdown::html_document2: default
我需要能够交叉引用等式,并将其拆分为多行,因为它很长。通过查看其他帖子,我尝试了多种不同的方法,最新的如下所示:
\begin{align}
g(X_{n}) &= g(\theta)+g'({\tilde{\theta}})(X_{n}-\theta) \notag \\
\sqrt{n}[g(X_{n})-g(\theta)] &= g'\left({\tilde{\theta}}\right)
\sqrt{n}[X_{n}-\theta ] (\#eq:align)
\end{align}
上面的工作很好,我不能使用@ref(eq:align
交叉引用,并且(\#eq:align)
随机出现在等式中。有人能建议我如何让它工作吗?
谢谢你。
发布于 2021-02-10 15:27:27
下面的方法有帮助吗?
\begin{align}
g(X_{n}) &= g(\theta)+g'({\tilde{\theta}})(X_{n}-\theta) \notag \\
\sqrt{n}[g(X_{n})-g(\theta)] &= g'\left({\tilde{\theta}}\right)
\sqrt{n}[X_{n}-\theta ] \label{eq:align}
\end{align}
As we see from \eqref{eq:align}, Pythagoras was right all along!
其思想是通过\label
和\eqref
只使用分配标签和引用的LaTeX方法。
https://stackoverflow.com/questions/66138939
复制