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

Suppress andothers/"et al." #861

Closed
moewew opened this issue Jan 24, 2019 · 37 comments
Closed

Suppress andothers/"et al." #861

moewew opened this issue Jan 24, 2019 · 37 comments
Milestone

Comments

@moewew
Copy link
Collaborator

moewew commented Jan 24, 2019

From time to time there are requests to suppress the "et al." from citation labels (and possibly independently also from the bibliography?). See for example https://tex.stackexchange.com/q/471541/35864, https://tex.stackexchange.com/q/464317/35864, https://tex.stackexchange.com/q/262612/35864

Currently it is not possible to suppress "et al." without possibly destroying unique.../extra... features because Biber's disambiguations take "et al." into account. Would it be possible to add a functionality that allows for the "et al." to be ignored?

I haven't thought through all implications of what that would mean, but it seems sort of conceivable that Biber could just discard the andothers marker for extradate calculations.

Test case

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, backend=biber]{biblatex}

%\DefineBibliographyStrings{english}{andothers={}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{elk,
  author  = {Anne Elk},
  title   = {A Theory on Brontosauruses},
  date    = {1972},
}
@book{elkal,
  author  = {Anne Elk and others},
  title   = {A Theory on Einiosauruses},
  date    = {1972},
}
@book{uthor,
  author  = {Anne Uthor},
  title   = {Title A},
  date    = {2000},
}
@book{uthoral,
  author  = {Anne Uthor and Editha Ditor and William Writer
             and Jane Doe},
  title   = {Stuff B},
  date    = {2000},
}
\end{filecontents}

\addbibresource{\jobname.bib}


\begin{document}
\cite{elk,elkal}

\cite{uthor,uthoral}

\printbibliography
\end{document}

Elk 1972; Elk et al. 1972
Uthor 2000; Uthor et al. 2000
References
Elk, Anne (1972). A Theory on Brontosauruses.
Elk, Anne et al. (1972). A Theory on Einiosauruses.
Uthor, Anne (2000). Title A.
Uthor, Anne et al. (2000). Stuff B.

@hushidong
Copy link

agree, “Biber's disambiguations take no acount of "et al." ”, would be needed sometimes.

@gusbrs
Copy link
Contributor

gusbrs commented Jan 24, 2019

I also haven't thought all the way through this, but my first impression, expressed mildly in the linked answer, is that the outright omission of "et al." leaves the citations/references strictly incomplete. I dare say, wrong. Some indication that the list has been shortened should remain.

There is always one way to achieve this result without breaking unique.../extra... features. Which is to edit the bib file and leave only one name. (Sourcemaps could be used?)

In sum, would it be really the case of, receiving a correct input, biblatex delivers a questionable output?

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

I agree that this is not best practice and I personally wouldn't do it and would advise against it. But I would not go as far as saying that things would come out wrong; as long as it is possible to find the matching entry in the bibliography list more or less easily the citation has done its job. I believe that

Elk 1972a; Elk 1972b
Uthor 2000a; Uthor 2000b
References
Elk, Anne (1972a). A Theory on Brontosauruses.
Elk, Anne et al. (1972b). A Theory on Einiosauruses.
Uthor, Anne (2000a). Title A.
Uthor, Anne et al. (2000b). Stuff B.

would kind of work - even more so if you add the citation label in front of the entries again. It is not a lot worse than, say

Elk 1972; Elk et al. 1972
Uthor 2000; Uthor et al. 2000
References
Elk, Anne (1972). A Theory on Brontosauruses.
Elk, Anne et al. (1972). A Theory on Einiosauruses.
Uthor, Anne (2000). Title A.
Uthor, Anne, Editha Ditor, William Writer and Jane Doe (2000). Stuff B.

That said it is probably not worth spending a lot of time and resources on this, but if there is a simple or straightforward thing Biber could do to make this work, why not include it?

@plk
Copy link
Owner

plk commented Jan 24, 2019

This seems to suggest that this is a cosmetic change and we could just make et al into a macro and let users redefine it to output nothing in biblatex?

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

We can already suppress the output with \DefineBibliographyStrings{english}{andothers={}} as shown in the linked answer or with more complex methods, but that would mess up uniqueness as shown in the first MWE. We need Biber to 'know' that we don't want the "et al." so it can supply additional extradates where necessary. The example above should ideally come out as

Elk 1972a; Elk 1972b
Uthor 2000a; Uthor 2000b

in citations and not as

Elk 1972; Elk 1972
Uthor 2000; Uthor 2000

when we simply suppress the "et al."

@gusbrs
Copy link
Contributor

gusbrs commented Jan 24, 2019

@moewew You do have a point. Though I still think Elk et al. 1972 is different from Elk 1972b.

On a lighter note. Future archaeologists of biblatex will look at this issue and say: "And thus was born citestyle=authoryear-terse."

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

@gusbrs I thought you might say that and I believe you are right.

Of course biblatex-ext has you covered for "authoryear-terse":

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=ext-authoryear-terse, backend=biber]{biblatex}

