Skip to content

Feature Request: Separate multiple footnote symbols with a comma #699

@NourEdinDarwish

Description

@NourEdinDarwish

Thank you for the wonderful flextable package.

I would like to suggest a minor enhancement to how multiple footnote references are displayed in a single cell. Currently, the reference symbols appear adjacent to each other without any separator (e.g., ¹²).

For improved clarity, it would be beneficial if these symbols were separated by a comma (e.g., ¹,²). This is the default behavior in the gt package and makes complex tables easier to read.

library(gt)
library(flextable)

# add footnote to a table
# flextable way
head(iris) |>
  flextable() |>
  footnote(
    i = 1,
    j = 1:2,
    value = as_paragraph("This footnote 1"),
    ref_symbols = "1",
    part = "header"
  ) |> 
  footnote(
    i = 1,
    j = 1,
    value = as_paragraph("This footnote 2"),
    ref_symbols = "2",
    part = "header"
  ) 
Image
# gt way
head(iris) |>
  gt() |>
  tab_footnote(
    footnote = "This footnote 1",
    locations = cells_column_labels(columns = c(Sepal.Length, Sepal.Width))
  ) |>
  tab_footnote(
    footnote = "This footnote 2",
    locations = cells_column_labels(columns = Sepal.Length)
  )
Sepal.Length1,2 Sepal.Width1 Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
1 This footnote 1
2 This footnote 2

Created on 2025-09-04 with reprex v2.1.1

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions