Skip to content
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 overhaul #3602

Open
wants to merge 46 commits into
base: master
from

Conversation

Projects
None yet
3 participants
@bwiernik
Copy link
Contributor

bwiernik commented Jul 10, 2018

  • Added support for interviews, archival material, and audiovisual materials
  • Updated the code for the (description) and [format] blocks to accommodate the various item cases and ensure that only one of each gets printed for any given reference

I've done testing, but I need to do more checking still. Is there a good set of test items available to start with to check that all of the conditionals are working? I can make my own test suite, but if there is a good starting set that will save a lot of time.

bwiernik added some commits Jul 7, 2018

APA bug fix
Fixes regression in #3590
Don't show publisher if other access information is available
- Also some other minor changes in preparation of a unified format macro
Allow report to potentially refer to a chapter in a report
- And show translators, etc. for webpages and blogposts
Update APA (description) [format] container
To meet all of the various requirements

Needs testing
Need to check the rules for:
- patent
- treaty
- song
- interview
Update legal_cites, patents, and creators
- Update legal_cites (bill, legal_case, legislation, treaty)
- Update patents
- Add additional creators alongside "author"
@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 10, 2018

Awesome! You just created a pull request to the Citation Styles Language styles repository. One of our human volunteers will try to get in touch soon (usually within a week). In the meantime, I will run some automated checks. You should be notified of the results in a few minutes.

If you haven't done so yet, please make sure your style validates and follows all our other Style Requirements.

To update this pull request, visit the "Files changed" tab above, and click on the pencil icon (see below) in the top-right corner of your style to start editing.

If you have any questions, please leave a comment and we'll get back to you. While we usually respond in English, feel free to write in whatever language you're most comfortable.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 10, 2018

😃 Your submission passed all our automated tests.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Jul 10, 2018

Happy to discuss some of the decisions that had to be made. Specific areas that were challenging were accommodating:

  1. Archival and non-archival manuscripts
  2. Personal communications that are published/available versus not
  3. Reports and songs that have container-titles versus don't

I added a few additional hard-coded strings (marked as in need of localization). Most of them should come up fairly rarely I suspect, but we can consider some alternative options if we want to break localization less until more terms can be added to CSL.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Jul 13, 2018

Question:

Is there any way to get a names element to render multiple creator types together, with the order presented in the item data, rather than separated by creator type? For example, if a book has two authors and an illustrator, then this:
<names variable="author illustrator" delimiter=", ">

Produces:
Author, F., & Author, S., Illustrator, F. (Ill.)

Rather than:
Author, F., Author, S., & Illustrator, F. (Ill.)

