6

I am looking for a way to always list one specific author in references with many authors, when the number of authors to show is limited and abbreviated by et al.

For example

These are the relevant papers:
\fullcite{paper1}
\fullcite{paper2}

should result in

These are the relevant papers:
Author, A., ..., Alwaysthisauthor, X., ..., et al. 
Buthor, B., ..., Alwaysthisauthor, X., ..., et al.

As requested a minimal example is below:

\documentclass{article}

\usepackage{filecontents}
\usepackage[backend=biber,natbib]{biblatex}

\begin{filecontents}{\jobname.bib}
  @INPROCEEDINGS{2001AIPC..569..163C,
   author = {{Cheshkov}, S. and {Tajima}, T. and {Chiu}, C. and {Breitling}, F. },
    title = "{Emittance control in Laser Wakefield Accelerator}",
booktitle = {American Institute of Physics Conference Series},
     year = 2001,
   volume = 569,
    month = may,
    pages = {163-176},
}

@ARTICLE{2001RScI...72.1339B,
   author = {{Breitling}, F. and {Weigel}, R.~S. and {Downer}, M.~C. and
    {Tajima}, T.},
    title = "{Laser pointing stabilization and control in the 
        submicroradian regime with neural networks}",
  journal = {Review of Scientific Instruments},
     year = 2001,
    month = feb,
   volume = 72,
    pages = {1339-1342},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}
\nocite{*}
\printbibliography
\end{document}

Results in

References

  1. F. Breitling et al. “Laser pointing stabilization and control in the submicro-radian regime with neural networks”. In: Review of Scientific Instruments 72 (Feb. 2001), pp. 1339–1342.

  2. S. Cheshkov et al. “Emittance control in Laser Wakefield Accelerator”. In: American Institute of Physics Conference Series. Vol. 569. May 2001, pp. 163–176.

But I need the name Breitling to always appear explicitly also if the author list is truncated with et al.

  • 1
    Does Excluding one certain author from et al. look like what you are after? You probably will not be able to get the code from the answer working because of the changes in version 3.3, but if that is what you are looking for I can try and adapt the code for versions >=3.3. – moewe Dec 08 '16 at 18:33
  • 2
    Just out of curiosity: Why are you encasing all surnames in curly braces? AFAICT, it adds nothing but code clutter. – Mico Dec 08 '16 at 21:15
  • @Mico This is the way I retrieve the bibtex entries from ADS (see example). I don't know in which situations this is necessary. – Frank Breitling Dec 09 '16 at 10:05
  • @moewe Yes, this seems to be my question. However the title seem misleading since it is more about including than excluding authors. Should we change the title accordingly? If you could update the answer as necessary that would be great! – Frank Breitling Dec 09 '16 at 10:13

1 Answers1

6

The following is adapted for biblatex >= 3.3 from my answer to Excluding one certain author from [et al.].

In order to make this solution work you will need the hash of your name, see Highlight an author in bibliography using biblatex allowing bibliography style to format it for details on how to retrieve the hash for specific names from the .bbl file.

If you wrap your name into braces, the hash for F. {Breitling}/{Breitling}, F. is 3f71afbcde39f096d711d45fa2c17bc7.

\documentclass[british]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=biber, maxnames=999]{biblatex}

\begin{filecontents}{\jobname.bib} @INPROCEEDINGS{cheshkov, author = {{Cheshkov}, S. and {Tajima}, T. and {Chiu}, C. and {Breitling}, F. }, title = "{Emittance control in Laser Wakefield Accelerator}", booktitle = {American Institute of Physics Conference Series}, year = 2001, volume = 569, month = may, pages = {163-176}, } @ARTICLE{breitling, author = {{Breitling}, F. and {Weigel}, R.~S. and {Downer}, M.~C. and {Tajima}, T.}, title = "{Laser pointing stabilization and control in the submicroradian regime with neural networks}", journal = {Review of Scientific Instruments}, year = 2001, month = feb, volume = 72, pages = {1339-1342}, } \end{filecontents} \addbibresource{\jobname.bib} \addbibresource{biblatex-examples.bib}

\newcounter{namesnotimportant} \newtoggle{ellipsis}

