Set R >=4.6.0's help.htmltocoption to FALSE#1307
Merged
Merged
Conversation
lionel-
approved these changes
Jul 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses posit-dev/positron#12840
Relevant R commits:
R 4.6.0 added a new
help.htmltocglobal option. The point of this was to help add a TOC on the left hand side of CRAN's new HTML page for R package docs: https://cran.r-project.org/web/packages/vctrs/refman/vctrs.htmlIt's on for "dynamic help", i.e. when you go through
httpd()which callsRd2HTML(dynamic = TRUE, toc = getOption("help.htmltoc", TRUE)), and we of course usehttpd()for installed package help.(Notably its not broken for "preview" R package help, i.e. for development version docs, since we control the
Rd2HTML()call there and don't supplytoc, see.ps.Rd2HTML()).We have two options:
help.htmltocglobal optionR-nav.cssstylesheet, which weirdly feels likeR.csswith some extra additions? https://github.com/wch/r-source/blob/d5e28ead42751bc5a46bef44b3f351642c4d60d3/doc/html/R-nav.css#L2-L6I think trying to use
R-nav.cssis probably a mistake, the TOC won't get us much, and is supposed to be hidden on narrow screens anyways. Since the Help pane is usually narrow, it would pretty much always be hidden.So instead the best option is to just turn it off on load.
I have confirmed locally that this fixes the mangled help issue.