Могу ли я обосновать свой текст при создании файла docx с помощью Quarto?

Я использую в R в течение нескольких дней.

Мне нужно сгенерировать .docxс выравниванием по ширине и шрифтом Times New Roman.

Чтобы оправдать в .rmdфайлы я положил <div style="text-align: justify">в начале файла и закрыть с помощью </div>.

Но с этим не работает. Как я могу это исправить?

Кроме того, как я могу изменить свой основной шрифт в quarto?

Мой код:

      ---
title: "My simple title"
description: | 
  Text proof
author: "My name and ID"
format: 
  docx:
    geometry: 
      - top=30mm
      - left=30mm
editor: visual
---

<div style="text-align: justify"> 

**UNIVERSIDADE DE SÃO PAULO - USP**

-   Program

-   Date: 10/05/2022

-   Subject: Calc

-   Professor: Marcelo 

# Question
**1)** Text textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textText textxt textText textText textText textText textText textText textText textText textText textText textText textText textxt textText textText textText textText textText textText textText textText textText textText textText textText text

</div>

1 ответ

Я только что решил с https://quarto.org/docs/output-formats/ms-word-templates.html

Сначала вы создаете справочный файл .docx и определяете стиль своего документа, например заголовок, автора, первый абзац и т. д.

Чем вы добавляете в свой .qmd

      format:
  docx:
    reference-doc: custom-reference-doc.docx
Другие вопросы по тегам