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

Question about collapse_YearSuffixCollapseNoYearSuffixDelimiter.txt #39

Open
jgm opened this issue Sep 3, 2020 · 3 comments
Open

Question about collapse_YearSuffixCollapseNoYearSuffixDelimiter.txt #39

jgm opened this issue Sep 3, 2020 · 3 comments
Assignees

Comments

@jgm
Copy link

jgm commented Sep 3, 2020

This style seems to be defaulting for cite-group-delimiter to the delimiter on the layout, instead of to ", " as the spec says:

cite-group-delimiter
Activates cite grouping and specifies the delimiter for cites within a cite group. Defaults to “, ”. E.g. with delimiter on cs:layout in cs:citation set to “; ”, collapse set to “year”, and cite-group-delimiter set to “,”, citations look like “(Doe 1999,2001; Jones 2000)”.

We have

  <citation
         collapse="year-suffix-ranged"
         disambiguate-add-year-suffix="true">
    <layout delimiter=";">
      <group delimiter=" ">
        <names variable="author">
          <name form="short" />
        </names>
        <date variable="issued">
          <date-part name="year" />
        </date>
      </group>
      <text variable="year-suffix" />
    </layout>
  </citation>

Note that no cite-group-delimiter is set explicitly. However, the expected result is

Smith 2000a–e;2001
Smith 2000a;c–e;2001

instead of what I'd expect from the spec:

Smith 2000a–e, 2001
Smith 2000a;c–e, 2001

Interestingly, if you DO set a cite-group-delimiter on teh citation element in this style, it does replace the semicolon, so it really seems that citeproc-js is not obeying the spec here and is having cite-group-delimiter default to the layout delimiter rather than to a comma+space.

Am I missing something?

@jgm
Copy link
Author

jgm commented Sep 3, 2020

Hm, maybe this is partly a question of whether after-collapse-delimiter or cite-group-delimiter should be used. But either way there seems to be a problem with citeproc-js, because when we explicitly specify a cite-group-delimiter it is used instead of ", " in teh above case.

@bdarcus
Copy link
Member

bdarcus commented Sep 6, 2020

I've assigned this to Frank and Sebastian, and copying @cormacrelf if he has any thoughts.

@fbennett
Copy link
Member

fbennett commented Sep 6, 2020

I think you're right about citeproc-js using the wrong default delimiter around cite groups, but (inside the processor) that's not the immediate cause of the behavior in this test. As currently coded, citeproc-js does not perform citation grouping unless there is a cs:sort element under cs:citation (recently discussed here: #36 (comment)). Accounting for that (whether good or bad), though, the output should change to use ", " around groups when a sort node is added, and it doesn't.

(Separately, I'm not sure how "group" is defined in this case, but setting that aside...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants