# Changelog

# Future Version Wishlist

- Implement missing .pdf features
  - Tables in .pdf jou mode should fit automatically.
  - Figure out why text disappears whenever there are too many tables and figures too close together.
- Implement missing .docx features
  - Full control of font, paper size
  - Right-align equation numbers
- Implement missing Typst features
  - Journal format
  - Line numbering
  - Full language option support

# Version 5.0.12

- 2025-10-17
- #139 Fixed `apa-note` problem with Typst. Thanks lalamilalami, jgeller112, and RDutschke!
- #142 Fixed bug where `apa-note` was sometimes being incorrectly interpreted as a list instead of a paragraph. Thanks RDutschke!

# Version 5.0.11

- 2025-08-21
- Added support for the `note` field for pdf in `stu` mode. Thanks choc96208!

# Version 5.0.10

- 2025-08-18
- Fixed spelling errors and a minor bug

# Version 5.0.9

- 2025-08-16
- Fixed bug in citeprocr.lua to allow nocite field to be specified but empty

# Version 5.0.8

- 2025-08-13
- Fixed bug in nocite meta-analytic references with corporate authors.

# Version 5.0.7

- 2025-08-11
- #137 Fixed error for when user does not supply a document mode for apaquarto-pdf documents. Thanks Clemens Brunner!

# Version 5.0.6

- 2025-08-05
- added keep ampersands for narrative citations
- Inserts references if References Header and refs div are omitted

# Version 5.0.5

- 2025-08-02
- 136. Meta-analytic references incorrectly had asterisks if they were also cited in text. This problem is fixed. Also, if a reference header was omitted and there are references, one will added at the end. Thanks lalamilalami for pointing out the problem!
- Paragraph indentation in pdf journal mode was fixed.

# Version 5.0.4

- 2025-06-26
- The `apa-note` code chunk can produce multiple paragraphs using yaml sequences.
- For .pdf and typst, the `first-page` option can set the first page to a different value.

# Version 5.0.3

- 2025-06-09
- #28. Allow section numbering with Quarto’s `number-section` (and `number-depth`) fields. Thanks juho7 for the feature request and to Ladislas Nalborczyk for the solution to the longstanding problem.

# Version 5.0.2

- 2025-05-17
- #130. Implement word count feature. Thanks k-jens

# Version 5.0.1

- 2025-05-11
- New style of specifying appendices with the `#apx-` prefix.
- Older style of making appendices will still work but is deprecated.

# Version 5.0.0

- 2025-05-06
- #75 Set caption width for tables correctly so text fits in column in two-column mode. Thanks Matti Vuorre!

# Version 4.4.3

- 2025-05-05
- #129 Make it possible to cite appendices. Thanks Robert Esposito!

# Version 4.4.2

- 2025-05-04
- Allow markdown formatting in `apa-note` for .pdf documents.

# Version 4.4.1

- 2025-05-03
- #128 Table and figure notes using `apa-note` now translate to the other languages in the .pdf format. Thanks Guilherme Pinto
- Fixed .html level 4 heading bolding problem.
- Upgraded to latest apa.csl format

# Version 4.4.0

- 2025-03-31
- #124 Cross-referencing now works for markdown tables outside of fenced divs. Thanks Clemens Brunner!
- #121 Adding support for subfigures. Thanks Clemens Brunner for the suggestion!

# Version 4.3.16

- 2025-03-30
- #71 Workaround implemented for getting .pdf to allow multi-page tables. Thanks Florian Kohrt!

# Version 4.3.15

- 2025-03-29
- #123 Fixed bug that omitted affiliations in docx, html, and typst output. Thanks Stefany Coxe!

# Version 4.3.14

- 2025-03-16)
- #120 When a table or figure reference is not found, a more informative error is displayed. Thanks Steffen Aasen!

# Version 4.3.13

- 2025-03-15
- #118 Email in correspondence note is displayed as a link. HTML format has additional blank lines before and after Abstract. Thanks Clemens Brunner!
- #119 Allow use of `beforenotespace` code chunk option in .pdf `jou` mode. Thanks Ovande Furtado!

# Version 4.3.12

- 2025-03-07
- #116 Orcid links now work in all formats. Thanks Clemens Brunner!
- #113 The `blank-lines-above-author-note` should work when `author-note` is omitted. Thanks Clemens Brunner!

# Version 4.3.11

- 2025-03-06
- #113 Author note will show author correspondence information if author-note is absent. Thanks Clemens Brunner!
- #115 The `title-block-role-introduction` field now works in apaquarto-pdf. Thanks Clemens Brunner!
- #117 The `papersize` field now works in apaquarto-typst. Thanks Clemens Brunner!

# Version 4.3.10

- 2025-01-26
- #109 Make ORCID have https link instead of http. Thanks Kilian Sander!!
- #107 added table of contents, list of figures, and list of tables to apaquarto-typst. Thanks bsgallih12!
- Implemented Impact Statement. Thanks franfrutos!

# Version 4.3.9

