Skip to content

FR: Auto-detect Quarto's bundled pandoc as fallback #110

Description

@grantmcdermott

(Potential upstream issue.)

Hi folks.

I just ran into this error on a new laptop, whilst calling some of the btw help documentation tools (e.g., btw_tool_docs_help_page) from the CLI:

Mcp error: -32603: pandoc is required and was not found (see the help page ?rmarkdown::pandoc_available).

The error is obvious enough; I didn't have pandoc installed as a "standalone" binary and available on my PATH (via my package manager). OTOH it's not the full truth, since I do have Quarto installed and this obviously bundles its own pandoc. I can imagine that other users are in a similar boat and this made me think that having a fallback option to / check for Quarto pandoc would be a useful feature.

What do you think about adding automatic detection of Quarto's bundled pandoc as a fallback when rmarkdown::pandoc_available() returns FALSE? Specifically, we could check common Quarto installation paths:

  • macOS: /Applications/quarto/bin/tools/pandoc
  • Windows: ~/AppData/Local/Programs/Quarto/bin/tools/pandoc
  • Linux: /opt/quarto/bin/tools/pandoc

If found we could set Sys.setenv(RSTUDIO_PANDOC = <path>) to make it available to rmarkdown during this session?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions