无法在标题中使用标题变量:typst和QuartoMarkdown

问题描述 投票:0回答:1

这是我的打字节目:


#show: title-page.with(
$if(title)$
  title: [$title$],
$endif$
$if(author)$
  author: [$author$],
$endif$
$if(date)$
  date: [$date$],
$endif$
$if(params.name)$
  name: [$params.name$],
$endif$
)

我的YAML在四分位数标记文档中出现:

---
title: "A Comprehensive Report"
author: "Report Created by: User"
date: today
params: 
  name: "ABC Student"
format:
  typst:
    template-partials: 
      - typst-template.typ
      - typst-show.typ
    toc: true
    toc-depth: 2
    toc-title: Contents
    toc-indent: 1.5em
    papersize: us-letter
    margin:
      x: 1cm
      y: 1cm
---

我的封面页面,这是我的输出:

Page 1

当您看到的时,“标题”字段在封面页中显示,但没有在标题部分中显示。为什么? Page 2

i通过使用

()

而不是
quarto typst
1个回答
0
投票
.

来解决此问题。


header: [
      #rect(fill: rgb("#20746c"),
    height: 100%,
    width: 100%)
      #smallcaps(title)
    ]


最新问题
© www.soinside.com 2019 - 2025. All rights reserved.