Replies: 4 comments 2 replies
-
FYI, you could try to make an extension to inject what Pandoc/Quarto does not. |
Beta Was this translation helpful? Give feedback.
-
As a workaround based on "officedown" and "officer", I use an include that defines the title page and places the TOC after the title page . Disadvantages -- especially for a larger numbers of files to be changed at once :
The qmd-include refers to custom styles in the reference.docx. You can format the text on the title page using this custom styles as you like. Here's the basic structure of the qmd-include:
|
Beta Was this translation helpful? Give feedback.
-
I tried using the code above, but the my quarto version is ---
format:
docx: default
---
```{r}
#| label: load-officer
#| warning: false
#| message: false
#| echo: false
library(officedown)
library(officer)
```
:::: {.content-visible when-format="docx"}
::: {custom-style="my_title"}
{{< meta title >}}
:::
::: {custom-style="my_subtitle"}
{{< meta subtitle >}}
:::
{{< pagebreak >}}
::: {custom-style="my_TOC_Heading"}
{{< meta toc-title >}}
:::
```{r}
#| label: place-toc-in-Word
#| echo: false
block_toc()
```
{{< pagebreak >}}
::::
## h1
### h2
text. |
Beta Was this translation helpful? Give feedback.
-
@Steinthal Thanks for your help, I understand. |
Beta Was this translation helpful? Give feedback.
-
Are there any plans to support title pages for docx in the near future?
As far as I understand, this is not that straightforward, but since Microsoft Word is still widely used in many (large) companies where customized title pages are a must, this would greatly increase the usability of Quarto outside of academia.
Beta Was this translation helpful? Give feedback.
All reactions