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

Fixing math in GitHub Pages site generated by pkgdown #56

Open
bschneidr opened this issue Oct 25, 2024 · 3 comments
Open

Fixing math in GitHub Pages site generated by pkgdown #56

bschneidr opened this issue Oct 25, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@bschneidr
Copy link

Hello,

I was writing because I noticed that the math on the GitHub Pages site generated by pkgdown is not currently rendering correctly, making it harder to read the documentation. This is an open issue with the pkgdown package that doesn't seem to be getting fixed anytime soon:

r-lib/pkgdown#2704

I recently dealt with this problem in the 'svrep' package and so wanted to share a solution you can use to fix it, based on a suggestion from a discussion in that GitHub issue. In 'svrep', I had to make this change to the 'svrep' "_pkgdown.yml" file:

https://github.com/bschneidr/svrep/blob/main/_pkgdown.yml

template:
  bootstrap: 5
  includes:
    in_header: |
      <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+" crossorigin="anonymous">
      <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-7zkQWkzuo3B5mTepMUcHkMB5jZaolc2xDwL6VFqjFALcbeS9Ggm/Yr2r3Dy4lfFg" crossorigin="anonymous"></script>
      <script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous" onload="renderMathInElement(document.body);"></script>

Just wanted to pass this along in case it's helpful- the package documentation for 'nonprobsvy' is generally excellent, and it's a shame that the pkgdown site is glitching for it.

bschneidr added a commit to bschneidr/nonprobsvy that referenced this issue Oct 25, 2024
@BERENZ
Copy link
Contributor

BERENZ commented Oct 25, 2024

Hi @bschneidr,

thank you for reporting this. Currently, we are working on a major update of the package so we will include fix for this problem.

In the meantime you can go through the theory explained in Łukasz Chrostowski Master's thesis that is located here. It covers all the methods and their extensions that we have implemented in the package.

@BERENZ BERENZ added the bug Something isn't working label Oct 25, 2024
@bschneidr
Copy link
Author

Thanks for the quick reply @BERENZ. I submitted a pull request that you can go ahead and incorporate if you want for the current version of the package. Thanks for pointing out the thesis article with more details.

@BERENZ
Copy link
Contributor

BERENZ commented Oct 25, 2024

Thanks! Hope you will enjoy working with the package.

Actually, we plan to include the svrep package as we currently only support the survey package (and its way of replicating sampling weights).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants