7

I am using XeLaTeX together with biblatex. I am typesetting a table where a citation goes into one of the column headers, namely I put \citet{ref1} into the table.

ref1 has two authors and normally the citation AuthorA and AuthorB (2013) looks fine in the text; however, in the table it is too wide so I was hoping to force biblatex to shorten it to AuthorA et al. (2013).

Is there a way to do that? Note that I do not want to do it document-wide, only within the particular table.

NOTE: Using \citeauthor produces both names.

MWE

\documentclass{article}

\usepackage[style=authoryear-comp, natbib=true, backend=biber, sorting=nyt, autolang=hyphen]{biblatex}

\begin{filecontents}{literature.bib}
@ARTICLE{ref1,
  AUTHOR = {AuthorA, A. and AuthorB, B.},
  JOURNALTITLE = {{Journal of Testing}},
  PAGES = {1--2},
  TITLE = {{Test Reference}},
  VOLUME = 1,
  NUMBER = 1,
  YEAR = 2013
}
\end{filecontents}
\addbibresource{literature.bib}

\begin{document}

\citet{ref1}

\end{document}
lockstep
  • 250,273

2 Answers2

8

If you don't need to have natbib=true then the command \citeauthor* does exactly that.

\documentclass{article}

\usepackage[style=authoryear-comp, backend=biber, sorting=nyt, autolang=hyphen]{biblatex}

\begin{filecontents}{literature.bib}
@ARTICLE{ref1,
  AUTHOR = {AuthorA, A. and AuthorB, B.},
  JOURNALTITLE = {{Journal of Testing}},
  PAGES = {1--2},
  TITLE = {{Test Reference}},
  VOLUME = 1,
  NUMBER = 1,
  YEAR = 2013
}
\end{filecontents}
\addbibresource{literature.bib}

\begin{document}

\citeauthor*{ref1} 

\citeauthor{ref1}

\end{document} 

Output:

enter image description here


EDIT

For what it's worth, I've discovered that with natbib=true and maxcitenames=1

\documentclass{article}

\usepackage[style=authoryear-comp, natbib=true, maxcitenames=1, backend=biber, sorting=nyt, autolang=hyphen]{biblatex}

\begin{filecontents}{literature.bib}
@ARTICLE{ref1,
  AUTHOR = {AuthorA, A. and AuthorB, B.},
  JOURNALTITLE = {{Journal of Testing}},
  PAGES = {1--2},
  TITLE = {{Test Reference}},
  VOLUME = 1,
  NUMBER = 1,
  YEAR = 2013
}
\end{filecontents}
\addbibresource{literature.bib}

\begin{document}

\citeauthor*{ref1}

\citeauthor{ref1}

\end{document}

you get

enter image description here

karlkoeller
  • 124,410
  • Could the part about natbib compatibility impact on the recent 'is there any downside to this option' question? – Joseph Wright Dec 13 '13 at 07:16
  • I upvoted the answer because it would have helped, but unfortunately at this stage into the writing process I can no longer give up natbib commands. – Up-and-coming LaTeX Mastah Dec 13 '13 at 07:59
  • @Up-and-comingLaTeXMastah Thank you. I'll leave the answer, since it could be helpful to someone else. :-) – karlkoeller Dec 13 '13 at 08:14
  • @Joseph Forgive my poor understanding of English, but I really don't know what you mean – karlkoeller Dec 13 '13 at 09:09
  • @karlkoeller In your answer here you say 'If you don't need to have natbib=true', so I wondered if there is a link to http://tex.stackexchange.com/questions/149313/is-there-a-disadvantage-to-using-natbib-true-with-biblatex/149320? – Joseph Wright Dec 13 '13 at 09:33
  • @Joseph I'm not sure about full compatibility. \citeauthor (starred and unstarred version) seems to behave the same way but \citet seems not. – karlkoeller Dec 13 '13 at 12:27
7

The following does the trick:

\AtNextCitekey{\defcounter{maxnames}{1}}\citet{ref1}
Oleg Domanov
  • 1,496