3

I looked this question but the given method does not seem work with footnotes (See MWE). I wonder how to add hyperlink in table footnotes using kableExtra package.

knitr::kable(
              x       = mtcars[1:4, 1:5]
            , format  = "latex"
            , caption = "Table Caption with hyperlink[note]"
            , escape  = FALSE
            ) %>%
  kableExtra::add_footnote("\\href{https://github.com/haozhu233/kableExtra}{kableExtra}")
halfer
  • 19,824
  • 17
  • 99
  • 186
MYaseen208
  • 22,666
  • 37
  • 165
  • 309

1 Answers1

5

With kableExtra > 0.5.0, you can use escape in footnote.

library(kableExtra)
knitr::kable(mtcars[1:4, 1:5], 
         format  = "latex", 
         caption = "Table Caption with hyperlink[note]", 
         escape  = FALSE
        ) %>%
  add_footnote("\\href{https://github.com/haozhu233/kableExtra}{kableExtra}",
                       escape = F)
Hao
  • 7,476
  • 1
  • 38
  • 59
  • Thanks @Hao for wonderful package and nice solution. I do have [another question](https://stackoverflow.com/q/46156841/707145) on `kableExtra`. Would appreciate if you have a look and help me on that too. Thanks – MYaseen208 Sep 11 '17 at 15:26