\makeatletter \newbibmacro*{name:etal:delim}[1]{% \ifnumgreater{\value{listcount}}{\value{liststart}} {\ifboolexpr{ test {\ifnumless{\value{listcount}}{\value{liststop}}} or test \ifmorenames or test {\ifnumcomp{\value{namesnotimportant}}{>}{0}} } {\printdelim{multinamedelim}} {\lbx@finalnamedelim{#1}}} {}} \makeatother

\DeclareNameFormat{given-family-etal}{% \letbibmacro{name:delim}{name:etal:delim}% \ifnumcomp{\value{listcount}}{=}{1} {\setcounter{namesnotimportant}{0}% \global\toggletrue{ellipsis}} {}% \ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}} or test {\ifnumcomp{\value{listtotal}}{=}{2}}} {\ifgiveninits {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiveni} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}}}% {\iffieldequalstr{hash}{3f71afbcde39f096d711d45fa2c17bc7}%% <----- put the correct hash here {\global\toggletrue{ellipsis}% \ifgiveninits {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiveni} {\namepartprefix} {\namepartsuffix}} {\usebibmacro{name:given-family} {\namepartfamily} {\namepartgiven} {\namepartprefix} {\namepartsuffix}}}% {\stepcounter{namesnotimportant}% \iftoggle{ellipsis} {\addcomma\space\textellipsis\global\togglefalse{ellipsis}\isdot} {}}}% \ifboolexpr{ test {\ifnumequal{\value{listcount}}{\value{liststop}}} and (test \ifmorenames or test {\ifnumcomp{\value{namesnotimportant}}{>}{0}}) } {\andothersdelim\bibstring{andothers}} {}}

\DeclareNameAlias{sortname}{given-family-etal} \DeclareNameAlias{author}{given-family-etal} \DeclareNameAlias{editor}{given-family-etal} \DeclareNameAlias{translator}{given-family-etal}

\begin{document} \nocite{cheshkov,breitling,aksin,worman,nussbaum,geer,sigfridsson} \printbibliography \end{document}

you thus get

reference section of MWE


If you only want this special format for \fullcite, move the four \DeclareNameAlias lines into the pre-code hook of \usedriver in \DeclareCiteCommand{\fullcite} like so