- 2024-12-14
- Removed an unnecessary keyword print command used to debug 4.3.8.
- Made html blockquote text the same color as body text.

# Version 4.3.8

- 2024-12-14
- #102 Let `keywords` field be a string instead of an array

# Version 4.3.7

- 2024-12-14
- #101 Removed indentation from .docx abstract’s first paragraph

# Version 4.3.6

- 2024-11-22
- #98 The `mainfont` option now works for apaquarto-html.

# Version 4.3.5

- 2024-11-22
- #97 Added a `draft-date` option.

# Version 4.3.4

- 2024-09-01
- #85 Fixed longtable counter problem.

# Version 4.3.3

- 2024-07-04
- Fixed `lang` option for abstract. Documented language options that are likely to be used in apaquarto.

# Version 4.3.2

- 2024-06-19
- #76 Fixed bug that failed to account for user-specified terms in `crossref`

# Version 4.3.1

- 2024-05-28
- #72 Fix bug while loading flextable in pdf.
- #73 Fix bug for figure labels with underscores in them.

# Version 4.3.0

- 2024-05-22
- #69 Allow users to set custom margins using Quarto’s `geometry` options.

# Version 4.2.0

- 2024-05-16
- #67 Setting `no-ampersand-parenthetical: true` will replace the ampersand in both parenthetical and narrative (in text) citations.
- Make `link-citations: true` the default. Can be set to `link-citations: false` in YAML.

# Version 4.1.0

- 2024-05-13
- #68 Enable selective suppression of most elements of the title page and abstract page.

# Version 4.0.3

- 2024-05-11
- For apaquarto-typst to run correctly, Quarto 1.5 or greater is required #54. An error message now prompts the user to update Typst.
- Fixed link-citations for pdf #64.
- Fixed rendering of stylized \(\LaTeX\) symbol in docx.
- Updated to most recent version of apa.cls
- Enable codelisting #62

# Version 4.0.2

- 2024-05-01
- For apaquarto-typst to run correctly, Typst version 0.11.0 or greater is required #54. An error message now prompts the user to update Typst.

# Version 4.0.1

- 2024-05-01
- Improvements for typst
  - Render LaTeX logo correctly
  - Implemented NoIndent feature for typst
  - Proper indenting for multi-paragraph abstracts
  - Fixed numbering of tables in appendices
  - Block quote indenting corrected
  - Color links blue
- Fixed bug that reversed `floatsintext` to the opposite of expectations.
- On the remote chance that anyone needs more than 26 appendices, subsequent appendices are AA, AB, AC, …, BA, BB, BC, … AAA, AAB, …

# Version 4.0.0

- 2024-05-01
- Building on mvuorre’s typst template, typst-apaquarto is working. More to come.

# Version 3.5.4

- 2024-04-30
- Fixed many bugs.
- mvuorre contributed a typst template for apaquarto! Not all features are working yet, but typst opens up many possibilities.

# Version 3.5.3

- 2024-04-23
- Abstract in .docx and .html no longer indented

# Version 3.5.2

- 2024-04-20
- Added xpatch package to .pdf to fix appendix bug
- Fixed bug that inserted meta-analysis explanation when nocite was empty
- Fixed placement of references when refs div is omitted.

# Version 3.5.1

- 2024-04-19
- Fixed bug that failed to move all float to the end of the document in .docx and .html

# Version 3.5.0

- 2024-04-12
- Added table of contents for pdf documents #45

# Version 3.4.9

- 2024-04-09
- At mvuorre’s suggestion #41:
  - I moved the example/documentation text out of the template and into a file called `example.qmd`. The new template contains what used to be called `minimal.qmd`.
  - I removed the `apaquarto.Rproj` file, `references.bib`, and `img` folder from being included by the `quarto use template` command.
- Fixed mainfont problem not loading fontspec package in time for .pdf #40
- Fixed bug associated with `` #41
- Fixed bug that occurs when no author note is included.
- Fixed figure numbering bug for markdown figures.

# Version 3.4.8

- 2024-03-30
- Allow the correspondence note to be overridden by setting the `correspondence-note` subfield of the `author-note` field.
- The `meta-analysis` field is now set to `true` by default (and thus does not need to appear in the metadata). If marking studies in the `nocite` field with asterisks is not desired, set the `meta-analysis` field to `false`.

# Version 3.4.7

- 2024-03-29
- Studies included in a meta-analysis are not usually cited in the text but are included in the References section and flagged with an asterisk. When the `meta-analysis` field is set to `true`, citations listed in `nocite` are flagged with an asterisk in References section and a note to that effect is inserted below the References header.

# Version 3.4.6

- 2024-03-22
- Figures and Tables in appendices have prefixes of A, B, C, etc.
- Appendices appear after figures and tables when figures and tables appear at the end of the document.

# Version 3.4.5

- 2024-03-16
- Indent abstract with multiple paragraphs properly
- Title on first page of text is no longer numbered when `number-sections` is `true`
- Remove indent from level 3 headers in .html output

# Version 3.4.4

