Search code examples
papaja

Papaja: Vertical Distance Between Paragraphs


Compiling the following RMarkdown document in which I use the doc mode of the apa6 class.

---
linenumbers       : no

documentclass     : "apa6"
classoption       : "doc"
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. 

Next paragraph

leads to enter image description here

Thus, vertical space is added when a new paragraph is started.

I don't want this, and my question is how to prevent it.

Looking into the produced .tex file, I found that papaja modifies \parksip in the latex header.

\@ifundefined{KOMAClassName}{% if non-KOMA class
  \IfFileExists{parskip.sty}{%
    \usepackage{parskip}
  }{% else
    \setlength{\parindent}{0pt}
    \setlength{\parskip}{6pt plus 2pt minus 1pt}}
}{% if KOMA class
  \KOMAoptions{parskip=half}}

Removing this from the .tex produces the desired result:

enter image description here

However, this is, of course, a rather hacky solution. I would much prefer to tell papaja not to modify \parskip. I also don't understand why it is doing this, as it seems to conflict with the APA rules it is trying to implement.


Solution

  • You could use header includes. The following additional lines in your YAML header should yield the desired behavior:

    header-includes:
     - \setlength{\parskip}{0pt}
    

    The code basically overrides the modifications that you described above.