用四分之一创建DOCX文件时,我可以证明我的文本合理吗?

发布于 2025-01-27 17:08:23 字数 1263 浏览 4 评论 0原文

我已经在R中使用QUARTO几天。

我需要使用合理的文本和新罗马字体生成.docx

要在.rmd文件中辩护,我将< div style =“ text-align:Jusify:Jusify”>在文件的开始,并使用< /div>

但这与QUARTO无法使用。我该如何修复?

另外,如何在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>

I have been using quarto in R for a few days.

I need to generate an .docx with justified text and Times New Roman font.

To justify in .rmd files I put <div style="text-align: justify"> at the begin of the file and close with </div>.

But this is not working with quarto. How can I fix it?

Also, how can I change my main font in quarto?

My code:

---
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>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

jJeQQOZ5 2025-02-03 17:08:23

我只是用 https://quarto.org/output-put-put-put-put-put-put--dup--dput-put--dput-c,格式/ms-word-templates.html

首先,您创建一个参考.docx并定义文档的样式,例如标题,作者,第一段等,

都比在.qmd上添加

format:
  docx:
    reference-doc: custom-reference-doc.docx

I just solved with https://quarto.org/docs/output-formats/ms-word-templates.html

First you create a reference .docx and define the style of your document, like title, author, first paragraph, etc.

Than you add at your .qmd

format:
  docx:
    reference-doc: custom-reference-doc.docx
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文