Prework
Description
Rather than remaining in the order they were set, footnotes with locations are moved to the bottom of the footnote list.
This happens because when the footnotes are bound back together post processing in resolve_footnotes_styles the location footnotes are added at the bottom. For example here with the column cells:
Reproducible example
gt <- gt::exibble |>
gt() |>
tab_footnote("footnote 1") |>
tab_footnote("middle footnote with location",locations = cells_column_labels(columns=fctr)) |>
tab_footnote("last footnote")
Expected result
I would expect 'footnote 1' to be at the top, the footnote with the location to remain in the middle and the 'last footnote' to be at the bottom.
Actual result
Session info
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS 15.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/London
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gt_1.0.0.9000 testthat_3.2.3
loaded via a namespace (and not attached):
[1] sass_0.4.10 generics_0.1.4 xml2_1.3.8
[4] bitops_1.0-9 digest_0.6.37 magrittr_2.0.3
[7] evaluate_1.0.3 RColorBrewer_1.1-3 pkgload_1.4.0
[10] fastmap_1.2.0 rprojroot_2.0.4 pkgbuild_1.4.7
[13] sessioninfo_1.2.3 brio_1.1.5 urlchecker_1.0.1
[16] promises_1.3.2 purrr_1.0.4 scales_1.4.0
[19] cli_3.6.5 shiny_1.10.0 rlang_1.1.6
[22] ellipsis_0.3.2 bigD_0.3.1 commonmark_1.9.5
[25] base64enc_0.1-3 remotes_2.5.0 withr_3.0.2
[28] cachem_1.1.0 devtools_2.4.5 tools_4.4.1
[31] memoise_2.0.1 dplyr_1.1.4 httpuv_1.6.16
[34] vctrs_0.6.5 R6_2.6.1 mime_0.13
[37] lifecycle_1.0.4 juicyjuice_0.1.0 reactable_0.4.4
[40] fs_1.6.6 htmlwidgets_1.6.4 usethis_3.1.0
[43] miniUI_0.1.2 pkgconfig_2.0.3 desc_1.4.3
[46] pillar_1.10.2 later_1.4.2 rsconnect_1.3.4
[49] glue_1.8.0 profvis_0.4.0 Rcpp_1.0.14
[52] xfun_0.52 tibble_3.2.1 tidyselect_1.2.1
[55] knitr_1.50 rstudioapi_0.17.1 farver_2.1.2
[58] xtable_1.8-4 htmltools_0.5.8.1 rmarkdown_2.29
[61] compiler_4.4.1 markdown_2.0
Prework
Description
Rather than remaining in the order they were set, footnotes with locations are moved to the bottom of the footnote list.
This happens because when the footnotes are bound back together post processing in
resolve_footnotes_stylesthe location footnotes are added at the bottom. For example here with the column cells:gt/R/z_utils_render_footnotes.R
Line 274 in 0d3012c
Reproducible example
Expected result
I would expect 'footnote 1' to be at the top, the footnote with the location to remain in the middle and the 'last footnote' to be at the bottom.
Actual result
Session info
R version 4.4.1 (2024-06-14)
Platform: aarch64-apple-darwin20
Running under: macOS 15.6
Matrix products: default
BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.12.0
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
time zone: Europe/London
tzcode source: internal
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] gt_1.0.0.9000 testthat_3.2.3
loaded via a namespace (and not attached):
[1] sass_0.4.10 generics_0.1.4 xml2_1.3.8
[4] bitops_1.0-9 digest_0.6.37 magrittr_2.0.3
[7] evaluate_1.0.3 RColorBrewer_1.1-3 pkgload_1.4.0
[10] fastmap_1.2.0 rprojroot_2.0.4 pkgbuild_1.4.7
[13] sessioninfo_1.2.3 brio_1.1.5 urlchecker_1.0.1
[16] promises_1.3.2 purrr_1.0.4 scales_1.4.0
[19] cli_3.6.5 shiny_1.10.0 rlang_1.1.6
[22] ellipsis_0.3.2 bigD_0.3.1 commonmark_1.9.5
[25] base64enc_0.1-3 remotes_2.5.0 withr_3.0.2
[28] cachem_1.1.0 devtools_2.4.5 tools_4.4.1
[31] memoise_2.0.1 dplyr_1.1.4 httpuv_1.6.16
[34] vctrs_0.6.5 R6_2.6.1 mime_0.13
[37] lifecycle_1.0.4 juicyjuice_0.1.0 reactable_0.4.4
[40] fs_1.6.6 htmlwidgets_1.6.4 usethis_3.1.0
[43] miniUI_0.1.2 pkgconfig_2.0.3 desc_1.4.3
[46] pillar_1.10.2 later_1.4.2 rsconnect_1.3.4
[49] glue_1.8.0 profvis_0.4.0 Rcpp_1.0.14
[52] xfun_0.52 tibble_3.2.1 tidyselect_1.2.1
[55] knitr_1.50 rstudioapi_0.17.1 farver_2.1.2
[58] xtable_1.8-4 htmltools_0.5.8.1 rmarkdown_2.29
[61] compiler_4.4.1 markdown_2.0