Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre- and postprocessors as Lua-filters #549

Open
18 tasks
crsh opened this issue Nov 18, 2022 · 0 comments
Open
18 tasks

Pre- and postprocessors as Lua-filters #549

crsh opened this issue Nov 18, 2022 · 0 comments

Comments

@crsh
Copy link
Owner

crsh commented Nov 18, 2022

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:

PDF

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, but apa6/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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant