`_brand.yml` for docx output

未关闭
#15,381 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript
领域
documentation

调研方向

Read the linked reference-doc.R example to understand how it maps _brand.yml values into a Pandoc reference document. Then trace Quarto’s brand handling and docx format configuration to find where generated or user-provided reference documents are prepared. Done means docx output applies the specified brand fonts and colours, includes the first-page logo, and preserves existing reference document styling; the issue names no Quarto files or tests.

由索引模型根据 Issue 内容生成。

描述

brand docx enhancement

_brand.yml applies to html, dashboard, revealjs and typst, but nothing of it reaches docx: a branded project renders to Word with Pandoc's default fonts, colours and no logo. Getting the same look in Word means writing a reference document by hand and keeping it in sync with the brand.

I hit this while making one bulletin render to HTML, Typst PDF and Word from the same source. I ended up generating the reference document from _brand.yml with a script, starting from Pandoc's default reference.docx:

  • typography.base and typography.headings families as the theme fonts and in the body and heading styles;
  • color.primary for headings, captions and hyperlinks, color.foreground for text;
  • the logo in the first-page header.

source

We could do the same in Quarto: when a project has a brand and the docx format sets no reference-doc, build one from the brand values, and when it sets one, apply the brand fonts and colours on top of it. This would give Word the same starting point as the other formats.

主要语言
JavaScript
星标
6.2k
派生
492
平均合并
15 小时 15 分钟
30 天内合并 PR
94

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

quarto-dev/quarto-cli 的其他 Issue

查看 quarto-dev/quarto-cli 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。