Emilio M. Bruna
Emilio M. Bruna

Reputation: 359

Suppress the Running Head when using papaja?

I am trying to supress the running head on a pdf render of a manuscript written with papaja. Commenting out or deleting the shorttitle from the YAML (see below) both insert "Running head: SHORT TITLE" in the pdf header. Is there a way to completely eliminate it? Rendering as classoption: "doc" removes it from the first page, but not the subsequent pages.

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




# Methods
We report how we determined our sample size, all data exclusions (if any), all manipulations, and all measures in the study. <!-- 21-word solution (Simmons, Nelson & Simonsohn, 2012; retrieved from http://ssrn.com/abstract=2160588) -->

NB: I am aware of this question/answer but it's not a general solution.

EDIT: I figured out how to use package fancyheader to remove from the main document, but the running head and page number remain on the cover page.

header-includes:
  - \usepackage{fancyhdr}
  - \pagestyle{fancy}
  - \fancyhead[L]{}
  - \fancyhead[R]{}

Upvotes: 1

Views: 126

Answers (2)

Emilio M. Bruna
Emilio M. Bruna

Reputation: 359

 header-includes:
  - \usepackage{fancyhdr}
  - \pagestyle{empty}
  - \thispagestyle{empty}

Did the trick.

Upvotes: 1

lib
lib

Reputation: 31

I think when using the fancyhdr package, we need to make sure that both the plain and fancy page styles are accounted for. Because the first page of a document often uses the plain page style by default.

Maybe you can try codes like:

header-includes:
  - \usepackage{fancyhdr}
  - \pagestyle{fancy}
  - \fancyhead{}
  - \renewcommand{\headrulewidth}{0pt}
  - \fancypagestyle{plain}{
      \fancyhead{}
      \renewcommand{\headrulewidth}{0pt}
    }

This code does the following:

  • \pagestyle{fancy} applies the fancy page style to all pages, not just the first one.
  • \fancyhead{} clears all header fields for the fancy page style.
  • \renewcommand{\headrulewidth}{0pt} removes the header line for the fancy page style.
  • \fancypagestyle{plain}{...} redefines the plain page style, which is often used for the first page.
  • Inside this command, \fancyhead{} and \renewcommand{\headrulewidth}{0pt} do the same for the plain page style.

Upvotes: 0

Related Questions