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

Cite author-only or year-only in LibreOffice integration #7861

Open
mlell opened this issue Jun 29, 2021 · 4 comments
Open

Cite author-only or year-only in LibreOffice integration #7861

mlell opened this issue Jun 29, 2021 · 4 comments

Comments

@mlell
Copy link

mlell commented Jun 29, 2021

Is your suggestion for improvement related to a problem? Please describe.
Because my boss and collaborators are used to Word and it's change-tracking features, I am also stuck with it. Nevertheless, I use JabRef for my citations (in an ODT document that is then converted to DOCX before sending it around). It works fairly well, but there is the problem that it does not suppport every use-case I need for citations:

  1. "this is so (Doe, 2003)" --> ✓ SUPPORTED
  2. "this is so as seen in Doe (2003)" --> ✓ SUPPORTED
  3. "this is done with the method of Doe (2004, p. 34) -> ✓ SUPPORTED with the button "Cite special", entering the additional information in the text field
  4. "this is so (for a review see Doe, 2004) -> ✗ NOT SUPPORTED

My workaround is to create a custom Style file that does not have parentheses, so it contains "BracketBefore = """ and "BracketAfter = """. Then I can cover cases 1 and 4, which I use most freqently, but at the expense that cases 3 and 4 are not supported anymore.

I can write the desired format by hand and use "Insert empty citation", but I get into trouble if I have two citations which have the same author-year combination. Because if my text has already citations to (Doe, 2009) and I add another citation with that author-year combinations, all previous citations get (Doe, 2009a) and the new one is (Doe, 2009b). But not for the citations that were inserted with the "Insert empty citation" function!

