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

Ibid. #7

Closed
denismaier opened this issue Sep 8, 2020 · 16 comments
Closed

Ibid. #7

denismaier opened this issue Sep 8, 2020 · 16 comments

Comments

@denismaier
Copy link

I've just gave it a shot with pandoc compiled from the citeproc branch.
This here still doesn't work as expected:

---
csl: chicago-note-bibliography.csl
references:
  - id: test
    title: Test
    author:
      family: Doe
      given: John
---

Test [@test, 12].

Test.^[asdfasdf]

Test [@test, 12].

The second citation still renders with position="ibid". I think it should be subsequent.

(Is this the correct place for this issues? Or should I re-open it at the pandoc issue tracker?)

@jgm
Copy link
Owner

jgm commented Sep 8, 2020

Are you saying it should be subsequent because of the intervening footnote?

That's still something I need to figure out. Currently citeproc only knows about the citations passed in to it, not about other, non-citation notes. I think that's fixable but so far I haven't done it. You can leave this here.

@jgm
Copy link
Owner

jgm commented Sep 9, 2020

I've started to add code to help with this, but looking at the spec, it doesn't say anything about this; it generally talks of distance between citations rather than between notes, and ignores the possibility of notes that occur between citations.

@jgm
Copy link
Owner

jgm commented Sep 9, 2020

With the new code in citeproc branch, I get (plain text output):

Test.[1]

Test.[2]

Test.[3]

Doe, John. “Test,” n.d.

[1] Doe, “Test,” 12.

[2] asdfasdf

[3] Doe, “Test,” 12.

so this seems to be working. But there are still some bugs to iron out.

@denismaier
Copy link
Author

I've started to add code to help with this, but looking at the spec, it doesn't say anything about this; it generally talks of distance between citations rather than between notes, and ignores the possibility of notes that occur between citations.

I'll discuss whether we should add this to the spec.

@jgm
Copy link
Owner

jgm commented Sep 9, 2020

Here's another nice test:

---
csl: ../styles/bioethics.csl
references:
  - id: test
    title: Test
    author:
      family: Doe
      given: John
---

Irrelevant.^[note]

Test [@test, 12].

Test.^[asdfasdf]

Test [@test, 12].

I currently get:

Irrelevant.[1]

Test.[2]

Test.[3]

Test.[4]

[1] note

[2] J. Doe. Test: 12.

[3] asdfasdf

[4] Doe (cited n. 2) : 12.

which looks right. Deleting the asdf note gives you Ibid for the final citation, also right.
Only problem I'm still having is a spurious Ibid. in the current test/command/citeproc-chicago-fullnote-citation.md test.

What's happening there is that citeproc thinks that the last citation to Doe 2005 is a citation with just one item. Well, it is, technically. But this citation occurs in a pandoc footnote with two citations, so probably we don't want an Ibid.

@denismaier
Copy link
Author

denismaier commented Sep 9, 2020

What's happening there is that citeproc thinks that the last citation to Doe 2005 is a citation with just one item. Well, it is, technically. But this citation occurs in a pandoc footnote with two citations, so probably we don't want an Ibid.

Good question what the most reasonable behaviour would be. Different users might want different results...

Maybe a ibid-strictness option could help here... either in CSL or just as a pandoc option. I'll check what citeproc-js does in these cases.

The general issue aside: a mancite command could be used to deal with these edge cases.

@jgm
Copy link
Owner

jgm commented Sep 9, 2020

I think for now I'll keep the current behavior.
I think I have it working well now.

jgm added a commit to jgm/pandoc that referenced this issue Sep 9, 2020
jgm added a commit to jgm/pandoc that referenced this issue Sep 9, 2020
@jgm
Copy link
Owner

jgm commented Sep 9, 2020

I think this is all working now.
Tests added to pandoc.

@jgm jgm closed this as completed Sep 9, 2020
@denismaier
Copy link
Author

denismaier commented Sep 9, 2020

Great. I'll test with the latest dev version.

Ok: Did a first test. Seems to work so far. Thank you!

