title: How to: Markdown PDF align table to the left
body: <p><strong>Goal</strong>
  I have been wanting to create a pdf reporting function but I have not been able to restyle the layout of the pdf as I would like to. One of the issues I am addressing is that I am not able to align the table to the left. Right now it is centred in the middle.</p>
  
  <p><strong>System and others</strong></p>
  
  <ul>
  <li>CentOS release 6.9 (Final)</li>
  <li>TeX 3.141592 (Web2C 7.5.6)</li>
  </ul>
  
  <p><strong>template.Rmd</strong></p>
  
  <pre><code>---
  title: "Reporting"
  output: pdf_document
  ---
  
  ```{r setup, include=FALSE}
  knitr::opts_chunk$set(echo = TRUE)
  ```
  ```{r, results='asis', echo=FALSE}
  knitr::kable(head(cars), format = "markdown") %&gt;%
    kable_styling(bootstrap_options = "striped", full_width = F, position = "left")
  ```
  </code></pre>
  
  <p><strong>build_report.R</strong></p>
  
  <pre><code># Libraries
  require(knitr)
  require(markdown)
  library(RMySQL)
  library(png)
  library(kableExtra)
  
  # create .md file
  knit("template.Rmd", "template.md")
  
  # create .html file
  markdownToHTML("template.md", "template.html", options=c("use_xhml"))
  
  # create .pdf file
  command &lt;- paste0("pandoc -V geometry:'left=0.5in,bottom=1in,top=1.5in' -s ", "template.html", " -o ", "output.pdf")
  system(command)
  </code></pre>
  
  <p><strong>output.pdf</strong>
  Output example (irrelevant info left out)<a href="https://i.stack.imgur.com/dfIw0.jpg" rel="noreferrer">1</a></p>