\addbibresource{biblatex-examples.bib}

\begin{document}
\cite{sigfridsson,worman}

\cite{knuth:ct:b,knuth:ct:c}

\printbibliography
\end{document}

@hushidong
Copy link

some times we may need
Elk 1972a; Elk et al. 1972b
so this feature is needed

@hushidong
Copy link

use the following code

\documentclass{article}

\usepackage[,backend=biber,style=authoryear,maxnames=1,minnames=1,uniquename=false,uniquelist=false]{biblatex}

%\DefineBibliographyStrings{english}{andothers={}}

  \renewbibmacro*{date+extradate}{%
    \iffieldundef{labelyear}
      {}
      {\printtext{%[parens]%这里去掉括号
         \iflabeldateisdate
           {\printdateextra}
           {\printlabeldateextra}}}}%

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{elk,
  author  = {Anne Elk},
  title   = {A Theory on Brontosauruses},
  date    = {1972},
  shorthand ={Elk 1972a}
}
@book{elkal,
  author  = {Anne Elk and others},
  title   = {A Theory on Einiosauruses},
  date    = {1972},
  shorthand ={Elk et al. 1972b}
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\cite{elk,elkal}
\printbibliography
\end{document} 

I get the

default

how can i get :

Elk, Anne 1972a. A Theory on Brontosauruses.
Elk, Anne et al. 1972b. A Theory on Einiosauruses.

in the bibliography, like the label in citation??

@hushidong
Copy link

is it possible to add a new choice for uniquelist option to ignore etal when dealing ambiguity?

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

I was thinking about both explicit and others and maxnames truncations. I guess very few people actually use and others.

@plk
Copy link
Owner

plk commented Jan 24, 2019

I realised that just after I asked it and deleted the comment ...this is essentially about how the name hashes are constructed as this is what determines things like extraname. At the moment, the hash creation is quite complicated and takes account of uniqueness visibility settings and the datamodel nameparts etc. Thinking about it.

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

Naively I would have expected that we would just have to tell Biber to discard its knowledge that the list was truncated. Something like dropping the + in

https://github.com/plk/biber/blob/ceab7b18eb64ec32428908913022cab3e7e2c5a0/lib/Biber/Internals.pm#L142-L145

@plk
Copy link
Owner

plk commented Jan 24, 2019

Yes, I was thinking the same thing - it may be as simple as having an option for that. I will add something to test shortly.

plk added a commit to plk/biber that referenced this issue Jan 24, 2019
@plk
Copy link
Owner

plk commented Jan 24, 2019

Try biblatex/biber 3.13/2.13 dev versions. There is now a new global biblatex option uniqueliststrength. Setting this to weak should do what you need. It essentially weakens the generation of hashes which determine extraname and extradate so that they don't care about name list truncations any more. With uniqueliststrength=weak, you now get:

Elk 1972a; Elk et al 1972b
Uthor 2000a; Uthor et al 2000b

Adding \DefineBibliographyStrings{english}{andothers={}}:

Elk 1972a; Elk 1972b
Uthor 2000a; Uthor 2000b

I haven't comprehensively tested this with other uniqueness settings and it's a fairly isolated change and won't for example, change labelalpha generation.

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

Tested with the version from SourceForge and everything works great so far.

I haven't investigated in more depth what this means for other unique.../extra... features, but I think we should be fine.

It is no great loss that labelalpha does not take the setting into account given that we could set labelalphaothers to empty or use noalphaothers, but I believe that the setting could be added in

https://github.com/plk/biber/blob/ac56f9b8d187019b69983cdd49d376a44293db46/lib/Biber/Internals.pm#L549-L555

so maybe that is worth thinking about to make it feel more complete.

I'd like to look into a possibility of getting a rudimentary version of uniqueliststrength running for BibTeX as well. Can you push the changes to GitHub, so I can start from what you have so far?

@moewew moewew added this to In Progress in biblatex 3.13 Jan 24, 2019
plk added a commit that referenced this issue Jan 24, 2019
@plk
Copy link
Owner

plk commented Jan 24, 2019

Pushed. It's no problem to do this with labelalpha too, as you say, I'd just like to get a sense of a use-case first ...

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

Thank you.

I guess it is a question of aesthetics whether or not one thinks uniqueliststrength should affect alphabetic labels. There is no pressing need for it since the effect can be obtained through different means already. I think I have set \labelalphaothers to empty a few times before, so there is at least some demand for it.

Given that the name of the option is uniqueliststrength and that uniquelist does not affect alphabetic labels I'm currently leaning towards not applying the option to alphabetic labels.

@plk
Copy link
Owner

plk commented Jan 24, 2019

I'm open to changing the option name and generalising it to labelalpha if you think it would be useful.

@moewew
Copy link
Collaborator Author

moewew commented Jan 24, 2019

I really don't know. I'll have a look at the BibTeX side of things and will think about that tonight.

If anyone else has an opinion or use cases, I'd love to hear about it.

@hushidong
Copy link

thank you @plk @moewew very much, this is a very good advance.

@moewew
Copy link
Collaborator Author

moewew commented Jan 25, 2019

Maybe it would make sense to extend the option (or add a new option?) to ignore the "et al." for sorting purposes.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, uniqueliststrength=weak, uniquelist=false, backend=biber]{biblatex}

%\DefineBibliographyStrings{english}{andothers={}}

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{uthor,
  author  = {Anne Uthor},
  title   = {Title B},
  date    = {2000},
}
@book{uthoral,
  author  = {Anne Uthor and Editha Ditor and William Writer
             and Jane Doe},
  title   = {Title A},
  date    = {2000},
}
@book{uthorala,
  author  = {Anne Uthor and Editha Ditor and William Writer
             and Jane Doe},
  title   = {Title C},
  date    = {2000},
}
\end{filecontents}

\addbibresource{\jobname.bib}


\begin{document}
\nocite{*}

\printbibliography
\end{document}

comes out as

Uthor, Anne (2000a). Title B.
Uthor, Anne et al. (2000b). Title A.
— (2000c). Title C.

but it might be more desirable to sort "et al." and non-"et al." works as the same to obtain

Uthor, Anne et al. (2000a). Title A.
Uthor, Anne (2000b). Title B.
Uthor, Anne et al. (2000c). Title C.

This becomes even more apparent if we suppress the "et al." bibstring.

plk added a commit that referenced this issue Jan 26, 2019
plk added a commit to plk/biber that referenced this issue Jan 26, 2019
@plk
Copy link
Owner

plk commented Jan 26, 2019

Since this is basically a modification of what minsortnames does, I have made a new option minsortnamesstrict which defaults to false. Set to true, it ignores truncations for sorting purposes. Please pull 2.13/3.13 to test.

@moewew
Copy link
Collaborator Author

moewew commented Jan 27, 2019

