rstudio / rmarkdown

Dynamic Documents for R
https://rmarkdown.rstudio.com
GNU General Public License v3.0
2.88k stars 977 forks source link

grid_table alignment not work #918

Closed faridcher closed 7 years ago

faridcher commented 7 years ago

kniting the following grid_table (with alignment colons) doesn't render properly in rstudio (rmarkdown), although the extension (grid_tables) is enabled by pandoc and work fine with pandoc markdown.

+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |  
+==============:+:=============:+:===================+
| Bananas       | $1.34         | * built-in wrapper |
|               |               | * bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | * cures scurvy     |
|               |               | * tasty            |
+---------------+---------------+--------------------+
rfbressan commented 7 years ago

I'm having basically the same issue trying to render a pdf_document (and html too). Bellow is a minimal example and it's not rendering to a grid table.

---
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            |
+---------------+---------------+--------------------+

The call to pandoc from RStudio is this:

/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

What's going wrong?

yihui commented 7 years ago

Could you try the latest versions of rmarkdown and RStudio? I cannot reproduce this issue.

To @faridcher

PDF output:

image

HTML output:

image

To @rfbressan

PDF output:

image

HTML output:

image

github-actions[bot] commented 3 years ago

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.