R pdf、docx、html输出中bookdown中的一致数学公式编号

R pdf、docx、html输出中bookdown中的一致数学公式编号,r,ms-word,latex,r-markdown,bookdown,R,Ms Word,Latex,R Markdown,Bookdown,在bookdown中,是否有一个LaTeX数学环境对每个方程进行编号,而不管输出是否为.pdf、.docx、.html?添加此乳胶: \begin{align} X &= Y \\ Z &= W \end{align} 输入以下输出: PDF:效果如预期 DOCX:缺少方程式编号 HTML:缺少方程式编号 注: 输出是使用pdf_book、word_document2和gitbook生成的。 这与我的一个未回答的问题有关: 更新:在bookdown中,将Ralf下面

在bookdown中,是否有一个LaTeX数学环境对每个方程进行编号,而不管输出是否为.pdf、.docx、.html?添加此乳胶:

\begin{align}
   X &= Y \\
   Z &= W
\end{align}
输入以下输出:

PDF:效果如预期

DOCX:缺少方程式编号

HTML:缺少方程式编号

注:

输出是使用pdf_book、word_document2和gitbook生成的。 这与我的一个未回答的问题有关: 更新:在bookdown中,将Ralf下面的答案与我的其他学习相结合,以下所有内容在.pdf、.docx、.html输出中都能始终如一地发挥作用

Add a single un-numbered equation:

\begin{equation*}
  X = Y
\end{equation*}

Add a single numbered equation:

\begin{equation}
  X = Y
  (\#eq:eq02)
\end{equation}

I refer to previous, equation \@ref(eq:eq02).

Add multiple un-numbered equations:

\begin{align*}
  X &= Y \\
  Z &= W   
\end{align*}

Add multiple equations with numbering for each:

\begin{align}
  X &= Y (\#eq:eq05)\\
  Z &= W (\#eq:eq06)  
\end{align}

I refer to previous, equation \@ref(eq:eq05) and equation \@ref(eq:eq06).

Add multiple equations with a single numbering for all:

\begin{equation}
   \begin{aligned}
      X &= Y \\
      Z &= W   
   \end{aligned}
   (\#eq:eq04)
\end{equation}

I refer to previous, equation \@ref(eq:eq04).

对于bookdown中的方程式编号支持,您需要。以下是我的作品:

---
output:
  bookdown::html_document2: default
  bookdown::word_document2: default
  bookdown::pdf_document2: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

\begin{equation}
\begin{aligned}
  X &= Y \\
  Z &= W
\end{aligned}
(\#eq:eq1)
\end{equation}

\begin{align}
  X &= Y (\#eq:eq2) \\
  Z &= W (\#eq:eq3)
\end{align}


See Equation \@ref(eq:eq1) or Equations \@ref(eq:eq2) and \@ref(eq:eq3).
HTML输出:


PDF输出类似。在LibreOffice中看到的单词输出非常糟糕,但是包括引用在内的方程式编号在那里。因此,我想这是一个本地或图书馆办公室特有的问题。

对于bookdown中的公式编号支持,您需要。以下是我的作品:

---
output:
  bookdown::html_document2: default
  bookdown::word_document2: default
  bookdown::pdf_document2: default
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

\begin{equation}
\begin{aligned}
  X &= Y \\
  Z &= W
\end{aligned}
(\#eq:eq1)
\end{equation}

\begin{align}
  X &= Y (\#eq:eq2) \\
  Z &= W (\#eq:eq3)
\end{align}


See Equation \@ref(eq:eq1) or Equations \@ref(eq:eq2) and \@ref(eq:eq3).
HTML输出:


PDF输出类似。在LibreOffice中看到的单词输出非常糟糕,但是包括引用在内的方程式编号在那里。所以我想这是一个本地或图书馆特有的问题。

。它没有提供详细信息,但建议使用bookdown HTML公式编号也可以工作。如果没有其他内容,那可能就是黑客攻击。但我更喜欢在像align、split等环境中为每个等式编号,而不是为每个等式设置单独的环境。有没有一种方法可以在不使用bookdown的Rmarkdown文档中实现这一点?我尝试了上面的代码,但无法使用编号的公式将其编织到docx。。它没有提供详细信息,但建议使用bookdown HTML公式编号也可以工作。如果没有其他内容,那可能就是黑客攻击。但我更喜欢在像align、split等环境中为每个等式编号,而不是为每个等式设置单独的环境。有没有一种方法可以在不使用bookdown的Rmarkdown文档中实现这一点?我尝试了上面的代码,但无法使用编号的公式将其编织到docx。这对我也适用!我错过了簿记簿上的那张便条。我附议了糟糕的图书馆陈列。方程式的数字在方程式的主体中粘在一起。这对我也适用!我错过了簿记簿上的那张便条。我附议了糟糕的图书馆陈列。方程式编号在方程式主体中粘在一起。