papaja icon indicating copy to clipboard operation
papaja copied to clipboard

Offer an empty template for expert users

Open cjvanlissa opened this issue 4 years ago • 7 comments

One of the things I loved about papaja when I started was the elaborate, pre-filled template. It really showed off all features.

Now that I'm more experienced, I wonder if it would be possible to also have a bare-bones version for expert users? One that I can populate myself?

Should be a very easy implementation; just wondering if it would have added value.

cjvanlissa avatar May 20 '20 08:05 cjvanlissa

Hi Caspar, I like the idea. I how to best implement this. Adding an "alternative" template to the R Markdown menu seems a little excessive, no?

What do you think should be included in the minimal template?

crsh avatar May 24 '20 11:05 crsh

E.g.,

---
title             : "The title"
shorttitle        : "Title"

author: 
  - name          : "First Author"
    affiliation   : "1"
    corresponding : yes    # Define only one corresponding author
    address       : "Postal address"
    email         : "[email protected]"

affiliation:
  - id            : "1"
    institution   : "Wilhelm-Wundt-University"

authornote: |
  Enter author note here.

abstract: |
  Enter abstract here
  
keywords          : "keywords"
wordcount         : "X"

bibliography      : ["r-references.bib"]

floatsintext      : no
figurelist        : no
tablelist         : no
footnotelist      : no
linenumbers       : yes
mask              : no
draft             : no

documentclass     : "apa6"
classoption       : "man"
output            : papaja::apa6_pdf
---

```{r setup, include = FALSE}
library("papaja")
```

## Data analysis
We used `r cite_r("r-references.bib")` for all our analyses.

\newpage

# References
```{r create_r-references}
r_refs(file = "r-references.bib")
```

\begingroup
\setlength{\parindent}{-0.5in}
\setlength{\leftskip}{0.5in}

<div id="refs" custom-style="Bibliography"></div>
\endgroup

cjvanlissa avatar May 24 '20 13:05 cjvanlissa

Maybe some default settings can be stripped too, and I'm in doubt about the references. Right now, most of the remaining text is devoted to getting the refs formatted correctly.

cjvanlissa avatar May 24 '20 13:05 cjvanlissa

I agree about the default settings but I would like to keep the reference-stuff because it's a little tricky to get this right. How about the following:

---
title             : "The title"
shorttitle        : "Title"

author: 
  - name          : "First Author"
    affiliation   : "1"
    corresponding : yes    # Define only one corresponding author
    address       : "Postal address"
    email         : "[email protected]"

affiliation:
  - id            : "1"
    institution   : "Wilhelm-Wundt-University"

abstract: |
  Enter abstract here

authornote: |
  Enter author note here.
  
keywords          : "keywords"
wordcount         : "X"

bibliography      : ["r-references.bib"]

output            : papaja::apa6_pdf
---

```{r setup, include = FALSE}
library("papaja")
```

## Data analysis
We used `r cite_r("r-references.bib")` for all our analyses.

\clearpage

# References
```{r create_r-references}
r_refs(file = "r-references.bib")
```

\begingroup
\setlength{\parindent}{-0.5in}
\setlength{\leftskip}{0.5in}

<div id="refs" custom-style="Bibliography"></div>
\endgroup

There still remains the question of how to make this available to the user. I'm a little hesitant to add another option to the list of formats in the R Markdown menu, because we want to add APA 7th edition soon and with that we would have APA6, APA6 minimal, APA7 and APA7 minimal (plus the revision letter). This seems like a lot. I'll have to think some more about this.

crsh avatar May 26 '20 08:05 crsh

I like it, and I'm not particularly concerned about outputting multiple templates - but will respect your design philosophy :)

cjvanlissa avatar May 26 '20 08:05 cjvanlissa

I agree that it could get a bit crowded if multiple versions of the same template are offered to the user (along with templates from other packages). One solution might be to include an unexported function that users could evoke:

papaja:::apa7_bare_template("manuscript.rmd")

conig avatar Jul 05 '21 23:07 conig

I wouldn't mind adding an exported function as well. This would, however, be a little less user-friendly but may suffice for the use case that @cjvanlissa had in mind?

crsh avatar Jul 06 '21 07:07 crsh