Describe the solution you'd like
Please make it possible to just cite the author and year separately with JabRef. This would make everything much easier as the author and year names can be embedded in text at wish. At the same time, ambiguities of citations can still be prevented (though I'm not sure that this is implemented in JabRef)

I'm also not the only one with this problem

@Siedlerchr
Copy link
Member

@antalk2 is currently restructuring and improving the code for the Libre Office citation feature, so maybe he has an idea if this could be possible

@antalk2
Copy link
Contributor

antalk2 commented Jun 29, 2021

1. "this is so (Doe, 2003)"  --> ✓ SUPPORTED
2. "this is so as seen in Doe (2003)" --> ✓ SUPPORTED
3. "this is done with the method of Doe (2004, p. 34) -> ✓ SUPPORTED with the button "Cite special",
     entering the additional information in the text field
4. "this is so (for a review see Doe, 2004) -> ✗ NOT SUPPORTED

Background:

  • "(Doe, 2003)" is a special case of "(Doe, 2003a,b; Jones 2004, p. 34)"
    In the code: a group of consecutive citations (those sharing a pair of parentheses): CitationGroup
    Reference to a source + pageInfo : Citation

    When citation marks (the text) are created, within a CitationGroup citations are

    • sorted (either Year-Author-Title or Author-Year-Title)
    • joined (Doe, 2003a,b)
      For individual citations (groups containing a single citation) these have no effect.

invisible citations (available in JabRef)

JabRef supports "invisible citations" which generate no citation marker in the text,
but mark the location (needed when deciding first appearance order) in the text and provide reference to the source (citation key)
so that the corresponding entry can be generated and placed into the bibliography at the right location.

The downside is that "(for a review see Doe, 2004)" (or whatever is needed) has to be typed in and updated by hand.

When would you need to update by hand?

  1. style changes, for example between numeric and author-year, but also punctuation and other formatting
  2. may also need to update without a style change: for example when there are two Doe, 2004 citations to different sources, one
    should become Doe, 2004a, the other Doe, 2004b, based on "first appearance". If the order of citations changes or citations are added or removed, the letters may change.

How could we support the "(for a review see Doe, 2004)" case?

NoParenthesis citations

Besides Parenthesized "(Doe, 2003)", InText "Doe (2003)" and Invisible "", we could have a NoParenthesis "Doe, 2003"
type for citation groups. Marking the JabRef-controlled part with [] ("[" and "]" are not part of the output):

  • Parenthesized : "this is so [(Doe, 2003a,b; p.14; Jones, 2000)]"
  • InText : "this is so as seen in [Doe (2003a,b; p.14); Jones, (2000; p. 26)]"
  • NoParenthesis : "this is so (for a review see [Doe, 2003a,b; p.14; Jones, 2000])"
    • Note: in the example "(" and ")" seem to be part of the text, not the citation mark.
      Switching to a style that uses "[" and "]" probably does not have to change these.
      With "this is so (see [Doe, 2003a,b; p.14; Jones, 2000])" it is more ambiguous.
  • Invisible: "this is so (for a review see Doe, 2003a,b; p.14; Jones, 2000[])"

What does it need?

prefix field for citation groups

Or we might try to control the parentheses and everything in between.

  • "this is so [(PREFIX[Doe, 2003a,b; Jones, 2000; p.14)]" with PREFIX="for a review see "
  • Problem: currently the only way to remove a citation from a group is ("Separate citations", remove, "Merge citations").
    Would be nice to have an alternative that works without breaking up the group. But we do not have it now, and this
    creates a problem: where should the prefix "live" between "Separate" and "Merge"?

citeAuthorsOnly and citeYearPartOnly

Please make it possible to just cite the author and year separately with JabRef.
This would make everything much easier as the author and year names can be embedded in text at wish.

  • "this is so (for a review see [Doe] xxx [2003a; p.14] and [Jones] yyy [2000])"
  • xxx and yyy could be anything (but I do not have a useful example)

At the same time, ambiguities of citations can still be prevented (though I'm not sure that this is implemented in JabRef)

JabRef only implements the 2000a,b,c style disambiguation. This kind of disambiguation seems to be unavoidable
when the same authors have multiple articles in the same year.

This means: "as \citeAuthorsOnly{jones2000} already pointed out in \citeYearPartOnly{jones2000}"
could be expanded to "as Jones et al. already pointed out in 2000b" (the letter "b" might be a surprise)

There are some questions that arise:

  • should we try to recognize \citeAuthorsOnly{jones2000} and \citeYearPartOnly{jones2000} as being parts of the same citation?
    • It would allow warnings like "Year part is missing for this citation"
    • The file content may be ambiguous: how many citations are there in
      "\citeAuthorsOnly{jones2001} in the year \citeYearPartOnly{jones2000} as well as \citeAuthorsOnly{jones2000} \citeYearPartOnly{jones2001}"?
      Some rules might simplify the situation: can we assume citeAuthorsOnly -> citeYearPartOnly order
      with no citations in between? Or "as \citeAuthorsOnly{jones2001}, and later \citeAuthorsOnly{smith2002} pointed out (in \citeYearPartOnly{jones2001} and \citeYearPartOnly{smith2002} respectively) ..." should be allowed?
  • should we allow pageInfo in citeAuthorsOnly?
  • should we allow pageInfo in citeYearPartOnly?
    • I do not know, If not here, where else?
    • On the other hand: "as Jones et al. already pointed out in 2000; p. 14" does not seem useful

How should numeric citation styles handle citeAuthorsOnly and citeYearOnly?

  • "as [1] already pointed out in [1]" is not useful.
  • Otherwise we require numeric styles to say something about how to format these two.
  • Or should we just signal an error (incompatible citation types)?
    • Although JabRef currently does not support changing the type of a citation, if we do ask the user to do that,
      we may need to provide a way to do that. Then: changing from full to partial would lose pageInfo. Or should be disallowed
      if there is a pageInfo attached.

To keep the implementation simple (just two more possible values for CitationType and accepting the consequences):

  • (1) Handle citeAuthorsOnly and citeYearOnly as the others (ignore that they are partial)

  • (2) Allow pageInfo for both, but only (2.1) show for citeYearOnly, not citeAuthorsOnly (2.2)
    (This avoids the conversion problem above: the pageInfo is retained, but not shown.)

  • (3) Although "as [1] already pointed out in [1]" is not useful, it is at least easy to figure out what happened.
    (Still, requires proofreading after a style switch)

  • (4) citeYearOnly includes the uniqueLetter (since we have no other way to keep the reference unique)
    (This is more problematic for the user than pageInfo, because he can remove pageInfo, but not the uniqueLetter:
    may need to rephrase the surrounding text to accomodate)

  • (5) they would not allow grouping (would there be a point in allowing?)
    (There might: "\citeAuthorsOnly{jones2001a,jones2001b} xxx \citeYearPartOnly{jones2001a,jones2001b}"
    for [Jones] xxx [2001a,b]. Hard to tell what "xxx" stands for. Is it a YearSeparator? Let's ignore this)

  • (6) using these allows partial and "broken" citations "\citeAuthorsOnly{jones2001}, \citeYearPartOnly{smith2000}"
    (This is probably not surprising) It is up to the user to ensure that the parts are present and they are combined meaningfully.
    This probably includes cases where the authors or the year are missing from the database entry.

    There is no easy way to examine a citation: for normal citations the citation marker hopefully gives enough
    information to recognize a source. From "Jones" or from "2000" it is not visible that they stand for
    "\citeAuthorsOnly{jones2001} and \citeYearPartOnly{smith2000}" which will make it hard for users to ensure that
    the input is correct.

Of these probably (2.2), (3) and (4) should be mentioned in the user documentation.

So, yes, NoParenthesis, citeAuthorsOnly and citeYearOnly could be implemented, although with some consequences
that might not be apparent for users and in a longer text might stay undiscovered.

The representation in the document can be backward-compatible in the sense that if the new citation types
are not used, then it does not change.


We have buttons "Cite" "Cite in-text" "Insert empty citation".
Three more: how to label? "Cite without parentheses" "Cite authors" "Cite year"?

Maybe: Button: "Cite" + DropdownList: (Citation type: (Author, 2000)" | "Author (2000)" | "Author, 2000" | "Author" | "2000" | "{empty}" )
would be easier to decode while using less space.

@mlell
Copy link
Author

mlell commented Jul 1, 2021

Thank you so much for investing so much thought in this.

Remarks to some of your questions:

Author-only/year-only and numeric styles

Maybe it helps to think about use-cases. One would be a text like

"...as [Doe and Smith] pointed out ([2001a])".

How would this read in numeric style? "[Doe and Smith] pointed out ([1])".
So in that case author-only stays author-only but year-only becomes the citation index.
Disadvantage: That introduces some strange asymmetry which might be surprising to users if not properly documented
Advantage: It allows to switch the citation styles, at least if this use case is the most prevalent one.

Indeed I cannot think of any other use-case where the year should be retained in a numeric citation style. One could think of someone wanting to write something like

As [Doe and Smith] pointed out already in [2001] [1]

... but do we really need a dynamic field to write out the year in that case? If we chose the citation manually, we can also write out the year manually in the text. The advantage that the citation manager gives is disambiguation, so writing more author names if multiple citations begin with the same authors or use the a,b,c,... markers in the year.

GUI

As for the GUI, I think it could go under "Cite special", that's at least where I looked when I tried to find the feature.

@ThiloteE
Copy link
Member

ThiloteE commented Mar 12, 2022

Could you please try the latest Jabref development-build and check if the issue here still is reproducible? It can be found here: https://builds.jabref.org/main/

In the newest build, #7795, mainly authored by @antalk2, was merged. There were some changes related to the Open Office (OO) and Libre Office (LO) integration.

Edit: Antalk2 clarified that this issue here was not addressed in the code that was merged.

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