You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何移除Quarto Beamer中的‘Section 1’?能否自定义该内容?

移除章节页的「Section X」字样

如果只想保留章节标题,去掉默认的「Section X」标识,可以在Quarto文档的YAML头部添加LaTeX自定义命令,无需外部模板:

---
title: "Markov Chain"
author: "Fariz"
format:
  beamer:
    theme: Boadilla
    colortheme: whale
    header-includes:
      - \AtBeginSection{\frame{\sectionpage}}
      - \renewcommand{\sectionpage}{\centering\Huge\insertsection\par}
---

这段代码通过\renewcommand重定义了Beamer的章节页模板,只渲染章节标题内容,完全去掉编号前缀。

自定义章节页的前缀文本

如果需要将「Section X」替换为自定义内容(比如中文的「第X章」),可以修改重定义命令:

---
title: "Markov Chain"
author: "Fariz"
format:
  beamer:
    theme: Boadilla
    colortheme: whale
    header-includes:
      - \AtBeginSection{\frame{\sectionpage}}
      - \renewcommand{\sectionpage}{\centering\Huge 第\thesection章:\insertsection\par}
---

这样章节页会显示「第1章:Introduction (Ch 4.1)」,你可以根据需求调整前缀文本的格式和内容。

补充说明

  • 上述方法直接在Quarto文档内完成,无需额外创建或引入外部LaTeX模板。
  • 如果完全不需要章节页,可以在YAML中添加section-titles: false,但这会直接取消所有章节的开场页面,不适合需要保留章节标题页的场景。

内容的提问来源于stack exchange,提问作者Fariz Budi Arafat

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.17 10:05:00