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 sort_OmittedBibRefMixedNumericStyle #28

Open
jgm opened this issue Jun 16, 2020 · 8 comments
Open

Question about sort_OmittedBibRefMixedNumericStyle #28

jgm opened this issue Jun 16, 2020 · 8 comments

Comments

@jgm
Copy link

jgm commented Jun 16, 2020

Something I don't understand here.
The layout is

      <choose>
        <if match="none" type="personal_communication">
          <group delimiter=". ">
            <text variable="citation-number"/>
            <group delimiter=", ">
              <text macro="author" />
              <text variable="title"/>
            </group>
          </group>
        </if>
      </choose>

I would assume that this means that items with type personal_communication produce no output. But oddly, the expected RESULT includes the citation number:

<div class="csl-bib-body">
  <div class="csl-entry">1. Anderson, Book One</div>
  <div class="csl-entry">2. [CSL STYLE ERROR: reference with no printed form.]</div>
  <div class="csl-entry">3. Crane, Book Two</div>
</div>

See the 2. in the second entry. Why?
(Edit: the second entry has type personal_communication.)

@jgm jgm changed the title Question about test/csl/sort_OmittedBibRefMixedNumericStyle.txt Question about sort_OmittedBibRefMixedNumericStyle.txt Jun 16, 2020
@jgm jgm changed the title Question about sort_OmittedBibRefMixedNumericStyle.txt Question about sort_OmittedBibRefMixedNumericStyle Jun 16, 2020
@bdarcus
Copy link
Member

bdarcus commented Jun 17, 2020

I agree that looks wrong, and that the 2 div shouldn't be there (right?).

Only thing I can think of that would explain is if we're missing some spec language that would allow unprinted references?

Can @adam3smith or @fbennett confirm?

@adam3smith
Copy link
Member

I think John's question isn't why the <div> element is there, but why it contains the citation number, which is inside the if condition.

I agree that logically this seems wrong. That said, I don't think the behavior for citations without a printed form is currently defined in the specs (right?) and I'm guessing Frank added the citation number for easier identification of the problematic item. I think to proceed we'd first want to specify the no-printed-form behavior (which exists to avoid terrible messes, such as items with invisible citations, bibliographies skipping citations numbers, etc.) and then decide if there should or shouldn't be a special rule for including citation numbers either way or not.

@bdarcus
Copy link
Member

bdarcus commented Jun 17, 2020

So we need language in the spec, ideally for 1.1, that addresses two cases:

  1. nocite (but reference printed in bib)
  2. noref (this one; cite, but no bib entry)

... and then to update this and any related test(s) accordingly?

Right?

@bwiernik
Copy link
Member

Related issue: citation-style-language/documentation#74

I think we would need to handle three cases:

  1. nocite: uncited items that are included in the bibliography (this is pandoc's nocite or if a user used Zotero's Edit Bibliography function to add an uncited item to the bibliography)
  2. "noref": cited items that are excluded from the bibliography using a conditional (this case). This should be allowed as many styles require it.
  3. "citation with no visible form": A cited item for which the citation (not bibliography) is empty. This should return an error. An item appearing in a citation must have some visible output or it can lead to problematic behavior for users, especially for word processor-based applications. This is different from nocite.

@jgm
Copy link
Author

jgm commented Jun 17, 2020

I guess the idea must be that in a numeric style, it would be confusing to omit an item altogether, since then the numbers would not be consecutive (EDIT: and there might be citations that refer to this number). So this is handled by a special case, even though it goes against the strict letter of the spec.

@jgm
Copy link
Author

jgm commented Jun 17, 2020

But in my opinion a better solution would just be to write the style differently:

        <group delimiter=". ">
          <text variable="citation-number"/>
           <choose>
             <if match="none" type="personal_communication">
               <group delimiter=", ">
                 <text macro="author" />
                 <text variable="title"/>
              </group>
            </if>
          </choose>
        </group>

@bwiernik
Copy link
Member

@jgm See my comments here: citation-style-language/documentation#92

@bwiernik
Copy link
Member

But in my opinion a better solution would just be to write the style differently:

I agree. Issues about processing noref citations aside, this test seems to be written wrong.

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