1

My little example is given below:

    \documentclass{article}

    \usepackage[hidelinks]{hyperref}
    \usepackage[sort&compress,numbers]{natbib}
    \setcitestyle{super}
    \newcommand{\citea}[1]{\citeauthor{#1}~\textsuperscript{\cite{#1}}}

    \begin{document}

    For more details,
    please see \citet{efron1996bootstrap,efron2001empirical,efron2004least}.

    For more details,
    please see \citea{efron1996bootstrap,efron2001empirical,efron2004least}.

    \bibliographystyle{unsrtnat}
    \nocite{*}
    \bibliography{efron}

    \end{document}

where the Bibliography file efron.bib is

    @article{efron2004least,
    title={Least angle regression},
    author={Efron, Bradley and Hastie, Trevor and Johnstone, Iain and Tibshirani, Robert},
    journal={The Annals of Statistics},
    volume={32},
    number={2},
    pages={407--499},
    year={2004},
    publisher={Institute of Mathematical Statistics}
    }

    @article{efron2001empirical,
    title={Empirical Bayes analysis of a microarray experiment},
    author={Efron, Bradley and Tibshirani, Robert and Storey, John D and Tusher, Virginia},
    journal={Journal of the American Statistical Association},
    volume={96},
    number={456},
    pages={1151--1160},
    year={2001},
    publisher={Taylor \& Francis}
    }


    @article{efron1996bootstrap,
    title={Bootstrap confidence levels for phylogenetic trees},
    author={Efron, Bradley and Halloran, Elizabeth and Holmes, Susan},
    journal={Proceedings of the National Academy of Sciences},
    volume={93},
    number={23},
    pages={13429--13429},
    year={1996},
    publisher={National Acad Sciences}
    }

I want to show that

Efron et al. $^{[1–3]}$

while the default \citet{} gives unexpected position for commas, and the newly-defined \citea{} gives

Efron et al., Efron et al., Efron et al. $^{[1–3]}$

with multiple not-compact Efron et al..

If we dont want to make it through manually typing as

    For more details,
    please see Efron et al. \cite{efron1996bootstrap,efron2001empirical,efron2004least}.

what can we do by modifying \citet or redefining \citea?

  • Off-topic: You should encase the word Bayes in curly braces to keep it from getting converted to lowercase, i.e., bayes. – Mico May 1 at 9:03
  • Accepted! Thanks for your suggestion! @ Mico – John Stone May 2 at 1:32
2

Something like this?

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{efron.bib}
@article{efron2004least,
title  ={Least angle regression},
author ={Efron, Bradley and Hastie, Trevor and Johnstone, Iain and Tibshirani, Robert},
journal={The Annals of Statistics},
volume ={32},
number ={2},
pages  ={407--499},
year   ={2004},
publisher={Institute of Mathematical Statistics},
}

@article{efron2001empirical,
title  ={Empirical {Bayes} analysis of a microarray experiment},
author ={Efron, Bradley and Tibshirani, Robert and 
        Storey, John D. and Tusher, Virginia},
journal={Journal of the American Statistical Association},
volume ={96},
number ={456},
pages  ={1151--1160},
year   ={2001},
publisher={Taylor \& Francis},
}

@article{efron1996bootstrap,
title  ={Bootstrap confidence levels for phylogenetic trees},
author ={Efron, Bradley and Halloran, Elizabeth and Holmes, Susan},
journal={Proceedings of the National Academy of Sciences},
volume ={93},
number ={23},
pages  ={13429--13429},
year   ={1996},
publisher={National Acad Sciences},
}
\end{filecontents}

\documentclass{article}
\usepackage[sort&compress,super,square]{natbib}
\bibliographystyle{unsrtnat}
\newcommand\citea[2]{\citeauthor{#1}\cite{#2}}

\begin{document}
\citea{efron1996bootstrap}{efron1996bootstrap, efron2001empirical, efron2004least}.
\bibliography{efron}.
\end{document}
  • It is great! Thanks a lot ! @Mico – John Stone May 2 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.