渲染html时忽略了Latex命令

时间:2017-04-07 01:24:24

标签: knitr r-markdown pandoc

当.Rmd文件被编入html时,乳胶命令被完全忽略。逐项,引号,甚至文本格式化disappers,以及文本。当编译到.pdf \ chapter时,声明为未定义的控制序列,并且暂停执行。

---
output:
  html_document:
    fig_caption: yes
    keep_md: yes
    theme: cerulean
    toc: yes
  pdf_document:
    fig_caption: yes
    keep_tex: yes
    toc: yes
---
\chapter{{Efficient R Coding}}

\section{Benchmarking}

Donald Knuth\sidenote{See \url{http://en.wikipedia.org/wiki/Donald_Knuth}} made the following statement on optimization:
  \begin{quote}
\textit{"We should forget about small efficiencies, say about 97\% of the time: premature optimization is the root of all evil."}
\end{quote}
\noindent So before we rush headlong into optimising our R code, we will spend some time determining when it is worthwhile optimising. In this chapter, we will look at benchmarking. In computing, a benchmark is obtained by running a set of programs in order to assess their relative performance.

\section{Simple benchmarks}

To construct a benchmark we typically use the following steps
\begin{enumerate}
\item Construct a function (or set of functions) around the feature we want to
benchmark. This function usually has an argument that allows us to vary the
complexity of the object. For example, a parameter \texttt{n} that alters the data

这是......

Notice that chapter definition and the quote is missing

忽略枚举环境。章节和章节标题也被忽略。如何使pandoc渲染大括号中的内容?

0 个答案:

没有答案