hughjonesd / huxtable

An R package to create styled tables in multiple output formats, with a friendly, modern interface.
http://hughjonesd.github.io/huxtable
Other
321 stars 28 forks source link

Custom themes? #22

Closed jaminday closed 7 years ago

jaminday commented 7 years ago

Any chance of building in a way to store a series of set_X() commands as a custom theme? I.e. store my own combination of settings so I can just call it for every table.

I find I mostly just want theme_article() but without the automatic bolding applied, so I end up adding the same boilerplate commands to every table to override the formatting.

Great package btw!

hughjonesd commented 7 years ago

How about:

my_theme <- function(ht) {

your commands here

ht }

which is exactly what the builtins do... David

On 16 September 2017 at 10:50, Jamin Day notifications@github.com wrote:

Any chance of building in a way to store a series of set_X() commands as a custom theme? I.e. store my own combination of settings so I can just call it for every table.

I find I mostly just want theme_article() but without the automatic bolding applied, so I end up adding the same boilerplate commands to every table to override the formatting.

Great package btw!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hughjonesd/huxtable/issues/22, or mute the thread https://github.com/notifications/unsubscribe-auth/AFjJ9xb4Egzr3gSPS8vakIFdQfTPISfOks5si5n_gaJpZM4PZxXP .

jaminday commented 7 years ago

Of course, my bad. Yep this is perfect, sorry for wasting your time. Thanks!

hughjonesd commented 7 years ago

Not at all. You might also consider using set_default_properties.