Skip to content

Markdown tables use different style than code (kable) tablesΒ #922

@cbrnr

Description

@cbrnr

Consider the following reprex (tested with quarto 0.9.424):

---
title: "Table vs. kable"
engine: knitr
---

A Markdown table is *not* striped:

|  a|  b|  c|
|--:|--:|--:|
|  1|  6| 11|
|  2|  7| 12|
|  3|  8| 13|
|  4|  9| 14|
|  5| 10| 15|

But a table generated with `knitr::kable()` is striped (besides other minor differences):

```{r}
data.frame(a=1:5, b=6:10, c=11:15) |> knitr::kable()
```

Although the output of the code cell is exactly equal to the Markdown table in the example (the first table), the output look different, most notably only the kable is striped:
Screen Shot 2022-05-18 at 16 09 29

I would have expected that the tables use the same style by default. If this is not desired, is there a way I can make them the same?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesttablesIssues with Tables including the gt integration

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions