### Bug description

Consider the following minimal working example:

`_quarto.yml`:

```
project:
  type: book

book:
  title: "Minimal Working Example"
  author: "Raniere Silva"
  date: "08/08/2022"
  chapters:
    - index.qmd

always_allow_html: true

format:
  html:
    theme: cosmo
  docx:
    lang: en
```

`index.qmd`:

`````` 
# Preface {.unnumbered}

This is a Quarto book.

```{r}
#| echo: true
#| warning: false
#| error: false
#| output: false

library(ggplot2)
library(plotly)
```

```{r}
#| echo: true
#| warning: false
#| error: false
#| output: false

p <- iris |>
  ggplot(aes(
    x = Petal.Length,
    y = Petal.Width
  )) +
  geom_point()
```

::: {#fig-iris}
::: {.content-visible unless-format="html"}
```{r}
#| echo: false
#| warning: false
#| error: false
#| output: true

p
```
:::

::: {.content-visible when-format="html"}
```{r}
#| echo: true
#| warning: false
#| error: false
#| output: true

p |>
  ggplotly() |>
  layout(dragmode = "pan")
```
:::

Chart using Edgar Anderson's Iris Data.
:::
``````

When I render it to a MS Word, I get

```
processing file: index.qmd
  |........                                                              |  11%
  ordinary text without R code

  |................                                                      |  22%
label: unnamed-chunk-1 (with options) 
List of 5
 $ echo   : logi TRUE
 $ warning: logi FALSE
 $ error  : logi FALSE
 $ output : logi FALSE
 $ message: logi FALSE


Attaching package: 'plotly'

The following object is masked from 'package:ggplot2':

    last_plot

The following object is masked from 'package:stats':

    filter

The following object is masked from 'package:graphics':

    layout

  |.......................                                               |  33%
  ordinary text without R code

  |...............................                                       |  44%
label: unnamed-chunk-2 (with options) 
List of 5
 $ echo   : logi TRUE
 $ warning: logi FALSE
 $ error  : logi FALSE
 $ output : logi FALSE
 $ message: logi FALSE

  |.......................................                               |  56%
  ordinary text without R code

  |...............................................                       |  67%
label: unnamed-chunk-3 (with options) 
List of 5
 $ echo   : logi FALSE
 $ warning: logi FALSE
 $ error  : logi FALSE
 $ output : logi TRUE
 $ message: logi FALSE

  |......................................................                |  78%
  ordinary text without R code

  |..............................................................        |  89%
label: unnamed-chunk-4 (with options) 
List of 5
 $ echo   : logi TRUE
 $ warning: logi FALSE
 $ error  : logi FALSE
 $ output : logi TRUE
 $ message: logi FALSE

  |......................................................................| 100%
  ordinary text without R code


output file: index.knit.md

Error: Functions that produce HTML output found in document targeting docx output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output in non-HTML formats by adding this option to the YAML front-matter of
your rmarkdown file:

  always_allow_html: true

Note however that the HTML output will not be visible in non-HTML formats.

Execution halted
```

The error message is clear. Add `always_allow_html: true` to the rmarkdown file solve the problem. Would be possible to propagate the `always_allow_html: true` from `_quarto.yml` to the rmarkdown file?

### `quarto check` Output

```
[✓] Checking Quarto installation......OK
      Version: 1.0.37
      Path: /opt/quarto/bin

[✓] 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...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
```

### `quarto tools check` Output

```
[✓] Inspecting tools

Tool         Status            Installed     Latest  
chromium     Not installed     ---           869685  
tinytex      Not installed     ---           v2022.08
```

### Checklist

- [X] [formatted your issue](https://yihui.org/issue/#please-format-your-issue-correctly) so it is easier for us to read?
- [X] included a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] documented the quarto version you're running, by pasting the output from running `quarto check` in the "Quarto Check Output" text area?
- [X] documented the version of the quarto tools you're running, by providing the output from running `quarto tools check` in the "Quarto Tools Check Output" text area?
- [X] documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] documented which operating system you're running? If on Linux, please provide the specific distribution as well.
- [X] upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
2022-08-08T04:09:06Z
rgaiacs
bug
v1.1
closed
Propagate 'always_allow_html: true' from _quarto.yml to the .Rmd
https://github.com/quarto-dev/quarto-cli/issues/1729