Skip to content

Commit

Permalink
Merge pull request #798 from haozhu233/fix_796
Browse files Browse the repository at this point in the history
keep entire line starting table
  • Loading branch information
dmurdoch authored Dec 11, 2023
2 parents 70bd592 + 7515233 commit 65e18c6
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 65e18c6

Please sign in to comment.