`natbib` option: `\citetalias` cannot be used in `\citet`
I don't call this a "bug" but it would be nice if \citet[\citetalias{mycitekey};][]{mycitekey} worked. I sometimes introduce a short name in the parentheses for the citation:
Smith and Johnson (SM18; 2018) found this and that . . .
To do this, it's most natural to write \citetalias in the first brackets of \citet as indicated above. Of course, you can build the citation using
\citeauthor{mycitekey} (\citealias{mycitekey}; \citeyear{mycitekey})
and you can even write a macro to do this . . .
Below, I paste two self-contained examples. The first one uses biblatex and results in an error "TeX capacity exceeded", perhaps because of a recursion. The second one uses the old BibTeX, which produces the intended result.
Biblatex
\documentclass{article}
\begin{filecontents}[overwrite]{\jobname.bib}
@article{mycitekey,
title = {Title of the article},
author = {Thor, A. U.},
year = {2007},
journal = {Academic Journal},
volume = {123},
number = {4},
pages = {56--78}
}
\end{filecontents}
\usepackage[%
style=authoryear,%
natbib,%
]{biblatex}%
\addbibresource{\jobname.bib}
\defcitealias{mycitekey}{BC87}
\begin{document}
\noindent%
TeX capacity exceeded, sorry [save size=200000]\\
\citet{mycitekey}\\
\citetalias{mycitekey}\\
\citet[\citetalias{mycitekey};][]{mycitekey}
\printbibliography
\end{document}
BibTeX
\documentclass{article}
\begin{filecontents}[overwrite]{\jobname.bib}
@article{mycitekey,
title = {Title of the article},
author = {Thor, A. U.},
year = {2007},
journal = {Academic Journal},
volume = {123},
number = {4},
pages = {56--78}
}
\end{filecontents}
\bibliographystyle{plainnat}
\usepackage[round]{natbib}
\defcitealias{mycitekey}{BC87}
\begin{document}
\noindent%
Works!!!\\
\citet{mycitekey}\\
\citetalias{mycitekey}\\
\citet[\citetalias{mycitekey};][]{mycitekey}
\bibliography{\jobname}
\end{document}
\...cite... commands cannot be nested generally. See for example the explicit error generated by
\documentclass[british]{article}
\usepackage{babel}
\usepackage{csquotes}
\usepackage[style=authoryear, backend=bibtex]{biblatex}
\bibliography{biblatex-examples}
\begin{document}
\autocite[\autocite{worman}]{sigfridsson}
\printbibliography
\end{document}
I don't think we can lift this restriction without a major rewrite.
I see. Thanks for your prompt reply. So, to build the citation for yourself without nesting is the workaround.