I had thought this code would produce the latter output (essentially all of the types inside a single variable command as equivalent. But re-reading the specification, it is clear that it doesn’t. This seems like a major limitation.

At minimum, it seems like there should be a way to specify that and should apply to the full list of creators, rather than to each sub-list. Even in the current APA style, it’s noy possible to correctly format a chapter in a book with both an editor and translator (who are separate people).

@adam3smith

This comment has been minimized.

Copy link
Member

adam3smith commented Jul 13, 2018

No -- every name call (i.e. every creator type) is being handled separately. I have to say that I find the second example really confusing, too, with no way of telling who the (Ill) refers to.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Jul 13, 2018

Here’s a more common example:

If I have a chapter in a book with an editor and a translator (different people), then the existing APA style renders as:
In A. S. Smith (Ed.), T. Jones (Trans.), Book

Rather than with the ampersand:
In A. S. Smith (Ed.) & T. Jones (Trans.), Book

This CSL behavior seems very counter intuitive to me. Particularly frustrating is that and can only be applied to name and not to names, so it is impossible to create continuous lists with multiple creator types. For example, it’s impossible to correctly format editor and translator combinations or to even approach a correct rendering for media creators:
Allen, A. (Director), Berry, B. (Director), & Collins, C. (Producer)

Adjust contributor inclusion and formatting
Including multiple creator types in one names string with consistent delimiter/and/et-al results isn't currently possible in CSL.
@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Jul 13, 2018

(But thanks for the clarification!)

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 13, 2018

😃 Your submission passed all our automated tests.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 13, 2018

😃 Your submission passed all our automated tests.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 13, 2018

😃 Your submission passed all our automated tests.

Adjust names subsitution
`illustrator` currently isn't be rendered at all, probably due to a citeproc-js bug
@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 14, 2018

😃 Your submission passed all our automated tests.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 14, 2018

😃 Your submission passed all our automated tests.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Jul 14, 2018

@adam3smith Okay, I've run through a bunch of tests, and everything is looking good on my end. Once you've had a chance to review, I will port the changes over to the other APA versions.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Jul 14, 2018

😃 Your submission passed all our automated tests.

@adam3smith
Copy link
Member

adam3smith left a comment

Some comments/questions, some things that definitely need fixing. More generally, do you have a test set of references you could share. This change is pretty massive & is going to influence lots of users, it'd be good to have a second pair of eyes on the actual testing rather than just the code.

Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
Show resolved Hide resolved apa.csl Outdated
@adam3smith

This comment has been minimized.

Copy link
Member

adam3smith commented Aug 4, 2018

Oh, and of course thanks for doing this in the first place. (And so far I've only reviewed the APA changes.

Remove short container title from treaty
To avoid triggering the Zotero MEDLINE checkbox
@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Dec 18, 2018

😃 Your submission passed all our automated tests.

@adam3smith

This comment has been minimized.

Copy link
Member

adam3smith commented Dec 18, 2018

re: container titles -- yes, agreed. Since APA relies on bluebook for the legal cites, entering the abbreviations should almost universally work across styles. Beyond that, Zotero would need better abbreviation support to handle this properly.

@adam3smith adam3smith self-assigned this Jan 13, 2019

@adam3smith adam3smith added the pinned label Jan 13, 2019

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Feb 4, 2019

😃 Your submission passed all our automated tests.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Feb 5, 2019

😃 Your submission passed all our automated tests.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Feb 18, 2019

😃 Your submission passed all our automated tests.

bwiernik added some commits Feb 20, 2019

Remove form="long" from Chapter locator
long is the default, and this yields correct formatting when multiple locators are specified with citeproc-js and pandoc-citeproc
Change placement of container-author
Prioritize editor/translator and place container-author in (description) if they are present. APA says that authored books should be cited as a whole, rather than individually as sections, so this priority seems more in line with that.
@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Feb 20, 2019

😃 Your submission passed all our automated tests.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Feb 20, 2019

Update: I've added all of the examples from the APA manual and guide to electronic references to my test library. I've fixed all of the bugs I ran into as I was cleaning those up. I will run through a final check of the 250 items to be sure they all still render correctly.

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Feb 20, 2019

😃 Your submission passed all our automated tests.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Feb 20, 2019

Okay, all 251 items in the test library render correctly, or as correctly as they reasonably can. https://www.zotero.org/groups/2205533/test_items_library

In the library, items that produce output that deviates from the APA manual are tagged with incorrect output. Of those, CSL change indicates changes to CSL that are needed to meet the formatting requirements. weird APA notes places where APA is inconsistent examples or rules that are too difficult to be able to implement effectively.

It should be ready for your review now @adam3smith

@csl-bot

This comment has been minimized.

Copy link

csl-bot commented Feb 20, 2019

😃 Your submission passed all our automated tests.

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Mar 1, 2019

@adam3smith Would it be helpful to schedule a call to talk through this style?

@bwiernik

This comment has been minimized.

Copy link
Contributor Author

bwiernik commented Mar 8, 2019

@agruber reached out and is also interested in helping out here.

@adam3smith

This comment has been minimized.

Copy link
Member

adam3smith commented Mar 12, 2019

This is next up on my list to review. I figured what I'd do is go through this, including with the test library, and flag anything that I think is unreasonable or too fragile (as well, of course, as anything that I think is actually wrong). If there's a lot, jumping on a phone call will probably be most efficient, if there's just a couple of things we can hash them out here for transparency.
Thanks for doing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.