5

I have looking for how to cite the author and year in a sentence with reference to my bibliography list. I already used some Natbib styles, but no result of what I want.

This is my main file: thesis.tex

\documentclass[11pt,a4paper]{article}

%Enabled packages
\usepackage{fancyhdr} %something with the header and footer
\usepackage{graphicx} %enables easy graphics embedding
\usepackage{datetime}
\usepackage[nottoc]{tocbibind}
\usepackage{enumitem}
\usepackage{abstract}
\usepackage{caption}
\usepackage[hang,flushmargin,bottom]{footmisc}
\usepackage{hyperref}
\usepackage[title,titletoc]{appendix}
\usepackage{cite}
\usepackage[numbers]{natbib}

\begin{document}
\include{Sections/Title}
\include{Sections/Abstract}
\tableofcontents
\include{Sections/chapterA}
\include{Sections/chapterB}
\include{Sections/bibliography}
\end{document}

My .bib file is called references.bib containing one example:

@book{hermanss2012,
author = "Astrid Hermanns",
title = "Psychology Management in Organizations",
publisher = "Cengage Learning EMEA",
year = "2012"
}

The place where I put the citation in the sentence is (as example) abstract.tex:

%Disable fancy page style
\thispagestyle{empty}
\begin{abstract}
\noindent This is the place for the abstract\citeauthor{hermanns2012}
\end{abstract}

This is an image of the output of the pdf file

enter image description here

Instead of the "author?" I want the lastname of the author and the year as a citation there, like "This is the place for the abstract (Hermanns, 2012)"

Furtermore, I want that the books/reports/etc in the bibliography is sorted on alphabetical order, by starting with the lastname of the auther instead of a number.

Anyone suggestions of how to solve this issues?

5

You need to include your biblography file as follows:

\bibliography{yourBibtexFile} 
\bibliographystyle{apalike} %or any other style you like

And then cite your reference using \cite{hermanss2012}

See the example below:

\documentclass[11pt,a4paper]{article}

\begin{document}
\noindent This is the place for the abstract\cite{hermanns2012}

\bibliography{test}           % Or whatever path and filename your bibtex is located
\bibliographystyle{apalike}   % Or any other style you like

\end{document}

enter image description here

  • I have entered your suggestion in the files, but there is a next issue. Because I can not answer my own question yet (reputation) this link will lead to the message I wanted to post after Dan his awnser: fileconvoy.com/… – drs. Ekingen Jul 1 '13 at 15:48
  • @drs.Ekingen you have to put \bibliography{Sections/references} since your .bib file is in Sections folder – karlkoeller Jul 1 '13 at 16:17
  • @karlkoeller I have edited the answer accordingly – Dan Jul 1 '13 at 16:48
  • The OP uses natbib with number. This must be changed to authoryear. – Guido Jul 1 '13 at 21:16
  • 1
    I changed \usepackage[number]{natbib} into \usepackage[authoryear]{natbib} as Guido stated. – drs. Ekingen Jul 1 '13 at 21:36
0

Here is how it worked for me. I wanted to be able to use citation inside the text for example using \citet{Jones_2008} for Jones et al., (2008) and \citep{Jones_2008} for (Jones et al 2000) and no numbers or brackets (brackets ex.[1] are the default for any style you use from the plain Latex bibliography system to natbib package). So be sure not to use numbers in \usepackage[round, sort,numbers]{natbib}. The sort option does the job of alphabetically sorting the bibliographies.

\documentclass{article}
\usepackage[round, sort]{natbib}
\begin{document}
\bibliographystyle {plainnat}

\bibliography{pap}
\end{document}

Note: pap is the bibliography .bib file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.