@denismaier
Copy link
Author

Only problem I'm still having is a spurious Ibid. in the current test/command/citeproc-chicago-fullnote-citation.md test.

What's happening there is that citeproc thinks that the last citation to Doe 2005 is a citation with just one item. Well, it is, technically. But this citation occurs in a pandoc footnote with two citations, so probably we don't want an Ibid.

I couldn't find the test.
Anyway... citeproc-js also produces ibids. if there are two citations in one footnote. I'll open an issue over at the csl schema repo issue tracker to discuss this.

@jgm
Copy link
Owner

jgm commented Sep 9, 2020

I've got pandoc working now for this.
It doesn't produce the ibids in the case mentioned.
The test is in pandoc, by the way.

```
% pandoc -t markdown-citations
---
bibliography: command/biblio.bib
csl: 'command/chicago-fullnote-bibliography.csl'
link-citations: true
---

Pandoc with citeproc-hs
=======================

[@nonexistent]

@nonexistent

@item1 says blah.

@item1 [p. 30] says blah.

@item1 [p. 30, with suffix] says blah.

@item1 [-@item2 p. 30; see also @пункт3] says blah.

In a note.[^1]

A citation group [see @item1 chap. 3; also @пункт3 p. 34-35].

Another one [see @item1 p. 34-35].

And another one in a note.[^2]

Citation with a suffix and locator [@item1 pp. 33, 35-37, and nowhere
else].

Citation with suffix only [@item1 and nowhere else].

Now some modifiers.[^3]

With some markup [*see* @item1 p. **32**].

References {#references .unnumbered}
==========

[^1]: @пункт3 [p. 12] and a citation without locators [@пункт3].

[^2]: Some citations [see @item1 chap. 3; @пункт3; @item2].

[^3]: Like a citation without author: [-@item1], and again
    [-@item1], and now Doe with a locator [-@item2 p. 44].
^D
[WARNING] Citeproc: citation nonexistent not found
Pandoc with citeproc-hs
=======================

[^1]

[^2]

[Doe](#ref-item1)[^3] says blah.

[Doe](#ref-item1)[^4] says blah.

[Doe](#ref-item1)[^5] says blah.

[Doe](#ref-item1)[^6] says blah.

In a note.[^7]

A citation group.[^8]

Another one.[^9]

And another one in a note.[^10]

Citation with a suffix and locator.[^11]

Citation with suffix only.[^12]

Now some modifiers.[^13]

With some markup.[^14]

References {#references .unnumbered}
==========

::: {#refs .references .hanging-indent}
::: {#ref-item2}
Doe, John. "Article." *Journal of Generic Studies* 6 (2006): 33--34.
:::

::: {#ref-item1}
---------. *First Book*. Cambridge: Cambridge University Press, 2005.
:::

::: {#ref-пункт3}
Doe, John, and Jenny Roe. "Why Water Is Wet." In *Third Book*, edited by
Sam Smith. Oxford: Oxford University Press, 2007.
:::
:::

[^1]: [**Nonexistent?**](#ref-nonexistent)

[^2]: [**Nonexistent?**](#ref-nonexistent)

[^3]: [2005](#ref-item1).

[^4]: [Ibid., 30](#ref-item1).

[^5]: [Ibid.](#ref-item1), with suffix.

[^6]: [2005](#ref-item1); [2006, 30](#ref-item2); see also [Doe and
    Roe](#ref-пункт3).

[^7]: [Doe and Roe](#ref-пункт3) ([12](#ref-пункт3)) and a citation
    without locators ([Doe and Roe](#ref-пункт3)).

[^8]: See [Doe, 2005, chap. 3](#ref-item1); also [Doe and Roe,
    34--35](#ref-пункт3).

[^9]: See [Doe, 2005, 34--35](#ref-item1).

[^10]: Some citations (See [ibid., chap. 3](#ref-item1); [Doe and
    Roe](#ref-пункт3); [Doe, 2006](#ref-item2)).

[^11]: [Doe, 2005, 33, 35--37](#ref-item1), and nowhere else.

[^12]: [Doe, 2005](#ref-item1) and nowhere else.

[^13]: Like a citation without author: ([Ibid.](#ref-item1)), and again
    ([Ibid.](#ref-item1)), and now Doe with a locator ([2006,
    44](#ref-item2)).

[^14]: *See* [Doe, 2005, 32](#ref-item1).
```

