title: Latex Commands ignored while rendering html
body: <p>When a .Rmd file is being knit into html, latex commands are completely ignored. Itemize, quotes, even text formatting disappers, along with the text. When knitting to .pdf \chapter is declared to be undefined control sequence and the execution is halted.</p>
  
  <pre><code>---
  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
  </code></pre>
  
  <p>This is renders as...</p>
  
  <p><a href="https://i.stack.imgur.com/6RuZw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6RuZw.png" alt="Notice that chapter definition and the quote is missing"></a></p>
  
  <p>Enumerate environment is ignored. Section and chapter titles are also ignored. How to make pandoc render the content enclosed in the curly brackets?</p>