Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fpr_kable double Table #s , black font in captions in dark mode and pagedown build reference errors #68

Closed
NewGraphEnvironment opened this issue Apr 10, 2024 · 5 comments

Comments

@NewGraphEnvironment
Copy link
Owner

NewGraphEnvironment commented Apr 10, 2024

image

This error does not occur when only Table 1.1 is built

processing file: mybookdown_template.Rmd
                                                                                                                                                                 
output file: mybookdown_template.knit.md

/Applications/RStudio.app/Contents/Resources/app/quarto/bin/tools/pandoc +RTS -K512m -RTS mybookdown_template.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output mybookdown_template.html --lua-filter /Users/airvine/Library/R/arm64/4.3/library/bookdown/rmarkdown/lua/custom-environment.lua --lua-filter /Users/airvine/Library/R/arm64/4.3/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Users/airvine/Library/R/arm64/4.3/library/rmarkdown/rmarkdown/lua/latex-div.lua --metadata-file /var/folders/mg/h910y2c54fsc99qj74dyrjph0000gn/T//RtmppGBSO4/file10399365cb01d --embed-resources --standalone --wrap preserve --lua-filter /Users/airvine/Library/R/arm64/4.3/library/pagedown/resources/lua/uri-to-fn.lua --lua-filter /Users/airvine/Library/R/arm64/4.3/library/pagedown/resources/lua/loft.lua --lua-filter /Users/airvine/Library/R/arm64/4.3/library/pagedown/resources/lua/footnotes.lua '--mathjax=https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML' --metadata newpage_html_class="page-break-after" --section-divs --table-of-contents --toc-depth 1 --template /Users/airvine/Library/R/arm64/4.3/library/pagedown/resources/html/paged.html --highlight-style pygments --number-sections --css style-pagedown.css --css default-page-custom.css --include-in-header /var/folders/mg/h910y2c54fsc99qj74dyrjph0000gn/T//RtmppGBSO4/rmarkdown-str10399389385da.html --citeproc 

Output created: mybookdown_template.html
Warning: A runtime exception has occured while executing JavaScript
  Runtime exception message:
    ReferenceError: $ is not defined
    at http://127.0.0.1:5454/mybookdown_template.html:32159:9
Warning: A runtime exception has occured while executing JavaScript
  Runtime exception message:
    ReferenceError: jQuery is not defined
    at http://127.0.0.1:5454/mybookdown_template.html:33062:3
[1] TRUE

may be related to #30

@lucy-schick
Copy link
Collaborator

similar issue here rstudio/pagedown#182 (comment)

@NewGraphEnvironment
Copy link
Owner Author

i can confirm it is an issue with kableExtra:: calls. was tipped off by this jhelvy/renderthis#46

I will keep narrowing it down and trying to fix

We also now have black font showing in table captions when the reports are served in Dark mode which is also new and unfortunate. this could be a bit of a large mess to untangle with so many tables already on the street. oh gee

@NewGraphEnvironment NewGraphEnvironment changed the title fpr_kable double Table #s and pagedown build reference errors fpr_kable double Table #s , black font in captions in dark mode and pagedown build reference errors Apr 10, 2024
@NewGraphEnvironment
Copy link
Owner Author

NewGraphEnvironment commented Apr 10, 2024

adding this removes the warning ReferenceError: $ is not defined but not the doubling of Table headers and the black font in dark mode.

We have at least two separate issues

chunk
``` {r jquery, echo=FALSE, eval=T}
htmltools::tagList(rmarkdown::html_dependency_jquery())
triple_backtick
```

@NewGraphEnvironment
Copy link
Owner Author

NewGraphEnvironment commented Apr 10, 2024

Phew.

Have dealt with double table captions in function with addition of label = NA in
knitr::kable(caption = caption_text, booktabs = T, label = NA)

Issue with black text in dark mode has been dealt with in develpment version of kableExtra so can be imported with

pak::pkg_install("haozhu233/kableExtra")  

Gee wiz. Will close with label=NA fix

NewGraphEnvironment added a commit to NewGraphEnvironment/restoration_wedzin_kwa_2024 that referenced this issue Apr 10, 2024
@lucy-schick
Copy link
Collaborator

thank you for fixing all this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants