Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting of tables #21

Open
aridus opened this issue Jun 8, 2019 · 0 comments
Open

Formatting of tables #21

aridus opened this issue Jun 8, 2019 · 0 comments

Comments

@aridus
Copy link

aridus commented Jun 8, 2019

Following this suggestion ##15 I can use this code

library(knitr)
library(kableExtra)
options(kableExtra.html.bsTable = T)
options(knitr.kable.NA = '')
data_sources <- read_csv("tables/data_sources.csv")
kable(data_sources) %>%
  kable_styling() %>% 
  row_spec(0, bold = F) %>% 
  row_spec(1, background = "#eff9fe") %>% 
  row_spec(6, background = "#eff9fe") %>% 
  row_spec(10, background = "#eff9fe") %>% 
  row_spec(15, background = "#eff9fe")

to style a table (although row_spec(0, bold = F) does not prevent bolding of the header row).

But the table is placed across the whole page (i.e. tab.margin = FALSE has no effect) and a citation of the usual form (Table @ref(tab:data-sources)) does not link to the table.

Is there a solution to this problem?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant