papaja
papaja copied to clipboard
Pre- and postprocessors as Lua-filters
Building on the avialable resources in the R package papaja, I want to provide a corresponding Quarto journal template. Some pre- and postprocessing is currently done through R. These operations have to be reimplemented as Lua-filters. This will be a welcome improvement that will also benefit the R Markdown format in papaja. The following is currently done in R:
Preprocessor
- [ ] Add filter to replace in-text ampersands after running citeproc
- [ ] Set default CSL
- [ ] Set various template variables and defaults
- [ ] Add
\keywords{}
- [ ] Add wordcount
- [ ] Add raw LaTeX includes
Postprocessor
- [ ] Note is added to the end of the document by Lua filter and needs to be moved to the preamble (why? 😅 )
- [ ] The pandoc default template places
\abstract{}
inside the document environment, butapa6
/apa7
- [ ] Omit empty \abstract{}`
- [ ] Remove pandoc listof...s
- [ ] Prevent (re-)loading of geometry package
- [ ] Apply bookdown post-processors to support additional markdown features
Word
Preprocessor
- [ ] Add filter to replace in-text ampersands after running citeproc
- [ ] Create title page
- [ ] Remove abstract to avoid redundancy introduced by pandoc
- [ ] Apply bookdown markdown processor to reslove cross-references
- [ ] Set default CSL
Postprocessor
- [ ] Add running head (if we can do this in Lua, it would also remove dependencies)
Currently, I think reimplementing the bookdown processors may not be the ideal solution. I currently think it may be best to keep them in papaja for the time being and look for alternative Lua filters for the Quarto template.