kableExtra
kableExtra copied to clipboard
`add_footnote()` with `notation = "none"` produces "^^" in markdown
add_footnote()
seems to enclose symbols used for numbering the footnotes with ^
in order to make them superscripts. With notation = "none"
, however, there is no symbol and ^^
will be rendered in the markdown output.
I think this is around where the superscript is being defined: https://github.com/haozhu233/kableExtra/blob/4c93f1afc26efcd04fa729cb4a522d5f262bb6bd/R/add_footnote.R#L81
Reprex:
library(tidyverse)
library(kableExtra)
#>
#> Attaching package: 'kableExtra'
#> The following object is masked from 'package:dplyr':
#>
#> group_rows
dt <- head(mtcars, 5)
kbl(dt, format = "pipe") %>%
add_footnote(label = "foo", notation = "none")
mpg | cyl | disp | hp | drat | wt | qsec | vs | am | gear | carb | |
---|---|---|---|---|---|---|---|---|---|---|---|
Mazda RX4 | 21.0 | 6 | 160 | 110 | 3.90 | 2.620 | 16.46 | 0 | 1 | 4 | 4 |
Mazda RX4 Wag | 21.0 | 6 | 160 | 110 | 3.90 | 2.875 | 17.02 | 0 | 1 | 4 | 4 |
Datsun 710 | 22.8 | 4 | 108 | 93 | 3.85 | 2.320 | 18.61 | 1 | 1 | 4 | 1 |
Hornet 4 Drive | 21.4 | 6 | 258 | 110 | 3.08 | 3.215 | 19.44 | 1 | 0 | 3 | 1 |
Hornet Sportabout | 18.7 | 8 | 360 | 175 | 3.15 | 3.440 | 17.02 | 0 | 0 | 3 | 2 |
Note: ^^ foo
Created on 2021-11-16 by the reprex package (v2.0.1)