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

spec: Add language to handle nocite and noref cases #92

Open
bdarcus opened this issue Jun 17, 2020 · 9 comments
Open

spec: Add language to handle nocite and noref cases #92

bdarcus opened this issue Jun 17, 2020 · 9 comments

Comments

@bdarcus
Copy link
Member

bdarcus commented Jun 17, 2020

please see citation-style-language/test-suite#28

@bwiernik
Copy link
Member

Cross-posted from the other thread:

Related issue: #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.

@bwiernik
Copy link
Member

I think this is all documentation-related clarity and could be handled in 1.0.2. Every processor already has a nocite functionality in it.

@adam3smith
Copy link
Member

Sounds good. One remaining question for me is what we do with the example in the linked test:
If you have no-ref in the bibliography for a numeric styles, what's the desired behavior?

I'm pretty sure rendering

  1. Reference
  2. Reference
    isn't great (which is why I think the test exists)

@bdarcus
Copy link
Member Author

bdarcus commented Jun 17, 2020

One remaining question for me is what we do with the example in the linked test:
If you have no-ref in the bibliography for a numeric styles, what's the desired behavior?

No output in bib, but a number in the text for the citation?

No-ref wouldn't be appropriate for numeric styles; would it?

@bwiernik
Copy link
Member

bwiernik commented Jun 17, 2020

That's a good point. We discussed that issue here: citation-style-language/styles#3005

(@adam3smith I assume that your numbered list was supposed to go 1. then 3., but markdown "fixed" that for you?)

There is a need to be able to cite noref items in numeric styles. A lot of physical science journals with numeric styles require that unpublished data and personal communications be cited parenthetically in text, with no number and no entry in the bibliography. The items in the bibliography should not skip numbers.

What about introducing a variable omit-citation-number that excludes the item from the citation numbering? For example:

<citation>
  <layout>
    <choose>
      <if type="personal_communication">
        <text variable="omit-citation-number"/>
        <group prefix="(" suffix=")" delimiter=" "/>
          <text macro="author-short"/>
          <text macro="date-short"/>
        </group>
      </if>
      <else>
        <text variable="citation-number"/>
      </else>
    </choose>
  </layout>
</citation>

The citation-number variable is then treated as empty for personal_communication items, and they are skipped when assigning numbers to other items.

(Just spitballing here.)

@bwiernik
Copy link
Member

Or perhaps more simply, if an item has no printed form in the bibliography, it automatically isn't assigned a citation-number?

@bdarcus
Copy link
Member Author

bdarcus commented Jun 17, 2020

Strawman start of spec language:

  • All cited items must result in citation and/or bibliographic output.
  • Styles or users may specify that individual items or categories of items have alternate and/or more limited output than the default rules; for example, that are included in the bibliography but not cited (no-cite), or cited but not listed in the bibliography (no-ref).
  • If an item is omitted from the bibliography, it shall not be assigned a citation-number.

What about note styles though?

Also, I still think the second point connects to #71.

@bwiernik
Copy link
Member

My suggestion

  1. All cited items must result in citation output. A cited item producing no citation output shall result in an exception.
  2. Uncited items may be added to the bibliography by providing a nocite array of item ids to the processor. (Wording help needed. This is essentially what citeproc-js and pandoc-citeproc do.)
  3. Cited items may or may not result in bibliography output. Cited items may be removed from a bibliography using choose elements in a style or by providing a noref array of item ids to the processor.
  4. Cited items that produce no bibliography output shall not be assigned a citation-number.

I'm not sure what your thinking about notes is? I think point 1 applies just as well--an item must include output in a note in a note style, otherwise there would be an empty footnote.

I don't understand what your current thinking is regarding #71.

@bdarcus
Copy link
Member Author

bdarcus commented Jun 17, 2020

I don't understand what your current thinking is regarding #71.

I'm still clarifying myself, which is why I've been vague, but here's a stab at an explanation.

High-Level

Both these cases and multi-section bibs involve:

  1. formatting exceptions based on some kind of categorization
  2. these categorizations are a mix of general rules that are defined in styles, and more idiosyncratic ones specific to users

Lower-Level

Both will need a mix of style-based configuration (setting up groups of references based, say, on author, or type), and user-based intervention.

On the latter, for no-cite, a user needs to be able to tag or label a reference as such. Same for multi-section bibs.

Though writing this, it occurs to me I'm a little uncertain whether the above configuration is of the reference (as I wrote), or the citation.

If in latex, I do this:

One sentence \cite{doe19}. Another sentence \nocite{doe19}.

... what happens? It'd be odd to print the first citation, it seems to me, but that's what the code suggests.

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

No branches or pull requests

4 participants