BibTeX, biblatex and bibernatbib problem

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
phoneticist
Posts: 15
Joined: Sat Jul 25, 2009 12:54 am

natbib problem

Post by phoneticist »

Hello BiBTex world!

I'm completely new to TeX. Trying to work my way around it. At the moment working on organizing the bibliography for my future thesis in BiBTeX. I am using MikTeX and WinEdt.

The problem is that even though I seem to have the natbib package installed (MiKTeX Package Manager says so) my WinEdt does not detect it (or is it TeX that can't locate it properly). Besides when I am using one of the following styles (unsrt, abbrev, alpha) things are going rather smoothly, however, I don't seem to be able to use plain.bst for some reason. Maybe that's partly why I can't use natbib either.

Desperately need natbib package to start working - in my discipline they use Author-year form of citations.

Would absolutely appreciate any advice.

Recommended reading 2024:

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

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

gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

Re: natbib problem

Post by gmedina »

Hi,

can you please post the relevant parts of the code that you are using to produce your bibliography?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
phoneticist
Posts: 15
Joined: Sat Jul 25, 2009 12:54 am

natbib problem

Post by phoneticist »

Thanks for the speedy reply. Yes, here it is:

Code: Select all

\documentclass{report}
\usepackage{natbib}
\begin{document}
It is possible to say vowels so that some of their component parts are more obvious\citep{ladefoged2005}.

We can hear the resonance more plainly\citep{ladefoged2005}.

\bibliographystyle{plainnut}
\bibliography{mybib}
\end{document}
It produces (?) as the output citation and no bibliography list. When I use unsrt as bibliographystyle in the same context it works perfectly fine producing both citation and a bibliography list.

Thanks again.
Last edited by cgnieder on Fri May 24, 2013 4:51 pm, edited 1 time in total.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

natbib problem

Post by gmedina »

Please process the following test file in the usual way (i.e., (pdf)latex myfile, bibtex myfile, (pdf)latex myfile, (pdf)latex myfile). If you do not get the citation and the bibliography, please report any error/warning messages obtained after compilation and post here (as an attachment) the .log file obtained:

File myfile.tex:

Code: Select all

\begin{filecontents*}{bibtest.bib}
@book{goossens93,
	author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
	title = "The Latex Companion",
	year = "1993",
	publisher = "Addison-Wesley",
	address = "Reading, Massachusetts"
}
\end{filecontents*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{book}
\usepackage{natbib}

\begin{document}

\cite{goossens93}

\bibliographystyle{plainnat}
\bibliography{bibtest}

\end{document}
1,1,2,3,5,8,13,21,34,55,89,144,233,...
phoneticist
Posts: 15
Joined: Sat Jul 25, 2009 12:54 am

Re: natbib problem

Post by phoneticist »

Thanks so much. It works just fine now. However, it still does not produce the exact output I opt for, which is

blah blah blah (Goossens et al. 1993: 23)

References:

Goossens, M., Mittlebach F. & Samarin A. (1993). The Latex Companion. Reading, MA: Addison-Wesley.

Do I need a different package to get that kind of citation?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

natbib problem

Post by gmedina »

For the format of the citation in the document you can use the different commands provided by natbib: a little example:

Code: Select all

\begin{filecontents*}{bibtest.bib}
@book{goossens93,
	author = "Michel Goossens and Frank Mittlebach and Alexander Samarin",
	title = "The Latex Companion",
	year = "1993",
	publisher = "Addison-Wesley",
	address = "Reading, Massachusetts"
}
\end{filecontents*}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{book}
\usepackage[round]{natbib}

\begin{document}

\citep{goossens93}

\citep{goossens93}

\citep*{goossens93}

\citet{goossens93}

\citet*{goossens93}

\bibliographystyle{plainnat}
\bibliography{bibtest}

\end{document}
For more citation commands, please refer to the package documentation.

As for the format of the entry in the "Bibliography" section, you can try the various styles that are compatible with natbib (the documentation explains which ones you can use). If none of those styles produces the desired format, you can create your own style by running

Code: Select all

latex makebst
in a terminal and answering a long series of questions. At the end you will have your own customised .bst file ready to be used.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
phoneticist
Posts: 15
Joined: Sat Jul 25, 2009 12:54 am

Re: natbib problem

Post by phoneticist »

Thanks very much for the timely response. It was most helpful. I think I just need to play with the program a little more.

I was also wondering:

1) ... every time I want to download a new style file (e.g. lsalike.sty + lsalike.bst) where do I save it in order to start using it with my editor (WinEdtr)?

2) ... where is the best place to keep my bibliography database/file in order to use it with a bunch of other projects?


Sorry for so many questions. And thanks for your help.
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

natbib problem

Post by gmedina »

phoneticist wrote:...
1) ... every time I want to download a new style file (e.g. lsalike.sty + lsalike.bst) where do I save it in order to start using it with my editor (WinEdtr)?
...
Normally the MiKTeX Package Manager automatically installs missing packages in their proper location. If you are forced to install some files manually, usually the package documentation will give you some hints as to where to place the files (it's important that after a manual installation you refresh the File Name Data Base to let your LaTeX system know that you installed new packages (In a WindowsXP system: Start->All Programs->MiKTeX2.7->Settings and then click in the "Refresh FNDB" button)).

A quick solution if the MiKTeX Package Manager doesn't help or if you do not know where exactly to place the new files is simply to save them in the same folder that contains your current .tex document.
phoneticist wrote:...
2) ... where is the best place to keep my bibliography database/file in order to use it with a bunch of other projects?...
Read the answer to Question 14 (page 11) in the BibTeX FAQ.
phoneticist wrote:...
Sorry for so many questions. And thanks for your help.
Do not worry, and you're welcome.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
phoneticist
Posts: 15
Joined: Sat Jul 25, 2009 12:54 am

natbib problem

Post by phoneticist »

Thank you once again for the helpful tips and the reference to the manual.

The FAQ says:
The standard place for these is in the bst and bib subdirectories of <texmf>/bibtex, where <texmf> is the top level directory of your TEX/METAFONT installation. (The local tree, <texmf-local>, which may be called localtexmf, is perhaps an even better place because it will not get overwritten if the system is later upgraded.)
Is the following the right path for saving my .bib file:

MiKTeX 2.7->tex->latex->???

Sorry ... confused ... :?
User avatar
gmedina
Posts: 2313
Joined: Wed Jul 11, 2007 11:45 pm

natbib problem

Post by gmedina »

phoneticist wrote:...
Is the following the right path for saving my .bib file:

MiKTeX 2.7->tex->latex->???

Sorry ... confused ... :?
Assuming that you made a standard (default) MiKTeX2.7 installation on a WindowsXP system, go to

C->Program Files->MiKTeX2.7->bibtex->bib

create a new folder (call it, for example, mybib) and save your .bib database in that folder. Now, refresh the File Name Data Base (as I explained in a previous response).

Warning: keep always a second copy of your bib database in another folder (a personal folder) since upgrading your MiKTeX distribution will erase the mybib folder.

By the way, the jmb bibliographical style will format the bibliographical entries as you want them.
1,1,2,3,5,8,13,21,34,55,89,144,233,...
Post Reply