Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
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

APA 7th edition #4419

Merged
merged 64 commits into from Jan 1, 2020
Merged

APA 7th edition #4419

merged 64 commits into from Jan 1, 2020

Conversation

@bwiernik
Copy link
Contributor

bwiernik commented Nov 22, 2019

It's tested against the example items in the manual and the APA Style Blog. References get as close as they can with current CSL.

A few questions:

Technical

  1. APA wants this sort order for dates, how can I achieve that (the current date-sort macro doesn't work).
    • No-date (no issued, no status)
    • issued
    • status
  2. How do I best specify a space before bc/ad terms in dates?

Design decisions

  1. Should I drop editortranslator until it is testable?
    • translator should only occupy the editor position or substitute for author if it is editortranslator, never by itself
  2. Handling genre vs medium?
    • Currently, I assume that all type-like descriptors are in genre
    • E.g., in bracketed for review, interview, personal_communication, song
    • This generally works fine, but Zotero only has "Format" (medium) for Audio Recording (need to indicate "Song" versus "Album")
  3. How to handle testing for is-number="number" to display "No."?
    • Without test problem:
      • Barris, K. (Writer⁠ ⁠&⁠ ⁠Director). (2017, January 11). Lemons (No. Season 3, Episode 12) [TV series episode]. In K. Barris, J. Groff, A. Anderson, E. B. Dobbins, L. Fishburne, & H. Sugland (Executive⁠ ⁠Producers), Black-ish. Wilmore Films; Artists First; Cinema Gypsy Productions; ABC Studios.
    • ~With test problem: ~
    • Currently, I include a test and leave it to users to add "No." to the grant, on the thinking that "Project 5R01HD081252-04" isn't that bad.
  4. Best approximation for archive_collection now?
    • archive_location, archive, archive-place
    • archive (archive_location), archive-place
  5. For book reviews:
    • If genre exists, I assume it takes the form "Review of the film", etc.
    • If no genre, "Review of" is printed instead.
  6. APA wants detailed information regarding original publication information and any corrections or retractions (beyond just original-date that was called for in APA6). This information is conceptually very similar to the citation practices for references in legal citations, so I used that variable for this purpose.

I have separately a list of additional variables, terms, or formatting options needed to fully meet the style needs. I'll post that on Discourse.

bwiernik added 30 commits Aug 8, 2019
Makes maintenance easier
1. Fix et-al counting
1. Drop `publisher` from author `substitute`. Just assume that these are entered as group authors.
And move interview information around a bit
This one is reasonably complete
It's the least elegant macro of the style, but it has to handle the indeterminacy of `genre` and `medium`, as well as specific rules for reviews, interviews, songs, theses, and items with/without containers
APA7 removed cases where it wanted these
@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Dec 23, 2019

  1. You currently check on medium if genre isn't there, right? That seems like the right idea to me

The place where this matters if for things like this:

Album recorded by P. McCartney
Song recorded by P. McCartney
Letter to P. Richardson
Review of the book "Goodnight moon"

So, genre and/or medium would contain "Album", "Song", "Letter", or "Review of the book".

Currently, I am assuming that such information is stored in genre and that medium is only used for describing the medium (e.g., "Photograph", "Tape recording", etc.). I am not currently substituting medium if genre is absent.

I had this thought for three reasons:

  1. It reduces the number and complexity of <choose> elements. For example,
                  <choose>
                    <if variable="number" match="none">
                      <choose>
                        <if variable="genre">
                          <text variable="genre" text-case="capitalize-first"/>
                        </if>
                        <else>
                          <text term="letter" form="short" text-case="capitalize-first"/>
                        </else>
                      </choose>
                    </if>
                  </choose>
                  <text variable="medium" text-case="capitalize-first"/>

instead of

                  <choose>
                    <if variable="number" match="none">
                      <choose>
                        <if variable="genre">
                          <text variable="genre" text-case="capitalize-first"/>
                        </if>
                        <else-if variable="medium">
                          <text variable="medium" text-case="capitalize-first"/>
                        </else-if>
                        <else>
                          <text term="letter" form="short" text-case="capitalize-first"/>
                        </else>
                      </choose>
                    </if>
                    <else>
                      <choose>
                        <if variable="medium">
                          <text variable="medium" text-case="capitalize-first"/>
                        </if>
                        <else>
                          <text term="letter" form="short" text-case="capitalize-first"/>
                        </else>
                      </choose>
                    </else>
                  </choose>
                  <choose>
                    <if variable="genre" match="none">
                      <text variable="medium" text-case="capitalize-first"/>
                    </if>
                  </choose>
  1. For some cases, it permits better style logic. For example, if an interview item doesn't have a specified title or genre, but does specify a medium of "Tape recording" (see example 7 here), the style can produce:

[Interview by C. A. Kiesler; Tape recording]

rather than:

[Tape recording by C. A. Kiesler]

Obviously, the user could enter "Interview" for genre, but permitting the style to generate this if needed seems nice.

  1. Generally, I would like to see more consistent use of genre and medium. Assuming that medium really refers to recording or artistic medium rather than item subtypes seems to encourage good practice?
@adam3smith

This comment has been minimized.

Copy link
Member

adam3smith commented Dec 24, 2019

OK on medium vs. genre -- we can just test this out for a little and if we get a lot of protest, rethink.

See one remaining comment where I think we talked past each other because of where it sits -- otherwise this is as good as I think this is reviewable for me and we should go ahead.

I would like to start a conversation on agreeing to a test-suite for highly complex styles, otherwise these become increasingly impossible to edit.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Dec 24, 2019

😃 Your submission passed all our automated tests.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Dec 24, 2019

😃 Your submission passed all our automated tests.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Dec 24, 2019

I'm reconsidering medium vs genre. It seems likely that users would store "Album", "EP", etc. in Zotero's Format field for Audio Recording.

Regarding test suites, yes, it's been my intention to build one for this style. I was planning on using the 230 test items from the APA manual as a start. Did you have other thoughts on that?
(Sorry for not responding to this one yesterday; ran out of time.)

@adam3smith

This comment has been minimized.

Copy link
Member

adam3smith commented Dec 25, 2019

Regarding test suites, yes, it's been my intention to build one for this style. I was planning on using the 230 test items from the APA manual as a start. Did you have other thoughts on that?
(Sorry for not responding to this one yesterday; ran out of time.)

Yes, that's exactly what I had in mind. Do you have those in the test library already? Otherwise, I wonder if we could somehow pay someone to do this out of CSL funds. Same with Chicago Manual.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Dec 25, 2019

I have the manual items in the test library.

@adam3smith

This comment has been minimized.

Copy link
Member

adam3smith commented Dec 29, 2019

This is gtg from my end -- I'll merge once you tell me the other styles are ready

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Dec 30, 2019

Want to check APA's new official annotated bibliography guidance.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Dec 30, 2019

😟 There are some issues with your submission.

Please check the test report for details.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Dec 30, 2019

😟 There are some issues with your submission.

1 test failed

apa-cv: may not have any unused macros

expected: []
     got: ["citation-locator"]

(compared using ==)

Please check the test report for details.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Dec 31, 2019

😃 Your submission passed all our automated tests.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Dec 31, 2019

Okay, these should be good to go. The only thing I can't accommodate per the manual's annotated bibliography style is that, if the annotations span multiple paragraphs, paragraphs 2+ should be indented. I don't think that's possible in the current CSL spec and is too rare to worry about trying to automate.

@rmzelle

This comment has been minimized.

Copy link
Member

rmzelle commented Jan 1, 2020

(@adam3smith, I'll merge this with some small metadata changes today; I want to e.g. use non-abbreviated "edition" in the style titles and likely restore some original contributors to the style)

@bwiernik, I understand you did a comprehensive rewrite, but unless you started from scratch I prefer to leave the original contributors.

@rmzelle

This comment has been minimized.

Copy link
Member

rmzelle commented Jan 1, 2020

(never mind, this all looks good)

@rmzelle rmzelle merged commit b2fbe15 into citation-style-language:master Jan 1, 2020
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@rmzelle

This comment has been minimized.

Copy link
Member

rmzelle commented Jan 1, 2020

Thanks! 👏 👏 👏 🎆

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Jan 1, 2020

@rmzelle You were the one who deleted the contributors. I am fine with whatever arrangement—the contributors all obviously contributed to the current product.

@bwiernik bwiernik deleted the bwiernik:apa-7 branch Jan 1, 2020
@rmzelle

This comment has been minimized.

Copy link
Member

rmzelle commented Jan 1, 2020

You were the one who deleted the contributors. I am fine with whatever arrangement—the contributors all obviously contributed to the current product.

I forgot we listed the 6th edition as template. We typically delete all authors/contributors that came from the template, so it's good as is.

@POBrien333

This comment has been minimized.

Copy link
Contributor

POBrien333 commented Jan 1, 2020

Congratulations!! Happy to see this merged :)

<title>American Psychological Association 6th edition (annotated bibliography with abstract)</title>
<title-short>APA</title-short>
<title>American Psychological Association 7th edition (annotated bibliography)</title>
<title-short>APA (annotated bibliography)</title-short>

This comment has been minimized.

Copy link
@rmzelle

rmzelle Jan 2, 2020

Member

@bwiernik, did you drop the abstracts on purpose (and if so, why?). See the question at https://forums.zotero.org/discussion/80714/apa-7th-ed-with-annotations.

This comment has been minimized.

Copy link
@bwiernik

bwiernik Jan 3, 2020

Author Contributor

It really feels like an error that abstract was ever used, rather than note/Extra. I think encouraging users to delete proper bibliographic data to store their annotations in Abstract is bad practice. It is also inconsistent with chicago-annotated-bibliography.csl, which uses note. We could revert it, but I would rather take the opportunity to encourage better bibliographic data management. @adam3smith

This comment has been minimized.

Copy link
@bwiernik

bwiernik Jan 3, 2020

Author Contributor

Another option would be to add another variant, apa-annotated-bibliography-with-abstract.csl, that prints both abstract and note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.