Skip to content

Commit

Permalink
keep entire line starting
Browse files Browse the repository at this point in the history
\begin{table}.

Fixes #796.
  • Loading branch information
dmurdoch committed Dec 11, 2023
1 parent 70bd592 commit 7515233
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/kable_styling.R
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,9 @@ styling_latex_position_center <- function(x, table_info, hold_position,
} else if(hold_position == "HOLD_position") {
x <- styling_latex_HOLD_position(x)
}
} else if (table_info$table_env)
x <- sub("^\\\\begin\\{table}", "\\\\begin{table}\n\\\\centering", x)
} else if (table_info$table_env) {
x <- sub("^(\\\\begin\\{table}[^\n]*)\\n", "\\1\n\\\\centering", x)
}
return(x)
}

Expand Down

0 comments on commit 7515233

Please sign in to comment.