papaja
papaja copied to clipboard
Offer an empty template for expert users
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.
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?
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
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.
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.
I like it, and I'm not particularly concerned about outputting multiple templates - but will respect your design philosophy :)
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")
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?