如何进行这两种引用?

如何进行这两种引用?

我读过一篇论文,其中有两种写引用的方式。 在此处输入图片描述

  • Freedman, 1963
  • Diaconis (1988)

第一种是作者和年份之间用逗号隔开,第二种是年份放在括号里。我可以做第二种。你能详细说明一下如何像第一种那样做吗?

\begin{filecontents}{mytestbib.bib}
@book{goossens93,
    author = "Frank Mittelbach and Michel Goossens  and Johannes Braams and David Carlisle  and Chris Rowley",
    title = "The {LaTeX} Companion",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}
@article{neymeyr2018set,
  title={On the set of solutions of the nonnegative matrix factorization problem},
  author={Neymeyr, Klaus and Sawall, Mathias},
  journal={SIAM Journal on Matrix Analysis and Applications},
  volume={39},
  number={2},
  pages={1049--1069},
  year={2018},
  publisher={SIAM}
}
\end{filecontents}
\documentclass{article}
\usepackage{filecontents}
\usepackage[round]{natbib}
\usepackage{bibentry}
\nobibliography*
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=blue,
    citecolor=blue
}

\begin{document}

A full in-text cite of \bibentry{goossens93}.

A regular citation of \cite{neymeyr2018set}.

A new citation of  \cite{goossens93}.

\bibliographystyle{plainnat}
\bibliography{mytestbib}

\end{document}

答案1

您正在寻找\citep

\begin{filecontents}{\jobname.bib}
@book{goossens93,
    author = "Frank Mittelbach and Michel Goossens  and Johannes Braams and David Carlisle  and Chris Rowley",
    title = "The {LaTeX} Companion",
    year = "1993",
    publisher = "Addison-Wesley",
    address = "Reading, Massachusetts"
}
@article{neymeyr2018set,
  title={On the set of solutions of the nonnegative matrix factorization problem},
  author={Neymeyr, Klaus and Sawall, Mathias},
  journal={SIAM Journal on Matrix Analysis and Applications},
  volume={39},
  number={2},
  pages={1049--1069},
  year={2018},
  publisher={SIAM}
}
\end{filecontents}
\documentclass{article}
\usepackage{filecontents}
\usepackage[round]{natbib}
\usepackage{bibentry}
\nobibliography*
\usepackage{hyperref}
\hypersetup{
    colorlinks=true,
    linkcolor=blue,
    filecolor=magenta,      
    urlcolor=blue,
    citecolor=blue
}

\begin{document}

A full in-text cite of \bibentry{goossens93}.

A regular citation of \cite{neymeyr2018set}.

A new citation of  \citep{goossens93}.

\bibliographystyle{plainnat}
\bibliography{\jobname}

\end{document}

在此处输入图片描述

来自natbib手册:

在此处输入图片描述

相关内容