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

Callout following code block renders poorly in docx #11619

Open
lauren-obrien opened this issue Dec 6, 2024 · 0 comments
Open

Callout following code block renders poorly in docx #11619

lauren-obrien opened this issue Dec 6, 2024 · 0 comments
Labels
bug Something isn't working docx Issues with the docx format

Comments

@lauren-obrien
Copy link

Bug description

When a callout block is the element immediately following a code block, (e.g. a figure or gt table), in docx format the two items are rendered in one table on separate rows. The callout then gets a very narrow right margin and doesn't display correctly. The pattern can only be broken by inserting a plaintext element in between the code block and the callout div, like some text or a horizontal rule.

Steps to reproduce

---
title: "Reprex: docx callouts following code blocks"
format: docx
---

```{r}
#| label: fig-test
#| echo: false

image(volcano)

```

::: {#tip-simple .callout-tip collapse="true" appearance="minimal" title="Simple tip"}
Lorem ipsum
:::

------------------------------------------------------------------------

```{r}
#| label: fig-test2
#| echo: false

image(volcano)

```

spacing text

::: {#tip-simple2 .callout-tip collapse="true" appearance="minimal" title="Simple tip"}
Lorem ipsum
:::

Expected behavior

Code blocks and following callouts should be isolated elements in docx output

Actual behavior

Code blocks and following callouts are merged into a single table

Your environment

  • IDE: Rstudio RStudio 2024.09.1+394
  • R version 4.4.2
  • OS: Windows 10
  • Quarto: 1.6.39 (problem persists in 1.7.2)

Quarto check output

Quarto 1.6.39
[>] Checking environment information...
      Quarto cache location: C:\Users\OBrienL\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:\Users\OBrienL\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

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

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\OBrienL\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2023

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

[>] Checking Python 3 installation....OK
      Version: 3.11.4
      Path: C:/Python311/python.exe
      Jupyter: (None)

      Jupyter is not available in this Python installation.
      Install with py -m pip install jupyter

[>] Checking R installation...........OK
      Version: 4.4.2
      Path: C:/R/R-4.4.2
      LibPaths:
        - C:/R/R-4.4.2/library
      knitr: 1.49
      rmarkdown: 2.29

[>] Checking Knitr engine render......OK
@lauren-obrien lauren-obrien added the bug Something isn't working label Dec 6, 2024
@cscheid cscheid added the docx Issues with the docx format label Dec 6, 2024
lauren-obrien added a commit to manaakiwhenua/NZ_soildesc_2024 that referenced this issue Dec 7, 2024
it has some quirks.

these conditional blocks will need to be manually deleted from the docx output whenever its regenerated until quarto-dev/quarto-cli#11619 is resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docx Issues with the docx format
Projects
None yet
Development

No branches or pull requests

2 participants