Skip to content

Commit

Permalink
add draft-date
Browse files Browse the repository at this point in the history
  • Loading branch information
wjschne committed Nov 5, 2024
1 parent c376b2e commit c0eed83
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 13 additions & 1 deletion _extensions/apaquarto/frontmatter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 4 additions & 0 deletions example.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c0eed83

Please sign in to comment.