Skip to content

Commit

Permalink
theme_placement indent
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentarelbundock committed Nov 3, 2024
1 parent a1b2cbd commit 08ccea3
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions R/theme_placement.R
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
# Don't do much in here
theme_placement <- function(x,
horizontal = get_option("tinytable_theme_placement_horizontal", default = NULL),
latex_float = get_option("tinytable_theme_placement_latex_float", default = NULL)) {
# do not change the defaul theme
if (identical(x@theme[[1]], "placement")) x@theme <- list("default")
theme_placement <- function(
x,
horizontal = get_option("tinytable_theme_placement_horizontal", default = NULL),
latex_float = get_option("tinytable_theme_placement_latex_float", default = NULL)) {

fn <- function(table) {
tab <- table@table_string
if (table@output == "latex" && !is.null(latex_float)) {
Expand All @@ -23,7 +22,9 @@ theme_placement <- function(x,
table@table_string <- tab
return(table)
}

x <- style_tt(x, finalize = fn)

return(x)
}

Expand Down

0 comments on commit 08ccea3

Please sign in to comment.