Skip to content

Commit

Permalink
Fix bug with floating table and no table notes
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronGullickson committed Feb 25, 2024
1 parent 454da10 commit c8265f7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions R/utils_render_latex.R
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ create_table_end_l <- function(data) {
"\\bottomrule\n",
ifelse(dt_options_get_value(data = data, option = "latex_use_longtable"),
"\\end{longtable}\n",
"\\end{tabular}\n"),
"\\end{tabular}"),
collapse = ""
)
}
Expand All @@ -861,7 +861,10 @@ create_footer_component_l <- function(data) {

# If there are no footnotes or source notes, return an empty string
if (nrow(footnotes_tbl) == 0 && length(source_notes_vec) == 0) {
return("")
return(ifelse(dt_options_get_value(data = data,
option = "latex_use_longtable"),
"",
"\\end{table}\n"))
}

# Get the multiline and separator options for footnotes and source notes
Expand Down

0 comments on commit c8265f7

Please sign in to comment.