Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R Markdown pdf_文档2 pdf粗体希腊字母_R_Latex_R Markdown_Knitr - Fatal编程技术网

R Markdown pdf_文档2 pdf粗体希腊字母

R Markdown pdf_文档2 pdf粗体希腊字母,r,latex,r-markdown,knitr,R,Latex,R Markdown,Knitr,我想在R标记中使用粗体希腊字母 并修改来自 ,读作 --- title: "Testing Bold GreekLetters " author: "Authors" date: "January 2019" output: bookdown::pdf_document2: fig_caption: yes latex_engine: xelatex number_sections: true toc: yes toc_depth: 2 editor_

我想在R标记中使用粗体希腊字母 并修改来自 ,读作

---
title: "Testing Bold GreekLetters "
author: "Authors"
date: "January 2019"
output:
  bookdown::pdf_document2:
    fig_caption: yes
    latex_engine: xelatex
    number_sections: true
    toc: yes
    toc_depth: 2
editor_options:
  chunk_output_type: console
link-citations: yes
linkcolor: blue
subparagraph: yes
citecolor: blue
urlcolor: blue
header-includes:
  \usepackage{amsmath}
  \usepackage{bm}
---

# test bold greek letters

$\bm{\alpha}$ and $\bm{\beta}$

$$T^{2}=\left[\overline{\mathbf{X}}_{1}-\overline{\mathbf{X}}_{2}-\left(\boldsymbol{\mu}_{1}-\boldsymbol{\mu}_{2}\right)\right]^{\prime}\left[\left(\frac{1}{n_{1}}+\frac{1}{n_{2}}\right) \mathbf{S}_{\text {pooled }}\right]^{-1}\left[\overline{\mathbf{X}}_{1}-\overline{\mathbf{X}}_{2}-\left(\boldsymbol{\mu}_{1}-\boldsymbol{\mu}_{2}\right)\right]$$
然后出现如下错误

! Improper alphabetic constant.
<to be read again> 
                \mitalpha 
l.93 \(\bm{\alpha}
                \) and \(\bm{\beta}\) 
!不正确的字母常量。
\米塔尔法
l、 93\(\bm{\alpha}
\)和\(\bm{\beta}\)

我如何解决这个问题?(PS:
\bm
中的
\usepackage{bm}
\boldsymbol
中的
\usepackage{amsmath}

我的建议是删除Xeletex,只使用
$\mathbf{\alpha}$
。这对我来说很好。@J\F谢谢!是的,你说得对!删除
latex\u引擎:xelatex
后,我们可以评论
\usepackage{amsmath}
\usepackage{bm}
\bm
\boldsymbol
都很好,尽管
$\mathbf{\alpha}$
对我来说仍然不起作用。如果我们想保留
latex\u引擎:Xeletex
,我们应该怎么做?