@jgm
Copy link
Owner

jgm commented Sep 9, 2020

You definitely don't want "ibid" in note 14, as people might think it's a reference to Doe 2006, and would have no way of knowing it's to 2005. So I'm glad pandoc can now achieve that. Note also the ibid within note 13, referring to an earlier citation in the same note. That also is correct, I believe.

@denismaier
Copy link
Author

You definitely don't want "ibid" in note 14, as people might think it's a reference to Doe 2006, and would have no way of knowing it's to 2005. So I'm glad pandoc can now achieve that. Note also the ibid within note 13, referring to an earlier citation in the same note. That also is correct, I believe.

That looks good to me. I also think this is how it should be.

Just two questions regarding note 13 and 14:

  1. Why is the markup around the locator not in the expected result? Shouldn't it be:
    [^14]: *See* [Doe, 2005, **32**](#ref-item1).
    ?

Then: If we change the location of the citations:

Text.[^1]

A citation [see @item1 p. 32].

[^1]: Like a citation without author: [-@item2], and again
    [-@item1], and now Doe with a locator [-@item1 p. 44].

In this case, what is the result? Should there an "ibid." in the second footnote?

@jgm
Copy link
Owner

jgm commented Sep 10, 2020

Why is the markup around the locator not in the expected result?

parseLocator takes the raw suffix and parses it into a locator label, locator text, and the rest.
The locator text is just plain text (and needs to be for stuff like ranges), so we ignore formatting.
There might be a better way, but this seems a rare case anyway.

In this case, what is the result? Should there an "ibid." in the second footnote?

You get this:

Text.[1]

A citation.[2]

Doe, John. “Article.” Journal of Generic Studies 6 (2006): 33–34.

———. First Book. Cambridge: Cambridge University Press, 2005.

[1] Like a citation without author: (“Article,” Journal of Generic
Studies 6 (2006): 33–34), and again (First Book (Cambridge: Cambridge
University Press, 2005)), and now Doe with a locator (Ibid., 44).

[2] See ibid., 32.

I think that's correct too. (Though here one might raise questions.)

By the way, there's something a bit off about capitalization -- Ibid. is sometimes capitalized, sometimes not; I'm having trouble figuring out what rules citeproc-js uses for this kind of thing, just going by the test suite. They don't seem to be documented.

@jgm
Copy link
Owner

jgm commented Sep 10, 2020

Also, the doubled parens in n. 1 are awkward. That's a result of converting a note citation that occurs within a note into a parenthetical. Maybe it would be better to use square brackets? This is a style people should try to avoid, anyway.

@denismaier
Copy link
Author

I think that's correct too. (Though here one might raise questions.)

Correct, yes. But, I remember seeing instructions like: Avoid ibids if they don't refer to a citation only note. (That's why I contemplated having a ibid-strictness setting, or so. But that's perhaps something for later.)

By the way, there's something a bit off about capitalization -- Ibid. is sometimes capitalized, sometimes not; I'm having trouble figuring out what rules citeproc-js uses for this kind of thing, just going by the test suite. They don't seem to be documented.

Hmm, I think it should be capitalized at the beginning of a note or at the beginning of a sentence.

Also, the doubled parens in n. 1 are awkward. That's a result of converting a note citation that occurs within a note into a parenthetical. Maybe it would be better to use square brackets?

At least Chicago require this kind of parentheses-to-brackets-conversion for parentheses inside parentheses. Should work very much like quotation marks inside quotaiton marks. But I've heard it's a language specific thing. While that is common in US English (and German), British English does not seem to require such a conversion.
Just an idea: As this is more general typographic question: Maybe this could be dealt with in Pandoc proper?

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

2 participants