\DeclareCiteCommand{\fullcite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{given-family-etal}%
      \DeclareNameAlias{author}{given-family-etal}%
      \DeclareNameAlias{editor}{given-family-etal}%
      \DeclareNameAlias{translator}{given-family-etal}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

If you want to define a special command for that so that you can use 'normal' \fullcite and the new name format simultaneously, you could define a starred \fullcite* via

\DeclareCiteCommand*{\fullcite}
  {\usebibmacro{prenote}}
  {\usedriver
     {\DeclareNameAlias{sortname}{given-family-etal}%
      \DeclareNameAlias{author}{given-family-etal}%
      \DeclareNameAlias{editor}{given-family-etal}%
      \DeclareNameAlias{translator}{given-family-etal}}
     {\thefield{entrytype}}}
  {\multicitedelim}
  {\usebibmacro{postnote}}

instead.


If you want to 'filter' several names (additionally also, say {Tajima}, T.), you can combine the hash comparisons into one \ifboolexpr. Just use

\ifboolexpr{test {\iffieldequalstr{hash}{f9c1127a739dfe7ad337f89c98aebf51}}
            or 
            test {\iffieldequalstr{hash}{67bbebbc19c3d65d07202eac52047d5e}}}%% <----- put the correct hash here

instead of \iffieldequalstr{hash}{f9c1127a739dfe7ad337f89c98aebf51} in \DeclareNameFormat{given-family-etal}:

\DeclareNameFormat{given-family-etal}{%
  \letbibmacro{name:delim}{name:etal:delim}%
  \ifnumcomp{\value{listcount}}{=}{1}
    {\setcounter{namesnotimportant}{0}%
     \global\toggletrue{ellipsis}}
    {}%
  \ifboolexpr{test {\ifnumcomp{\value{listcount}}{=}{1}}
              or test {\ifnumcomp{\value{listtotal}}{=}{2}}}
    {\ifgiveninits
      {\usebibmacro{name:given-family}
         {\namepartfamily}
         {\namepartgiveni}
         {\namepartprefix}
         {\namepartsuffix}}
      {\usebibmacro{name:given-family}
         {\namepartfamily}
         {\namepartgiven}
         {\namepartprefix}
         {\namepartsuffix}}}%
    {\ifboolexpr{test {\iffieldequalstr{hash}{f9c1127a739dfe7ad337f89c98aebf51}}
                 or 
                 test {\iffieldequalstr{hash}{67bbebbc19c3d65d07202eac52047d5e}}}%% <----- put the correct hash here
      {\global\toggletrue{ellipsis}%
       \ifgiveninits
        {\usebibmacro{name:given-family}
           {\namepartfamily}
           {\namepartgiveni}
           {\namepartprefix}
           {\namepartsuffix}}
        {\usebibmacro{name:given-family}
           {\namepartfamily}
           {\namepartgiven}
           {\namepartprefix}
           {\namepartsuffix}}}%
      {\stepcounter{namesnotimportant}%
       \iftoggle{ellipsis}
         {\addcomma\space\textellipsis\global\togglefalse{ellipsis}\isdot}
         {}}}%
  \ifboolexpr{
    test {\ifnumequal{\value{listcount}}{\value{liststop}}}
    and
    (test \ifmorenames
     or test {\ifnumcomp{\value{namesnotimportant}}{>}{0}})
  }
    {\andothersdelim\bibstring{andothers}}
    {}}
moewe
  • 175,683
  • I am also wondering if it is possible to switch back and forth between this new formatting and the default? – Frank Breitling Dec 09 '16 at 17:43
  • @FrankBreitling If your version is from around October 2014 it is way older than version 3.3, in that case you can try to get the code in the other answer running. But it might be that that doesn't even work because your biblatex is really old (certainly more than two years now). – moewe Dec 09 '16 at 18:12
  • @FrankBreitling I'm not sure what you mean by 'switch back and forth'. The new name format is really only enabled by the four \DeclareNameAlias lines. If you comment these out, you get the standard format, if you uncomment them you get the new format. – moewe Dec 09 '16 at 18:13
  • Sorry, this was my mistake. It wasn't testing, but still stable. That's why the package was so old. Now it works! I will remove my first comment. How can I check my biblatex version? – Frank Breitling Dec 09 '16 at 20:17
  • I mean if it is possible to use for example \fullcite{} at one part of the document and obtain this new reference format and later obtain the bibliography with the default format. – Frank Breitling Dec 09 '16 at 20:22
  • That's great! And can I also always show two names like Breitling and Tajima for example? – Frank Breitling Dec 10 '16 at 10:53
  • I have modified your example to a macro which I can then load with \input{} if you agree. – Frank Breitling Dec 14 '16 at 14:36
  • Can you also tell me how to make it work with \DeclareNameAlias{sortname}{last-first} which I was using? – Frank Breitling Dec 14 '16 at 14:38
  • @FrankBreitling, The edit you proposed made the MWE not compilable, that is: copy/pasting it won't work. Saving big chunks of code in separate files is a great practice to get organized, but here it's kinda problematic. If you still wish to edit the question, use another \begin{filecontents}{file.ext}...\end{filecontents} to make the .tex file (then the code will be compilable. :) – Guilherme Zanotelli Dec 14 '16 at 14:51
  • @GuilhermeZanotelli Ok, then how can I revert it? – Frank Breitling Dec 14 '16 at 15:09
  • @FrankBreitling, no Need to, it's being revised, most likely it won't be approved (I rejected it at least) you can suggest another edit on top of it, I think. If not, Access the edits tab from this question and try to delete the edit or "rollback". – Guilherme Zanotelli Dec 14 '16 at 15:11
  • How can I redefine my fullcite command if I have \usepackage[backend=biber,natbib,style=authoryear,dashed=fal‌​se,maxbibnames=3,min‌​bibnames=3,maxcitena‌​mes=3,uniquelist=fal‌​se,maxalphanames=1,l‌​abelalpha,sorting=an‌​yt,doi=true,isbn=fal‌​se,url=false,eprint=‌​true]{biblatex} in my preamble which I need for the bibliography. – Frank Breitling Dec 15 '16 at 15:12
  • @moewe I can't reproduce this solution under TeX Live 2019 or 2020. The ellipses are dropped before the hashed author.

    F. Breitling et al. (Feb. 2001). ‘Laser pointing stabilization and control in the submicroradian regime with neural networks’. In: Review of Scientific In- struments 72, pp. 1339–1342. S. Cheshkov and F. Breitling et al. (May 2001). ‘Emittance control in Laser Wakefield Accelerator’. In: American Institute of Physics Conference Series. Vol. 569, pp. 163–176.

    – CatThatKilledCuriosity Oct 01 '20 at 08:33
  • 1
    @CatThatKilledCuriosity A while ago biblatex introduced some grouping in the name formats. You'll need a few \globals now. See the edit, please. – moewe Oct 01 '20 at 10:21
  • The proposed answer, although great, does not seem to work properly with biblatex loading options sorting=none and maxnames=999: using these returns the reference list with "et al." for each entry after the first occurrence of the ellipsis print, even those with a single author. –  Feb 16 '22 at 16:23
  • @dr_wann Thanks for pointing this out. Does the edited solution work better for you? – moewe Feb 17 '22 at 16:55
  • This is great! Is there a way to alternate between using the style and not using it if I use \nocite{*} e.g. through a keyword or anything in the .bib file? – Robin Schmidt Mar 10 '22 at 10:50
  • Also, it would be cool if there was an option to still specify the amount of authors to display normally before switching to "et al." since now this is set to maxnames=999 to parse all of them I think. – Robin Schmidt Mar 10 '22 at 10:54