title: How can I print a less/greater than symbol in Rmarkdown LaTex through kable and kableExtra?
body: <p>I am trying to print a fairly simple table using Rmarkdown LaTex through kable and the kableExtra functions that allow me to bold the rows and columns.  Below is an example of my issue:</p>
  
  <pre><code>df &lt;- data_frame(grp=c("&lt;1","1-5","5+"),n=c(3,4,5))
  
  #This works
  df %&gt;%
    kable(format="latex",booktabs=T)
  
  #This works
  df %&gt;%
    kable(format="latex",booktabs=T) %&gt;%
    kable_styling(latex_options = c("hold_position"))
  
  #This works
  df %&gt;%
    kable(format="latex",booktabs=T) %&gt;%
    kable_styling(latex_options = c("hold_position")) %&gt;%
    column_spec(1,bold=T)
  
  #This works
  df %&gt;%
    kable(format="latex",booktabs=T) %&gt;%
    kable_styling(latex_options = c("hold_position")) %&gt;%
    row_spec(1 ,bold=T)
  
  #This does not work
  df %&gt;%
    kable(format="latex",booktabs=T) %&gt;%
    kable_styling(latex_options = c("hold_position")) %&gt;%
    row_spec(0 ,bold=T) %&gt;%
    column_spec(1,bold=T) 
  </code></pre>
  
  <p>Now I was able to figure out it is because my group starts with the less than symbol which apparently is causing chaos when attempting to use both <code>column_spec</code> and <code>row_spec</code>.  The error message is:</p>
  
  <pre><code>! Misplaced \noalign.
  \toprule -&gt;\noalign 
                      {\ifnum 0=`}\fi \@aboverulesep =\abovetopsep \global \@b...
  l.129 \toprule
  </code></pre>
  
  <p>In my actual data frame (which itself isn't much more complicated than this one), my main error is actually <code>Error: \caption outside float</code> (but I can't seem to replicate it with my MVE, admittedly I left out a few of the other options for this example, though).</p>
  
  <p>I've tried just renaming the group along the lines of <code>\&lt;1</code> up through <code>\\\\&lt;1</code> and that either 'works' but prints a slash, or it gives me an error about an unrecognized escape.  Now I know that the easiest option is to simply rename the group in some way but I'm interested to see if there is some other escape trick or work around so that I can keep my group name.</p>
  
  <p>Thanks!</p>