You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not really sure if the issue is about flextable, knitr, tinytex or any other related packages, but here is the problem: internal links in PDF file inside flextables no longer work.
Recently, I had to update tinytex because of a new version of Tex Live. Since then, it seems that PDF internal links does not work the same way as before. Internal links outside of flextables still work as expected.
Here is a reproducible example of an Rmd document:
---title:"Internal links in PDF file inside a flextable"date:"2024-05-10"output:pdf_document:latex_engine:xelatexlinkcolor:redurlcolor:blue---```{rsetup, include=FALSE}
knitr::opts_chunk$set(echo=TRUE)
library(flextable)
library(magrittr)
```
Thefollowinglinkworks: [appendixA](#appendix-a).Internallinksinsideflextabledo not (butexternallinksstillwork):```{r}
dat<-data.frame(col1= c("Internal link", "External link"),
col2= c("#appendix-a", "https://github.com/davidgohel/flextable/issues"))
flextable(dat) %>%
set_table_properties(layout="autofit") %>%
compose(i= c(1, 2), j=2,
value= as_paragraph(
"See ",
hyperlink_text(x= c("appendix A", "flextable issues"), url=col2),
"."
))
```
\newpage## Appendix A {#appendix-a}
I get the same result using the "Knit" button in RStudio and using devtools::build_rmd. I get the same issue regardless of the software used to open the resulting PDF file.
When I open the PDF file in a browser to inspect it, I see that the href value is "#appendix-a" for the link inside the table, but is "#section*.1" for the one outside the table. In PDF files created before the recent update, both were "#appendix-a".
My guess is that flextable have to consider a change about this update to keep working. But maybe I'm wrong, it is the other way and I should duplicate this issue elsewhere.
Hello,
I'm not really sure if the issue is about
flextable
,knitr
,tinytex
or any other related packages, but here is the problem: internal links in PDF file inside flextables no longer work.Recently, I had to update
tinytex
because of a new version of Tex Live. Since then, it seems that PDF internal links does not work the same way as before. Internal links outside of flextables still work as expected.Here is a reproducible example of an
Rmd
document:I get the same result using the "Knit" button in RStudio and using
devtools::build_rmd
. I get the same issue regardless of the software used to open the resulting PDF file.When I open the PDF file in a browser to inspect it, I see that the
href
value is"#appendix-a"
for the link inside the table, but is"#section*.1"
for the one outside the table. In PDF files created before the recent update, both were"#appendix-a"
.My guess is that
flextable
have to consider a change about this update to keep working. But maybe I'm wrong, it is the other way and I should duplicate this issue elsewhere.Here is the result of
sessionInfo()
:The text was updated successfully, but these errors were encountered: