![使用 R Markdown 在文档标题中添加数学模式](https://linux22.com/image/390011/%E4%BD%BF%E7%94%A8%20R%20Markdown%20%E5%9C%A8%E6%96%87%E6%A1%A3%E6%A0%87%E9%A2%98%E4%B8%AD%E6%B7%BB%E5%8A%A0%E6%95%B0%E5%AD%A6%E6%A8%A1%E5%BC%8F.png)
我试图将 $\LaTeX$ 放入文档标题中,但找不到这样做的方法。我想这是因为我无法将 latex 包与文档标题一起使用。有人知道如何解决这个问题吗?
以下是我所拥有的:
title: "Welcome to $\LaTeX$ Workshop"
output:
pdf_document:
citation_package: natbib
number_sections: yes
link-citations: yes
bibliography: sample.bib
classoption: twocolumn
header-includes:
- \usepackage{lscape}
- \usepackage[english]{babel}
- \usepackage{multicol}
- \setlength{\columnsep}{1cm}
- \setlength{\parindent}{1cm} # paragraph indentation
- \setlength{\parskip}{8pt} # paragraph spacing
- \usepackage{setspace}
- \doublespacing
我收到的错误如下所示:
! Package inputenc Error: Unicode char
(U+2028)
(inputenc) not set up for use with LaTeX.
See the inputenc package documentation for explanation.
Type H <return> for immediate help.
...
l.96 \maketitle
Try running pandoc with --latex-engine=xelatex.
pandoc: Error producing PDF
Error: pandoc document conversion failed with error 43
Execution halted
提前致谢!