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

如何在papaja生成的PDF中完全取消Running Head?

彻底移除papaja生成PDF中的Running Head解决方案

问题背景

使用papaja撰写手稿并生成PDF时,尝试多种方法仍无法彻底移除Running Head:

  • 注释或删除YAML中的shorttitle字段后,页眉仍自动显示“Running head: SHORT TITLE”
  • 设置classoption: "doc"仅能移除首页的Running Head,后续页面仍存在该内容
  • 用fancyheader包移除正文页眉后,封面的Running Head和页码依然保留

原YAML配置:

---
title             : "The paper title"
# shorttitle        : "running head"

author: 
  - name          : "First Author"
    affiliation   : "1"
  
affiliation:
  - id            : "1"
    institution   : "Department of Science"

floatsintext      : no
figurelist        : yes
tablelist         : no
footnotelist      : no
linenumbers       : no
mask              : no
draft             : no
documentclass     : "apa6"
classoption       : "man, donotrepeattitle" # suppresses title on 1st page of MS
output: papaja::apa6_pdf
---

彻底解决方案

由于papaja基于apa6文档类,需同时覆盖首页和正文的页眉样式,以下是完整的YAML配置:

---
title             : "The paper title"
# shorttitle        : "running head"

author: 
  - name          : "First Author"
    affiliation   : "1"
  
affiliation:
  - id            : "1"
    institution   : "Department of Science"

floatsintext      : no
figurelist        : yes
tablelist         : no
footnotelist      : no
linenumbers       : no
mask              : no
draft             : no
documentclass     : "apa6"
classoption       : "man, donotrepeattitle"
output: papaja::apa6_pdf
header-includes:
  - \usepackage{fancyhdr}
  - \pagestyle{fancy}
  - \fancyhf{} % 清空所有页眉页脚内容
  - \renewcommand{\headrulewidth}{0pt} % 移除页眉分隔线
  - \thispagestyle{fancy} % 强制首页使用fancy样式,覆盖apa6默认的首页页眉设置
---

配置说明

  • \fancyhf{}:彻底清空所有页眉和页脚的内容,包括自动生成的Running Head和页码
  • \renewcommand{\headrulewidth}{0pt}:移除apa6默认的页眉横线
  • \thispagestyle{fancy}:强制首页应用fancy样式,覆盖apa6文档类默认的首页专用页眉设置,确保首页也无Running Head和页码

内容的提问来源于stack exchange,提问作者Emilio M. Bruna

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.15 06:52:58