I would like to put the footnotes consecutively (inline) in one cell to adhere to APA style. Therefore I set
footnotes.sep = " ", to override the default linebreak as stated in the man-page (repex below).
In RStudio and in the knitted HTML each footnote is embedded in a <p>-Tag and therefore displayed in separate lines (with the separator at the end, so the test case is fine ;) ).
Is this a bug or expected behavior?
If the latter, the help page for tab_options might be misleading:
footnotes.sep | The separating characters between adjacent footnotes in the footnotes section. The default value produces a linebreak.
Is there a way to render all footnotes consecutively in one line? — Besides using CSS to set the ".gt_footnotes" class to display: inline.
library(gt, magrittr)
data.frame(A = 1:3) %>%
gt() %>%
tab_footnote(
footnote = "This is column A.",
locations = cells_column_labels(
columns = A
)
) %>%
tab_footnote(
footnote = "This is not column B.",
locations = cells_column_labels(
columns = A
)
) %>%
tab_options(
footnotes.sep = " "
)
Resulting html for the table footer:
<tfoot>
<tr class="gt_footnotes">
<td colspan="1">
<p class="gt_footnote">
<sup class="gt_footnote_marks">
<em>1</em>
</sup>
This is column A.
</p>
<p class="gt_footnote">
<sup class="gt_footnote_marks">
<em>2</em>
</sup>
This is not column B.
</p>
</td>
</tr>
</tfoot>
btw: I <3 gt! Thank you!
I would like to put the footnotes consecutively (inline) in one cell to adhere to APA style. Therefore I set
footnotes.sep = " ", to override the default linebreak as stated in the man-page (repex below).In RStudio and in the knitted HTML each footnote is embedded in a
<p>-Tag and therefore displayed in separate lines (with the separator at the end, so the test case is fine ;) ).Is this a bug or expected behavior?
If the latter, the help page for
tab_optionsmight be misleading:Is there a way to render all footnotes consecutively in one line? — Besides using CSS to set the ".gt_footnotes" class to
display: inline.Resulting html for the table footer:
btw: I <3 gt! Thank you!