BibTeX, biblatex and biber\citet with natbib not working

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
Post Reply
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

\citet with natbib not working

Post by alicehs »

I am using the \natbib and \hyperref usepackages for my referencing as follows:

...
\usepackage[sort,nonamebreak, sectionbib]{natbib}
...
\usepackage[dvips,dvipdfm,colorlinks=true,urlcolor=blue,citecolor=red,linkcolor=red,bookmarks=true]{hyperref}
...

but when I use \citet{} or \citep{}, I don't get the author name and date referencing. Anyone have any ideas why?

Thanks.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

marco_d
Posts: 57
Joined: Tue Jan 20, 2009 7:49 pm

\citet with natbib not working

Post by marco_d »

Hello,

your problem is not reproducible with this fragment of code.

This following example works well:

Code: Select all

\documentclass[ngerman,parskip=half]{scrreprt}
\usepackage{babel}
\usepackage[utf8]{inputenc}
\usepackage[sort,nonamebreak, sectionbib,square]{natbib}
\usepackage[dvips,dvipdfm,colorlinks=true,urlcolor=blue,citecolor=red,linkcolor=red,bookmarks=true]{hyperref}
\usepackage{filecontents}
\begin{filecontents}{book.bib}
 @book{test,
author={Jon Doe},
title={Who is John Doe},
year={2009},
}
\end{filecontents}
\begin{document}
\cite{test}

\citep{test}

\citet{test}

\bibliographystyle{natdin}
\bibliography{book}
\end{document}
regards
Marco
i am German. I can not use difficult words. :-)
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

\citet with natbib not working

Post by alicehs »

okay, so MWE is as follows. .bib file simply liss normal entries (books, articles and reports). stll not working :-( all I get are numbered references, not names and years...

Code: Select all

\documentclass[10pt]{article}

\usepackage[sort&compress,square,comma,authoryear]{natbib}

\begin{document}

\cite{schnur02,scholze02,fastopt08,rotty87}
\cite{schnur02}
\cite{scholze02}
\citep{fastopt08}
\citet{rotty87}
\citet{tarantola87}
\citep{tarantola87}
 
\bibliographystyle{plain}
\bibliography{backmatter/reference_list}

\end{document}
alicehs
Posts: 18
Joined: Sun Jan 25, 2009 3:53 pm

Re: \citet with natbib not working

Post by alicehs »

okay, on literally the next web page I found my solution. about 3 seconds after posting. need to use a natbib style file.

instead of
\bibliographystyle{plain}

I needed
\bibliographystyle{plainnat}

doh. how silly..
changks
Posts: 1
Joined: Sat Feb 21, 2009 8:24 pm

Re: \citet with natbib not working

Post by changks »

hi,

I generate my bib file using BibDesk and the "cite" function works fine in TexShop.

I have similar problem to use "citep" and "citet" functions in TexShop.

If you know how to deal with this problem, please give me a hand.

Thanks.

The following is my code:

\documentclass[10pt]{article}
\usepackage{url}
\usepackage{times}
\usepackage[sort&compress,square,comma,authoryear]{natbib}
\begin{document}
:
:
\citep{Chapman:1993jx,Chapin:1995df}, ....\citet{Janzen:1998fc}...
:
:
\bibliographystyle{natbib}
\bibliography{sample}
\end{document}
Post Reply