2
votes

I'm having a issue trying to render a pdf_document (and html too) with grid_tables markdown's extension. Bellow is a minimal example and it's not rendering to a grid table.

Is this an issue with RMarkdown, my code, or anything else?

Thank you! Rafael.

title: "Test grid_table"
author: "Rafael"
date: "22 de julho de 2017"
output: 
  pdf_document:
    md_extensions: +grid_tables
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+

And here is the call to pandoc from RStudio:

/usr/lib/rstudio/bin/pandoc/pandoc +RTS -K512m -RTS teste.utf8.md --to latex --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash+grid_tables --output teste.pdf --template /home/rafael/R/i686-pc-linux-gnu-library/3.4/rmarkdown/rmd/latex/default-1.17.0.2.tex --highlight-style tango --latex-engine pdflatex --variable graphics=yes --variable 'geometry:margin=1in'

output file: teste.knit.md

Output created: teste.pdf

1

1 Answers

0
votes

You need a newline between the code and table:

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+