Works well so far. It seems to be possible to get this going with BibTeX as well, so I might commit something for that a bit later. Before I do that there are two things

  • How complicated would it be to make the options available per-type and per-entry and maybe even per-namelist for Biber? (I'm also asking that because I'm looking into the different option levels for More control over date formats #863 and would like to get a feeling for that sort of thing.)
  • The fact that the two options uniqueliststrength and minsortnamesstrict have so different names and different values makes it a bit hard to get my head round what they are doing. I know it is unfair to criticise the names without giving good alternatives, but maybe it would be more natural to mention the "et al." and have them both be booleans (except of course if you expect future extensions): uniquelistetal and sortetal or uniquelistdropetal an sortdropetal...

@plk
Copy link
Owner

plk commented Jan 27, 2019

I agree about the names, they are fairly awful. I will change them and make them both booleans, which is natural here. I also thought a bit about making them more granular, will look at it.

@plk
Copy link
Owner

plk commented Jan 27, 2019

Actually, I think a unified option like namestrunchandling with various values like default, nohash, nosort and nohashnosort etc. I really don't like uniqueliststrength as it in fact can be used when uniquelist=false anyway.

@moewew
Copy link
Collaborator Author

moewew commented Jan 27, 2019

I thought about unifying the options as well, but the issue there is that the number of option value grows exponentially if we want to add a new "aspect".

@plk
Copy link
Owner

plk commented Jan 27, 2019

True but this is relatively limited as there are only limited places where name list truncation impacts .bbl output. On balance, it's cleaner than ugly, disparate options ...

@moewew
Copy link
Collaborator Author

moewew commented Jan 27, 2019

Fair enough. I'd have thought that several options with a unified naming scheme and similar workings would not have been much worse, but if there is no huge risk that we might have to add another 'aspect', the four-valued option might be cleaner.

plk added a commit that referenced this issue Jan 27, 2019
plk added a commit to plk/biber that referenced this issue Jan 27, 2019
@plk
Copy link
Owner

plk commented Jan 27, 2019

I have implemented this - see what you think. I haven't looked at further granularity yet. I uncovered a rather well-hidden bug doing this and as a result, stopped using integers for uniquename and uniquelist in the .bcf. This was a legacy from .aux files and makes the code and .bcf schema less readable.

Option is now 'namestrunchandling` and is in the biblatex doc with examples.

moewew added a commit that referenced this issue Jan 27, 2019
Write the auxiliary -blx.bib file with .bcf version and not .bbl
version. That probably does not matter a lot, but since the -blx.bib
file has a role similar to the .bcf file and implements a subset
of its features, that version seemed more relevant that that of the
.bbl. To get things absolutely right we would need a new version ID,
because the .bcf is more flexible than the -blx.bib. We shall see...
@moewew
Copy link
Collaborator Author

moewew commented Jan 27, 2019

9151350 implements namestrunchandling for BibTeX. For the implementation I split the option into two booleans, because that made the BibTeX-side implementation easier, so I'm still not entirely over the whole "unified option vs. several options" thing, but I'll get used to it eventually.

@plk
Copy link
Owner

plk commented Jan 28, 2019

How about we have three booleans, the same for bibtex/biber:

  • namestrunchash
  • namestruncsort
  • namestrunclabel

where default for all is "false"?

@moewew
Copy link
Collaborator Author

moewew commented Jan 28, 2019

Yes, I guess I'd prefer something like that.

  • I assume namestrunchash and namestruncsort are nohash and nosort in current parlance, but what does namestrunclabel do?
  • Truncate does not immediately make me think of "et al." and more specifically of whether or not "et al." is dropped/ignored (after all, the name list is truncated in all of these settings, the question is just whether or not we take the "et al." into account). Given that all other options use andothers instead of "et al." what do you think of something like
    • hashignoreandothers (andothersignorehash?, ignoreandothershash??)
    • sortignoreandothers (andothersignoresort?, ignoreandotherssort??)

@plk
Copy link
Owner

plk commented Jan 28, 2019

The label variant was for labels but I just realised that there is already noalphaothers for this. So, I suggest:

  • nohashothers
  • nosortothers

?

@moewew
Copy link
Collaborator Author

moewew commented Jan 28, 2019

For me the options would be slightly easier to parse if sort and hash were in first position

  • hashnoothers
  • sortnoothers
    But I'll let you be judge of what sounds more natural. And nosort... has the advantage that other things have nosort in their name already...

moewew added a commit that referenced this issue Jan 28, 2019
Also change a forgotten \ifnumequal for the #861 refactor of uniquelist
and uniquename to \ifdefstrequal
8adf705
plk added a commit that referenced this issue Jan 28, 2019
plk added a commit that referenced this issue Jan 28, 2019
plk added a commit that referenced this issue Jan 28, 2019
plk added a commit to plk/biber that referenced this issue Jan 28, 2019
@plk
Copy link
Owner

plk commented Jan 28, 2019

Since, as you mentioned, there are already no* options, I settled on nohashothers and nosortothers for consistency. These are now implemented down to namelist scope in DEV 2.13/3.13.

@moewew
Copy link
Collaborator Author

moewew commented Jan 28, 2019

Looks very good. BibTeX implementation is at cac7375.

MWE

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}

\usepackage[style=authoryear, nohashothers=true, nosortothers=true, uniquelist=false, backend=biber]{biblatex}

%\DefineBibliographyStrings{english}{andothers={}}


\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@book{uthor,
  author  = {Anne Uthor},
  title   = {Title B},
  date    = {2000},
}
@book{uthoral,
  author  = {Anne Uthor and Editha Ditor and William Writer
             and Jane Doe},
  title   = {Title A},
  date    = {2000},
}
@book{uthorala,
  author  = {Anne Uthor and Editha Ditor and William Writer
             and Jane Doe},
  title   = {Title C},
  date    = {2000},
}
\end{filecontents}

\addbibresource{\jobname.bib}


\begin{document}
\cite{uthor,uthoral,uthorala}

\printbibliography
\end{document}

@moewew moewew moved this from In Progress to Done in biblatex 3.13 Feb 3, 2019
@moewew moewew added this to To Do in biblatex 3.14 Aug 25, 2019
@moewew moewew removed this from To Do in biblatex 3.14 Aug 25, 2019
@moewew moewew closed this as completed Aug 25, 2019
@moewew moewew added this to the v3.13 milestone Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
biblatex 3.13
  
Done
Development

No branches or pull requests

4 participants