diff --git a/_extensions/apaquarto/frontmatter.lua b/_extensions/apaquarto/frontmatter.lua index e65dc94..6bbebd7 100644 --- a/_extensions/apaquarto/frontmatter.lua +++ b/_extensions/apaquarto/frontmatter.lua @@ -259,7 +259,19 @@ return { if not mask then - body:extend({authordiv}) + body:extend({authordiv}) + end + + if meta["draft-date"] then + draftdate = os.date("%B %d, %Y") + if type(meta["draft-date"]) == "table" then + draftdate = meta["draft-date"] + end + draftdatediv = pandoc.Div({ + pandoc.Para(draftdate) + }) + draftdatediv.classes:insert("Author") + body:extend({draftdatediv}) end local authornoteheadertext = "Author Note" diff --git a/example.qmd b/example.qmd index 611e059..6fdbda6 100644 --- a/example.qmd +++ b/example.qmd @@ -99,6 +99,10 @@ mask: false masked-citations: - schneider2012cattell - schneider2015intelligence +# If true, adds today's date below author affiliations. If text, can be any value. +# This is not standard APA format, but it is convenient. +# Works with docx, html, and typst. +draft-date: false # Language options. See https://quarto.org/docs/authoring/language.html lang: en language: