title: Rmarkdown to docx less-than symbol in table caption
body: <p>I would like to use the <code>&lt;</code> symbol in a table caption of a Rmarkdown that converts to a docx document. I am using the <code>flextable</code> package as this gives a lot of (needed) flexibility to tables in the docx format.</p>
  <p>But I am really confused by the multiple conversion steps through <code>pandoc</code>. It does not seem so easy to get to the <code>&lt;</code> as it is a special coding HTML character. I have read that in HTML you would escape it via <code>&amp;lt;</code>. This gives me the problem that the <code>&amp;</code> has to be escaped, too. The conversion then turns <code>&amp;lt;</code> into <code>&amp;amp;lt;</code> (as it converts the <code>&amp;</code> into <code>&amp;amp;</code>) and <code>\\&amp;lt;</code> would yield me <code>&amp;amp;amp;lt;</code> (as it converts the <code>&amp;</code> of the <code>&amp;amp;</code> again). Latex does not seem to work either, I've tried <code>&lt;</code>, <code>$&lt;$</code> and <code>$\\textless$</code> but to no avail.</p>
  <p>All combinations basically follow the same logic, i.e. that <code>&lt;</code> are correctly transformed to <code>&amp;lt;</code> but then the HTML is not converted again.</p>
  <p>Any idea how to solve this? What do I miss?</p>
  <p>Example RMD file:</p>
  <pre><code>---
  title: &quot;Untitled&quot;
  author: &quot;Unkown&quot;
  date: &quot;1/25/2021&quot;
  output: bookdown::word_document2
  ---
  
  ```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = TRUE)
  library(flextable)
  library(tidyverse)
  ```
  
  ## R Markdown
  
  This is an R Markdown document, see Table \@ref(tab:test).
  
  
  ```{r test, echo = F}
  flextable(head(cars, n = 10)) %&gt;% 
    bold(part = &quot;header&quot;) %&gt;%
    autofit() %&gt;% 
    set_caption(&quot;Table: (\\#tab:test) Example caption with less-than symbol: \\&amp;lt; or &amp;lt; or &lt; or $&lt;$ or $\\textless$&quot;)
  ```
  </code></pre>