Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v2.0 modify_footnote() updates #1675

Open
ddsjoberg opened this issue May 20, 2024 · 1 comment
Open

v2.0 modify_footnote() updates #1675

ddsjoberg opened this issue May 20, 2024 · 1 comment
Assignees
Labels
High Priority High priority issue
Milestone

Comments

@ddsjoberg
Copy link
Owner

  • I think footnotes and abbreviations need to be handled with different functions. It's confusing having them together. It would be great if the abbreviations were not a regular footnote. Most tables define abbreviations in more of a source note way.
  • I would like modify_footnote() to be able to place markers in the body of the table.
@ddsjoberg
Copy link
Owner Author

ddsjoberg commented May 29, 2024

I wonder if it'd be best to create a new function modify_footer() and modify_abbrevation() that would

  • Handle multiple footnotes on the same cell
  • Put footnotes in headers, body of the table, and spanning headers
  • Treat abbreviations more like source notes.

It would be better to keep modify_footnote() but change the API in a hopefully non-breaking way.

modify_footnote(
   x, 
  ..., 
  location = c("header", "body", "spanner", "title", "subtitle"),  # would need to specify one of these,
  rows = NULL, # only used when location='body'
  spanner_level = 1L, # only used when location='spanner'
  replace = TRUE,  # the current implementation only allows one footnote per cell, so it allows replaces the existing
  text_interpret = c("md", "html")
)

We can keep the same syntax for deleting footnotes, e.g. colname = NA


Maybe it would be easier to simply export footnote functions for each location:

modify_footnote_header()
modify_footnote_body()
modify_footnote_spanner()
modify_footnote_title() # this would depend on whether we go for titles or captions (i don't think we can add footnotes to captions?)
modify_footnote_subtitle()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High Priority High priority issue
Projects
None yet
Development

No branches or pull requests

1 participant