5

I am working with bibliography. For this there are two way, one is using bibtex and another is biber. When I print bibliography using biber, then it give me desired result. Means it can print title, author etc at specific places in my document. But bibtex is unable to do this. Using bibtex, my bibliography is generated, but when I use \citeauthor{is4562000} to print authorname, it shows "author?". Can we print authorname, title and year using bibtex. Here is code.

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},
}

Main document

\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}

Output

enter image description here

Guido
  • 30,740
Manpreet Dhiman
  • 341
  • 1
  • 4
  • 14

2 Answers2

5

You're making two errors: the author is corporate so it must get an additional pair of braces; second, the bib style is not compatible with natbib, use unsrtnat.

Note the author field should be

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

Here's a full example, where I used filecontents* just for avoiding clobbering my files.

\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}

enter image description here

egreg
  • 1,121,712
  • The @book entry type doesn't recognize a field called journal. I would therefore change the name of the field from journal to address, and omit : after New Delhi. – Mico Feb 13 '16 at 05:29
1

It comes from your bibliographic style, i.e. the unsrt.

Using the bibliographic style 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}

we get

enter image description here

which is not really nice, I agree.

With biber, you can have

\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}

enter image description here

A third option is to use biblatex, and I recommend this one (for personal taste). It supports \citeauthor{key} command:

\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}

Gives you:

enter image description here

Clément
  • 5,591
  • I just realized that this post was probably a duplicate of that one. Especially, that answer could answer your question too. – Clément Feb 12 '16 at 17:33
  • 1
    Hmm, shouldn't it be author={{Cement and Concrete Sectional Committee, CED 2}}? – egreg Feb 12 '16 at 17:34
  • You probably know that better than I do !-). Since we're at it, couldn't it be equivalently author={{C}ement and {C}oncrete {S}ectional {C}ommittee, {CED} 2}, ? Of course, feel free to edit my answer to improve it. – Clément Feb 12 '16 at 17:39
  • 1
    The salient issues for the "author" field of the entry at hand are twofold: (i) and should not be treated as a keyword that separates authors, and (ii) the comma should not be treated as the separator between the family name component and the first and von components. I.e., CED 2 is not the first name and Concrete Sectional Committee is not the family name of somebody named CED 2 Concrete Sectional Committee. The way to get around these issues is to encase the entire author field in a second pair of curly braces, as @egreg has suggested. – Mico Feb 13 '16 at 05:23
  • Thank you to everyone who respond. By default it print bibliography in author year style. Sometime we don't want authoryear style, Then what to do?. And why \citeauthor{is4562000} not working in other styles ieeetr, plain etc?. These are problems comes with bibtex. when we use biblatex with biber to generate bibliography, then we don,t face such problems. – Manpreet Dhiman Feb 15 '16 at 15:50
  • You should edit your question to make your point clear, I think. I don't exactly see you point. Mabybe @egreg does, but he probably was not notified that you posted that additional comment. And, one way to thank is to upvote answers. Ask if you don't know how to edit or how to upvote. – Clément Feb 15 '16 at 17:47
  • Is \citetitle {key} not supported by natbib? – Manpreet Dhiman Feb 21 '16 at 10:59
  • 1
    @user93268 Edit your question or ask another question. Ask if you don't know how to do that. Biblatex supports the \citetitle command, see my edited answer. – Clément Feb 21 '16 at 19:38
  • After the edit, the first two screenshots seem to be out of sync with the associated code. Specifically, "CED 2" still comes before "Concrete Sectional Committee" in the formatted reference, and it's still missing from the citation call-outs. – Mico Feb 21 '16 at 21:10
  • Thank you, Clement. I know biber support \citetitle. But I want to print "title" using bibtex and natbib. Can we print "title" with bibtex?. – Manpreet Dhiman Feb 22 '16 at 12:12
  • @user93268 That's another question. – Clément Feb 22 '16 at 14:51