1

我想在 R Markdown 中使用粗体希腊字母,并按 部分修改 R Markdown pdf_document2 PDF 图形和表格编号的一个小例子,其内容为

---
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}\) 

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

4

0 回答 0