rstudio / revealjs

R Markdown Format for reveal.js Presentations
Other
327 stars 85 forks source link

DT datatable not displaying correctly #26

Open mh74 opened 8 years ago

mh74 commented 8 years ago

Hi - another issue I'm running into: datatables from the DT package are not displaying correctly in terms of size, fonts, sliders and buttons. In ioslides they are displayed nicely, See below example:

---
output:
  revealjs::revealjs_presentation:
    theme: night
    highlight: espresso
    center: true

---

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

DT

library("DT")
Test <- data.frame(A=rnorm(30),B=rnorm(30),C=rnorm(30),D=rnorm(30))
datatable(Test)
jjallaire commented 8 years ago

That's terrible! Unfortunately reveal.js does quite a bit with it's default CSS which interferes with proper rendering of DataTables. I think what's needed is some custom CSS that works through all of these issues. I'd be happy to take a pull request with these changes.

mh74 commented 8 years ago

Ok, I have made some changes already for personal use. But this has been maybe max 5-6 changes. Let me put something together.

jjallaire commented 8 years ago

Okay, great. That would be much appreciated!

On Wed, Mar 2, 2016 at 4:19 AM, mh74 notifications@github.com wrote:

Ok, I have made some changes already for personal use. But this has been maybe max 5-6 changes. Let me put something together.

— Reply to this email directly or view it on GitHub https://github.com/rstudio/revealjs/issues/26#issuecomment-191147349.

ghost commented 6 years ago

I think I've found a quick work-around, by setting the following in the YAML header:

    reveal_options:
      width: 100%
      height: 100%
      margin: 0.1

Issue is, the slides no longer nicely scale to smaller devices. I've been doing this in the interim when I know I'll be presenting on a standard laptop and the slides are really just for my use.

fedemolina commented 4 years ago

Ok, I have made some changes already for personal use. But this has been maybe max 5-6 changes. Let me put something together.

Could you share what have you do?