Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Computational engine not inferred from inline code chunks #12698

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

Closed
arthur-shaw opened this issue May 6, 2025 · 1 comment
Closed

Computational engine not inferred from inline code chunks #12698

arthur-shaw opened this issue May 6, 2025 · 1 comment
Labels
support a request for support

Comments

@arthur-shaw
Copy link

arthur-shaw commented May 6, 2025

Bug description

Quarto seems to determine the computational engine only if:

  • The engine parameter is set in yaml or
  • The qmd file contains a code chunk

My expectation is that Quarto infer the computational engine if there is only inline code present in the document.

Unfortunately, that's not the case.

Not sure if this is a feature or a bug from the developers' perspective. For me, it's either a bug or a feature request.

Steps to reproduce

---
format: revealjs
execute: 
  eval: true
  echo: false
---

## Show the the icon

### `r fontawesome::fa(name = "route")`

Actual behavior

In the absence of either the engine param in yaml or a code chunk in the document's body, Quarto treats inline code as the <pre> tag.

Image

If the engine param is specified, I get the icon I expect.

Image

If a code block is present in the document--even if it's devoid of content--I also get the icon I expect.

Image

Expected behavior

I expect--hope--that Quarto will see inline R code blocks and infer that I want the knitr engine.

For the reproducible example above, I expect to see the FontAwesome route icon.

Your environment

  • IDE: VSCode. See details below.

Version: 1.99.3 (user setup)
Commit: 17baf841131aa23349f217ca7c570c76ee87b957
Date: 2025-04-15T23:18:46.076Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

  • OS: Windows 11

Quarto check output

$ quarto check
Quarto 1.6.39
[>] Checking environment information...
      Quarto cache location: C:\Users\WB393438\AppData\Local\quarto
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.4.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.6.39
      Path: C:\WBG\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      Chromium: 869685
      TinyTeX: (not installed)

[>] Checking LaTeX....................OK
      Tex:  (not detected)

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....(None)

      Unable to locate an installed version of Python 3.
      Install Python 3 from https://www.python.org/downloads/

[>] Checking R installation...........OK
      Version: 4.4.1
      Path: C:/PROGRA~1/R/R-44~1.1
      LibPaths:
        - C:/Users/WB393438/r_libraries
        - C:/Program Files/R/R-4.4.1/library
      knitr: 1.49
      rmarkdown: 2.29

[>] Checking Knitr engine render......OK
@arthur-shaw arthur-shaw added the bug Something isn't working label May 6, 2025
@mcanouil
Copy link
Collaborator

mcanouil commented May 6, 2025

This is not a bug and this is documented.
Also please use search before opening issues. Thank you for your understanding.

https://quarto.org/docs/computations/inline-code.html#engine-binding

@mcanouil mcanouil added support a request for support and removed bug Something isn't working labels May 6, 2025
@mcanouil mcanouil closed this as not planned Won't fix, can't repro, duplicate, stale May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support a request for support
Projects
None yet
Development

No branches or pull requests

2 participants