- 2024-03-10
- `suppress-title-page` option to suppress title page
- Fix author names when specified by given, family, or literal fields
- Fix author subscripts in pdf when affiliations are identical

# Version 3.4.3

- 2024-03-08
- Allow for fonts other than Times in pdf documents.
- Removed the `notimes` and `notxfonts` options for pdf documents. If `mainfont` is not selected, then the `newtx` package will be used.
- Fixed balance of two columns in journal mode for pdf.

# Version 3.4.2

- 2024-03-06
- Fixed .pdf bug when only one author or one affiliation

# Version 3.4.1

- 2024-03-05
- Added “possessive” citations such that `@schneider2024 ['s]` will render as “Schneider’s - 2024)”

# Version 3.4.0

- 2024-03-04
- Implemented language options for internationalization and customization.
- Figures in `jou` mode fit to column width automatically. Can be overridden with `fig-width` or `out-width`.

# Version 3.3.0

- 2024-02-29
- Added better documentation of apaquarto template options
- If mask option is true, remove author names, author affiliations, and author notes from title page.
- Fixed blank spaces above title and author note in .docx
- Numbered lines for .docx
- Support for multiline abstracts
- Many minor fixes

# Version 3.2.3

- 2024-02-19
- Add support for callout boxes in .pdf
- Fixed .pdf line number problem that crept back in somehow yet again #34
- Fixed problem with curly single quote in .docx running header

# Version 3.2.2

- 2024-02-15
- Fixed bug so that tables and figures appear in correct order when `floatsintext` is true.

# Version 3.2.1

- 2024-02-14
- Fixed error when no citations are present #33
- Fixed .pdf line number problem that crept back in somehow #34

# Version 3.2.0

- 2024-02-13
- Added support for masked references. #27

# Version 3.1.0

- 2024-02-09
- The `floatsintext` option now works in docx and html. Setting it to `true`, intermingles text, figures, and tables. Setting it to `false` moves all figures and tables to the end of the document.

# Version 3.0.0

- 2024-01-20

The main goal for version 3 was to do everything with lua filters instead of R. It was quite a journey, but apaquarto is now completely independent of R, which should help folks working with other languages.

## Breaking changes

- The `apafg-` and `apatb-` prefixes are no longer used for figures and tables. Use the standard Quarto prefixes (`fig-` and `tbl-`), as well as the standard quarto referencing syntax (e.g., `@fig-myplot` will reference the `fig-myplot` chunk.).
- The include statement below the metadata is no longer used and must be deleted. An informative error will provide instruction if the include statement remains.

## Improvements

### .docx

- The title page and abstract page are now processed using lua filters instead of R.
- The officer package is no longer required to create a new reference document every time the document is rendered #5 #29. Now, a lua filter looks for the `shorttitle` field in your yaml. If that is not found, the `title` and `subtitle` fields are used instead. The running header is assigned to the `description` field in the quarto metadata. This value will show up in the `Comments` field in the rendered .docx file, which is then inserted into the field box in the header.
- The .docx running header is set with a lua filter and a docx field that draws from the .docx metadata.

### .pdf

- Can number lines #25
- Fixed tightlist error #31
- The jou (journal) mode in .pdf is better supported. There are a few hacky solutions that need a bit of work. #2 #27

# Version 2.0.0

- 2023-11-10
- Many small fixes #15
- Support for markdown tables #9 #21
- Support for .html and .pdf became more solid. #22
- CReditT taxonomy added for author roles. #3

# Version 1.0.0

- 2023-03-05

Initial release. Basic functions worked, but relied on many hacks that I always intended to fix. Mostly just for .docx, but .html and .pdf supported to some degree.

- Most of the title page information was processed in R because I did not understand lua. UPDATE: As of version 3.0.0, all of the R code that used to be inserted, is not longer used. The lua filters take care of everything in the .html and .docx formats.
- Because I did not yet understand lua and Quarto, I processed figures and tables differently in a non-standard way. I wrestled with Quarto, but I could not stop it from formatting the captions the way it wanted to. Finally I gave up and processed them with non-standard syntax and knitr hooks. UPDATE: This was always intended to be a temporary solution. As of version 3.0.0, all non-standard syntax is gone.
- The ability to put simple markdown notes below figures and tables was important to me. The tricky part was to get them to travel with the figures and tables when they were part of floats or when they moved to the end of the document. Many headaches later, it works using the `apa-note` chunk option or `apa-note` as a custom attribute of a fenced div.
- APA level 4 and 5 headings should remain as true headings that appear in the navigation tab in MS Word. Yet they appear as if they are in the same paragraph with subsequent text. This feature was implemented with apaquarto.lua filter that inserts openxml tags in the headers:

    ```openxml
    <w:vanish/><w:specVanish/>
    ```

This creates a Style Separator character that you can see in MS Word by clicking the Show/Hide ¶ button. BTW, the CTRL+ALT+Enter keyboard shortcut in Word will insert a style separator. See https://www.cadmanediting.com/the-style-separator-a-hidden-gem-in-ms-word