I have a problem rendering a simple Quarto document to .docx (Word) format. I generated the simplest Quarto document that I can using File > New File > New Quarto Document. That file rendered correctly to .docx. I then added two lines at the end:
{{< pagebreak >}}
# Section title
When the above lines were added at the end, the file rendered to .docx, but Word was unable to load the file, giving the following dialog box:
If the "{{< pagebreak >}}" line is removed, the document correctly renders to .docx, so that is presumably the culprit. Before I lodge a feature report on Quarto, can anyone reproduce the same behaviour? The Quarto code is below. Version information also below.
---
title: "Untitled"
format: docx
---
## Quarto
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
## Running Code
When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
```{r}
1 + 1
You can add options to executable code like this
#| echo: false
2 * 2
The echo: false option disables the printing of code (only output is displayed).
By the way your code works for me perfectly and word opens properly with page break created.
I have got Quarto version 1.3.340 - stable - not pre-release.
Maybe installing current version would be the solution ?
Indeed, that was the problem - the pre-release version of Quarto gave the error, while uninstalling and installing the up-to-date version gives no error. The moral of the story is: be careful with pre-release versions.
I don't know why that pre-release version was installed... Oh yes, now I remember, there was a problem with the current release of Quarto using Julia, which was reported to work with the pre-release version. That's a separate story...