Word documents are opened in compatibility mode with broken cross-references

I used Quarto in November of last year to create the methods section for a journal article with cross-references for my Tables and Figures. When I run this code

Code start:

title: "My Document"
format: docx

#| label: fig-plot
#| fig-cap: "Plot"


For example, see @fig-plot.

Code end

and render it to pdf and html, the cross-references work, so that the last sentence turns to "For example, see Figure 1". However, when I try to render it to docx, Word opens the document in compatibility mode and renders @fig-plot as {HYPERLINK \l "fig-plot" \h}. If I right-click on the link and click "Open Hyperlink", the mouse jumps to the Figure as expected. The Windows Preview window in the Windows Explorer also displays the Figure as intended, so I do not have any idea what the problem is.

I am using Windows 11, I have multiple reference programs installed (Citavi, Zotero, Endnote), of which I installed Zotero between the last time I used Quarto and today. I have deactivated all reference program addins, only Grammarly is still active. Quarto check returns:

$ quarto check
Quarto 1.4.549
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.11: OK
      Dart Sass version 1.69.5: OK
      Deno version 1.37.2: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.4.549
      Path: C:\Program Files\Quarto\bin
      CodePage: 1252

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

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

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

[>] Checking Python 3 installation....OK
      Version: 3.12.1
      Path: C:/Users/fkays/AppData/Local/Programs/Python/Python312/python.exe
      Jupyter: 5.7.1
      Kernels: python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........OK
      Version: 4.3.2
      Path: C:/PROGRA~1/R/R-43~1.2
        - C:/Users/fkays/AppData/Local/R/win-library/4.3
        - C:/Program Files/R/R-4.3.2/library
      knitr: 1.45
      rmarkdown: 2.25

[>] Checking Knitr engine render......OK

Update: I have figured out that pressing FN+SHIFT+F9 updates the hyperlinks and displays them correctly. So they do work, but I have not been able to figure out why they are "broken" in the first place. My best guess is that opening the document in compatibility mode creates the unexpected and unwanted behaviour.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.