diff --git a/_extensions/apaquarto/_extension.yml b/_extensions/apaquarto/_extension.yml index 20737ba..b554295 100644 --- a/_extensions/apaquarto/_extension.yml +++ b/_extensions/apaquarto/_extension.yml @@ -1,6 +1,6 @@ title: My Document in APA Style, Seventh Edition author: W. Joel Schneider -version: 3.4.4 +version: 3.4.5 quarto-required: ">=1.4.549" contributes: formats: diff --git a/_extensions/apaquarto/apa.css b/_extensions/apaquarto/apa.css index c28c239..f9707aa 100644 --- a/_extensions/apaquarto/apa.css +++ b/_extensions/apaquarto/apa.css @@ -83,4 +83,4 @@ blockquote p:nth-child(1) {text-indent: 0} .tabwid {padding: 0} -.Abstract p {text-indent: 0} \ No newline at end of file +.AbstractFirstParagraph p {text-indent: 0} \ No newline at end of file diff --git a/_extensions/apaquarto/apaquarto.docx b/_extensions/apaquarto/apaquarto.docx index 658eff0..e6327ce 100644 Binary files a/_extensions/apaquarto/apaquarto.docx and b/_extensions/apaquarto/apaquarto.docx differ diff --git a/_extensions/apaquarto/docxfrontmatter.lua b/_extensions/apaquarto/docxfrontmatter.lua index 7b1a053..b5fd05b 100644 --- a/_extensions/apaquarto/docxfrontmatter.lua +++ b/_extensions/apaquarto/docxfrontmatter.lua @@ -446,17 +446,39 @@ return { if pandoc.utils.type(meta.apaabstract) == "Blocks" then local abstractdiv = pandoc.Div({}) + local abstractfirstparagraphdiv = pandoc.Div({}) + local abstractlinecounter = 1 meta.apaabstract:walk { LineBlock = function(lb) lb:walk { Inlines = function(el) local lbpara = pandoc.Para(el) - abstractdiv.content:extend({lbpara}) + + if abstractlinecounter == 1 then + abstractfirstparagraphdiv.content:extend({lbpara}) + abstractfirstparagraphdiv.classes:insert("AbstractFirstParagraph") + + else + abstractdiv.content:extend({lbpara}) + if abstractlinecounter == 2 then + abstractdiv.classes:insert("Abstract") + end + + end + + abstractlinecounter = abstractlinecounter + 1 end } end } - body:extend({abstractdiv}) + if abstractlinecounter > 1 then + body:extend({abstractfirstparagraphdiv}) + end + + if abstractlinecounter > 2 then + body:extend({abstractdiv}) + end + end end diff --git a/_extensions/apaquarto/docxstyler.lua b/_extensions/apaquarto/docxstyler.lua index f783a0d..6467cdf 100644 --- a/_extensions/apaquarto/docxstyler.lua +++ b/_extensions/apaquarto/docxstyler.lua @@ -18,6 +18,7 @@ customclasses = { "Author", "AuthorNote", "Abstract", + "AbstractFirstParagraph", "FigureTitle", "FigureNote", "FigureWithNote", diff --git a/changelog.qmd b/changelog.qmd index 2e97a85..cfef64b 100644 --- a/changelog.qmd +++ b/changelog.qmd @@ -12,6 +12,11 @@ engine: knitr - Typst version that would allow for easy customization +# Version 3.4.5 (2024-03-1+) + +- Indent abstract with multiple paragraphs properly +- Title on first page of text is no longer numbered when `number-sections` is `true` + # Version 3.4.4 (2024-03-10) - `supress-title-page` option to suppress title page diff --git a/docs/changelog.html b/docs/changelog.html index 823e215..ff11c5a 100644 --- a/docs/changelog.html +++ b/docs/changelog.html @@ -2,7 +2,7 @@ - + @@ -134,6 +134,7 @@

On this page

+
+

Version 3.4.5 (2024-03-10)

+ +

Version 3.4.4 (2024-03-10)