3

I'm relatively new to Latex and Bibtex and I have a question that I haven't been able to find an answer to online.

I have a citation for which I’m using an alias using \defcitealias, \citetalias, etc. and I can use those just fine when the citation is alone. However, when I have multiple citations, I can’t seem to figure out how to use the alias.

So for example, using normal \citep, I have: (Doe et al. 2019, Johnson and Smith 2017, Thompson et al. 2016).

But I’d like to have: (Doe et al., 2019, Johnson and Smith 2017, TMA16).

An example of the code is:

An example using aliases: \citet{Thompson2016}\defcitealias{Thompson2016}{TMA16} (hereafter \citetalias{Thompson2016}), I am unable to use the alias in multiple citations \citep{Doe2019,Johnson2017,Thompson2016}.

I've tried using \citepalias instead of \citep; I've tried using \citepalias INSIDE of \citep; and I've tried using \label. It either doesn't do what I want or it crashes.

I'm doing this for a journal article so I'm restricted to the packages, etc. that are given by the journal (American Meteorological Society, https://www.ametsoc.org/index.cfm/ams/publications/authors/journal-and-bams-authors/latex-author-info/), but I feel like this should be possible.

Here's an example of what I'm trying to do:

\documentclass{article}

\usepackage{natbib}

\begin{document}

An example using aliases: \citet{Thompson2016}\defcitealias{Thompson2016}{TMA16} (hereafter \citetalias{Thompson2016}), I am unable to use the alias in multiple citations \citep{Doe2019,Johnson2017,Thompson2016}. 

\begin{thebibliography}{41}

\bibitem[{Doe(2019)}]{Doe2019}
Doe, J., and O. McDonad, and B. Apple, 2019: \textit{Test title}. Cambridge university
  press, 457 pp. 

\bibitem[{Johnson and Smith(2019)}]{Johnson2017}
Johnson, J., and O. Smith, 2017: \textit{Another test title}. Cambridge university
  press, 457 pp. 

\bibitem[{Thompson(2016)}]{Thompson2016}
Thompson, R., and O. McDonad, and B. Apple, 2016: \textit{Third test title}. Cambridge university
  press, 457 pp.  

  \end{thebibliography}

\end{document}

Can anyone help?

1
  • 1
    Welcome to TeX - LaTeX! Welcome to TeX.SX! Please help us help you and add a minimal working example (MWE) that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass{...} and ending with \end{document}. Apr 10, 2020 at 17:53

1 Answer 1

0

Very late reply, but I found this thread when I stumbled on the same issue. The workaround I found is using \citepalias and creating aliases for the other references too. It's a bit inefficient, but it works.

\defcitealias{Thompson2016}{TMA16}  % defining the required alias
\defcitealias{Doe2019}{Doe et al., 2019}  % defining an alias for the other reference that we want to cite - even though the alias is identical to the default citation.

In this example sentence, we can now cite both correctly \citepalias{Thompson2016, Doe2019}. 

Which reads: "In this example sentence, we can now cite both correctly (TMA16; Doe et al., 2019)."

You would have to define aliases (that are identical to default citation) for all references that co-occur with a non-default alias, and use \citepalias to cite them in text.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .