Jessica H.
Jessica H.

Reputation: 1

Slidify tables not displaying correctly when using revealjs framework

I'm trying to create a table (like the one below) using RMarkdown inside of the Slidify package.

Attribute    | Value
------------ | -------
Arribute1    | Value1
Attribute2   | Value2
Attribute3   | Value3

I had originally written the presentation using io2012 framework and my tables would display as table using framework io2012 after knitting.

However, after I switched to the revealjs framework, the tables no longer display in the correct format table using framework revealjs

I would like to use the revealjs framework for the final presentation but also need for my tables to show up as they do using the io2012 framework. Does anyone have tips on how to solve this issue? Thanks in advance!

Upvotes: 0

Views: 663

Answers (1)

Christoph Safferling
Christoph Safferling

Reputation: 1186

reveal.js uses a completely different CSS styling than io2012. I'm afraid you'll have to dig into the CSS and basically copy the table styles over.

You could try to use knitr::kable and library(kableExtra) and force the table into html (rather than markdown) kable(df, "html"), but you'd still have the issue of CSS.

Check the .reveal table stuff in the reveal.js CSS for a starter.

Upvotes: 0

Related Questions