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

Supply macro definitions in print.dev_help #120

Closed
hadley opened this issue Jan 1, 2020 · 5 comments · Fixed by #207
Closed

Supply macro definitions in print.dev_help #120

hadley opened this issue Jan 1, 2020 · 5 comments · Fixed by #207
Labels
feature a feature request or enhancement

Comments

@hadley
Copy link
Member

hadley commented Jan 1, 2020

print.dev_topic() — the documentation suggests that ... in Rd2txt() and Rd2html() is passed on to parse_Rd(). I don't remember exactly what you need to supply in the macros argument, but I'm pretty sure I got it working in pkgdown.

Would also need to work with the IDE team to get the necessary information passed along to the previewRd() API call.

@hadley hadley changed the title Supply macro definitions in Supply macro definitions in print.dev_help Jan 1, 2020
@jimhester jimhester added the feature a feature request or enhancement label Apr 3, 2020
@dmurdoch
Copy link

This has come up in this discussion: https://stat.ethz.ch/pipermail/r-package-devel/2020q2/005420.html. The mathjaxr package supplies macros to allow MathJax to be used in Rd help files; packages need to list it in the RdMacros field in DESCRIPTION. pkgload::load_rd_macros() should be looking there.

@lionel-
Copy link
Member

lionel- commented Jun 1, 2022

IIUC, this is a duplicate of #115 which was fixed in #116. Am I missing something @hadley?

@hadley
Copy link
Member Author

hadley commented Jun 1, 2022

@lionel- I think @dmurdoch is saying that the current support is incomplete — as well as loading the macros defined in the current package, we also need to load the packages provided by the packages listed in the RdMacros field.

lionel- added a commit that referenced this issue Jun 2, 2022
lionel- added a commit that referenced this issue Jun 2, 2022
lionel- added a commit that referenced this issue Jun 2, 2022
lionel- added a commit that referenced this issue Jun 2, 2022
@lionel-
Copy link
Member

lionel- commented Jun 2, 2022

ok I think I understand now, we already have support for foreign and local RdMacros outside RStudio that Gabor implemented in #116. I have added unit tests in #205 (see also e3c282a which fixes a bug in RStudio introduced in this PR).

What was missing is support inside RStudio because we call into the IDE API in that case. @dmurdoch opened an issue about foreign macros in rstudio/rstudio#6871 which has been fixed by Kevin since. However, it seems that local macros are still not loaded. I have opened rstudio/rstudio#11336 to get this fixed.

I think we can now close this but please let me know if I'm still missing something.

@lionel- lionel- closed this as completed Jun 2, 2022
@lionel-
Copy link
Member

lionel- commented Jun 3, 2022

Kevin found a way for us to display our own generated html files in the help pane of RStudio.

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

Successfully merging a pull request may close this issue.

4 participants