gt icon indicating copy to clipboard operation
gt copied to clipboard

Allow `fmt_markdown()` to target the footnote

Open schwa021 opened this issue 3 years ago • 1 comments

Details of my problem can be found here: https://stackoverflow.com/questions/71196187/side-by-side-gt-tables-with-footnotes

The crux seems to be that it is not possible to target the footnote area for reformatting as markdown. Why would you need to do this? It's a long story - but it involves (1) building gt objects, (2) turning them into raw html, (3) turning them back into gt objects. This is all in the service of building side-by-side tables to display in Rmarkdown.

fmt_markdown takes rows and columns as input. However, apparently the footnote is neither a row, nor a column. This makes sense, given the structure of the table. But, it means I can't modify it with fmt_markdown. It also seems to mean I can't modify it's appearance as flexibly as I can other parts of a gt.

This is probably an edge case, so I am going to assume low priority. But it just seems to break the overall logic of how gt works (allowing you to access and customize different parts of the table at will).

schwa021 avatar Feb 20 '22 21:02 schwa021

Thanks for the suggestion and I do think this could be accommodated but it might be better served with the cell_text() helper function. When used with tab_style() we can at least access all the locations of the table.

rich-iannone avatar Feb 28 '22 23:02 rich-iannone