crsh / papaja

papaja (Preparing APA Journal Articles) is an R package that provides document formats to produce complete APA manuscripts from RMarkdown-files (PDF and Word documents) and helper functions that facilitate reporting statistics, tables, and plots.
https://frederikaust.com/papaja_man/
Other
654 stars 133 forks source link

Quarto journal template #540

Closed mvuorre closed 1 year ago

mvuorre commented 2 years ago

It looks like Quarto is the new kid on the authoring tools block, and poised to replace (?) R Markdown in the future.

It would be awesome to have an APA PDF (& word I guess) Quarto template.

I have also posted this issue on the Quarto journal templates repo: https://github.com/quarto-journals/article-format-template/issues/11, but I am not sure what is a better "home" for this, so am duplicating here.

See also: https://quarto.org/docs/journals/formats.html

crsh commented 2 years ago

Thanks for getting the discussion started, Matti. I do plan on adding a template here. As far as I can tell, to get this to work smoothly, we may need to translate some of our pre- and post-processing to Lua-filters, which is not my strongest skill. However, I would really like to support Quarto (as I like to use it and it may be an avenue to make the template available to Python, Julia, etc.). To decide where to best place this, I need to better understand how document templates in Quarto work. I know I won't get around to this before the end of the year. Anyway, if anyone is interested in helping out with this, any help is much appreciated.

mscharkow commented 2 years ago

I have succeeded somewhat in using the following YAML header to make a good-enough-for-me APA pdf:

---
title: "My article"
author: "Arnold Aardvark"
abstract: |
  This is a very short abstract.
format: 
  pdf:
    documentclass: apa7
    classoption: [man]
    include-in-header: 
      text: |
       \shorttitle{A shorter title}
       \affiliation{Institute of Stuff}

bibliography: references.bib
cite-method: biblatex
biblio-style: apa
---

This fails for more than one author because of the nonstandard way that apa7.csl handles this issue (\authorsnames{} etc.). I spent 10 minutes trying to fix this with some hack, but than my LaTeX PTSD kicked in. Maybe you know a quick fix.

mvuorre commented 2 years ago

Nice, thanks for the update! So this might work with some rather minimal setup provided there's an easy enough fix for authorsnames. I'll investigate :)

crsh commented 2 years ago

So here is a list of pre- and postprocessing steps that papaja currently runs in R that would have to be translated to Lua for "feature-completeness" (which is not a necessary first step, obviously).

crsh commented 1 year ago

For anyone interested in this, @mvuorre has kindly offered to take a first stab at a APA 7th edition format. The plan is as follows: The first step will be to develop a minimal PDF template. I will be adding a word template. After that we will slowly implement additional features available in the papaja template. If you are interested in contributing, testing, or discussion, head over to the qapaja repository.