bibtex 無法在乳膠中引用特定條目(作者,標題)嗎?

bibtex 無法在乳膠中引用特定條目(作者,標題)嗎?

我正在研究參考書目。為此有兩種方法,一種是使用 bibtex,另一種是 biber。當我使用 biber 列印參考書目時,它會給我想要的結果。意味著它可以在我的文件中的特定位置列印標題、作者等。但 bibtex 無法做到這一點。使用bibtex,產生了我的參考書目,但是當我用來\citeauthor{is4562000}列印作者姓名時,它顯示“作者?”。我們可以使用 bibtex 列印作者姓名、標題和年份嗎?這是代碼。

demo.bib

@book{is4562000,
  title={Indian Standard Plain and reinforced concrete--code of
  practice (IS 456 : 2000)},
  shorttitle = {IS 456~:~2000},
  author={Cement and Concrete Sectional Committee, CED 2},
  %author={Morrison, Norving,peter},
  journal={New Delhi: },
  year={2000},
  publisher={Bureau of Indian Standards},
}

主要文件

\documentclass[a4paper,10pt]{article}
\usepackage{natbib}
%Includes "References" in the table of contents
%\usepackage[nottoc]{tocbibind}

%Title, date an author of the document
\title{Bibliography management: BibTeX}
\author{Manpreet}

%Begining of the document
\begin{document}
\maketitle
\tableofcontents
\medskip

\section{First Section}
This is bibliography using bibtex \cite{is4562000}\\

\citeauthor{is4562000}

\bibliographystyle{unsrt}
\bibliography{demo}

\end{document}

輸出

在此輸入影像描述

答案1

你犯了兩個錯誤:作者是公司,所以它必須得到一對額外的大括號;第二,圍兜款式不相容natbib,使用unsrtnat

注意該author欄位應該是

author={{Cement and Concrete Sectional Committee, CED 2}},

這是一個完整的範例,我使用它filecontents*只是為了避免破壞我的文件。

\begin{filecontents*}{\jobname.bib}
@book{is4562000,
  title={Indian Standard Plain and reinforced concrete--code of practice (IS 456 : 2000)},
  shorttitle = {IS 456~:~2000},
  author={{Cement and Concrete Sectional Committee, CED 2}},
  journal={New Delhi: },
  year={2000},
  publisher={Bureau of Indian Standards},
}
\end{filecontents*}

\documentclass[a4paper,10pt]{article}
\usepackage{natbib}
%Includes "References" in the table of contents
%\usepackage[nottoc]{tocbibind}

%Title, date an author of the document
\title{Bibliography management: BibTeX}
\author{Manpreet}

%Begining of the document
\begin{document}
\maketitle
\tableofcontents
\medskip

\section{First Section}
This is bibliography using bibtex \cite{is4562000}

\citeauthor{is4562000}

\bibliographystyle{unsrtnat}
\bibliography{\jobname}

\end{document}

在此輸入影像描述

答案2

它來自您的書目風格,即unsrt.

使用書目風格plainnat

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
  @book{is4562000,
    author={{Cement and Concrete Sectional Committee, CED 2}},
    title={Indian Standard Plain and reinforced concrete--code of practice (IS 456  2000)},
    shorttitle = {IS 456~:~2000},
    journal={New Delhi: },
    year={2000},
    publisher={Bureau of Indian Standards},
  }
\end{filecontents}

\documentclass[a4paper,10pt]{article}
\usepackage{natbib}
\begin{document}
This is bibliography using bibtex \cite{is4562000}.

\citeauthor{is4562000}.
\bibliographystyle{plainnat}
\bibliography{\jobname}
\end{document}

我們得到

在此輸入影像描述

我同意,這不太好。

有了biber,你就可以擁有

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
  @book{is4562000,
    author={{Cement and Concrete Sectional Committee, CED 2}},
    title={Indian Standard Plain and reinforced concrete--code of practice (IS 456  2000)},
    shorttitle = {IS 456~:~2000},
    journal={New Delhi: },
    year={2000},
    publisher={Bureau of Indian Standards},
  }
\end{filecontents}
\documentclass[a4paper,10pt]{article}
\usepackage[backend=biber]{biblatex}
\addbibresource{\jobname}
\begin{document}
This is bibliography using biber~\cite{is4562000}.

\citeauthor{is4562000}
\printbibliography
\end{document}

在此輸入影像描述

第三種選擇是使用biblatex,我推薦這個(根據個人口味)。它支援\citeauthor{key}命令:

\RequirePackage{filecontents}
\begin{filecontents}{\jobname.bib}
  @book{is4562000,
    author={{Cement and Concrete Sectional Committee, CED 2}},
    title={Indian Standard Plain and reinforced concrete--code of practice (IS 456  2000)},
    shorttitle = {IS 456~:~2000},
    journal={New Delhi: },
    year={2000},
    publisher={Bureau of Indian Standards},
  }
\end{filecontents}

\documentclass[a4paper,10pt]{article}
\usepackage[backend=bibtex]{biblatex}
\addbibresource{\jobname}
\begin{document}
This is bibliography using biblatex \cite{is4562000}.

\citetitle{is4562000}.

\citeauthor{is4562000}.
\printbibliography

\end{document}

給你:

在此輸入影像描述

相關內容