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

Field label & authoryear style #1400

Open
matteofg opened this issue Nov 25, 2024 · 0 comments
Open

Field label & authoryear style #1400

matteofg opened this issue Nov 25, 2024 · 0 comments

Comments

@matteofg
Copy link

matteofg commented Nov 25, 2024

Currently the label field is used in the verbose-[i]note and authoryear[-ibid][-comp][-icomp] styles.

Concerning authoryear styles, biblatex manual says:

For example, when an author-year citation style is generating a citation for an entry which is missing the author or the year, it may fall back to label.

But this is incorrect, because the label field never replaces the year/date field.
The bibmacros were probably written before the addition of \literal{nodate} as a fallback in DeclareLabeldate.

Obviously, it's not up to me to decide how the label field should interact with various bibliographic styles, but the corresponding bibmacros would certainly need to be modified in one way or another.

However, I think that in authoryear styles the label field should not be used as a fallback of year/date, since:

  • DeclareLabeldate already contains \literal{nodate};
  • the label field would only be displayed in citations and not in the bibliography, which would still be printed with the nodate bibstring: Doe, John (n. d.). «Title of the Article». In: Journaltitle ().

Therefore, in the case of the authoryear style (authoryear.cbx) the bibmacros can be simplified as follows:

\renewbibmacro*{cite}{%
  \iffieldundef{shorthand}
    {\ifnameundef{labelname}
       {\usebibmacro{cite:label}%
        \setunit{\printdelim{nonameyeardelim}}}
       {\printnames{labelname}%
        \setunit{\printdelim{nameyeardelim}}}
     \usebibmacro{cite:labeldate+extradate}}
    {\usebibmacro{cite:shorthand}}}

\renewbibmacro*{citeyear}{%
  \iffieldundef{shorthand}
    {\usebibmacro{cite:labeldate+extradate}}
    {\usebibmacro{cite:shorthand}}}
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

1 participant