GeneralCreating references

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
mungovan
Posts: 2
Joined: Mon Jun 13, 2011 9:29 pm

Creating references

Post by mungovan »

Hi,

Basically I have a latex tex file using:
\documentclass[11pt]{report}
and
\usepackage[comma,authoryear]{natbib}
It shows references in the resulting document in the form: (Granovetter 73) where I want them to be in the form: (Granovetter, 1973). Basically I am unable to just reference the year of an article as in: Granovetter (1973) showed that....
At the moment it comes out as: Granovetter (Granovetter 73) showed that....
Is there any way of correcting this?

Here is the full contents of the tex file:

\documentclass[authoryear,review,11pt]{report}
\newcommand{\dson}{\renewcommand{\baselinestretch}{1.4}\large\normalsize}
\newcommand{\dsoff}{\renewcommand {\baselinestretch}{1}\large\normalsize}
\newtheorem{theorem}{Theorem}%[section]
\usepackage{amssymb}
\usepackage{epsfig}
\usepackage{subfigure}
\usepackage{xthesis}
\usepackage{url}
\usepackage{enumitem}
\usepackage[comma,authoryear]{natbib}
\usepackage{makeidx, graphicx} % allows for indexgeneration
\usepackage{amsmath} % need for subequations
\usepackage[font=small,format=plain,labelfont=bf,up,textfont=it,up]{caption}
\usepackage[ruled,linesnumbered]{algorithm2e}
\usepackage[english]{babel}

\makeatletter
%page layout
\@twosidefalse
% distance from top of page to page's head
\topmargin -0.35in % head margin = .75in or 2cm
% distance between the left side and text left margin
\oddsidemargin 0.5in % binding margin = 1.5in or 4cm

\headheight 20pt
\headsep 15pt
\footskip 28pt
\textheight 9.05in
\textwidth 5.68in
\parskip 8pt
\parindent 0pt
\columnwidth \textwidth
\footnotesep 12pt

%floats and marginpar
\floatsep 12pt plus 2pt minus 2pt
\textfloatsep 20pt plus 2pt minus 4pt
\intextsep 12pt plus 2pt minus 2pt
\dblfloatsep 12pt plus 2pt minus 2pt
\dbltextfloatsep 20pt plus 2pt minus 4pt
\@fptop 0pt plus 1fil
\@fpsep 8pt plus 2fil
\@fpbot 0pt plus 1fil
\@dblfptop 0pt plus 1fil
\@dblfpsep 8pt plus 2fil
\@dblfpbot 0pt plus 1fil
\marginparwidth 90pt
\marginparsep 11pt
\marginparpush 5pt
\makeatother

%% End of layout settings.

% Following modified from article.doc to put a little indentation between
% the footnote marker and the text of the footnote
% The change is the explicit blank just before the second $ sign
% This can be removed if you prefer ugly footnotes.

\makeatletter
\long\def\@makefntext#1{\@setpar{\@@par\@tempdima \hsize
\advance\@tempdima-10pt\parshape \@ne 10pt \@tempdima}\par
\parindent 1em\noindent \hbox to \z@{\hss$^{\@thefnmark}\ $}#1}
\makeatother

% Some commands to handle linespacing

\newlength{\spacing}
\setlength{\spacing}{\baselineskip}

\newcommand{\nspace}[1]{\setlength{\baselineskip}{#1\spacing}}
\newenvironment{linespacing}[1]{\nspace{#1}}{}



% Input the postscript function (required for the crest).
\input epsf
\newcommand{\ew}[2]{\setlength{\epsfxsize}{#2}\epsfbox{#1}}

\begin{document}
\dson
\bibliographystyle{scribe} % Style for Bibliography {scribe}

\addcontentsline{toc}{chapter}{Abstract}

\tableofcontents % Create table of contents
\listoffigures % and list of figures
\addcontentsline{toc}{chapter}{List of Figures}

\input{Introduction} % Input your various chapters.
\input{LiteratureReview}
\input{Method}
\input{Conclusions}

% Bibliography setup:
\begin{linespacing}{1.0} % Single-spaced

\bibliographystyle{natbib}
\bibliography{REFERENCES}

\newpage % Appendix setup:
\appendix
\end{linespacing}
\end{document}

Recommended reading 2024:

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

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

torbjorn t.
Posts: 162
Joined: Wed Jun 17, 2009 10:18 pm

Creating references

Post by torbjorn t. »

Welcome to the board. A general remark about your code:
When you post code here it should be minimal, meaning that only the code necessary to illustrate the problem should be included. Packages, newcommands etc. unrelated to the problem can be removed. Second, please use the code tag:

Code: Select all

 <code here> [/code ] (without spaces). It makes the post a lot more legible.


Concerning your problem: The one thing your example is missing is a command that actually creates a reference. Are you using [color=#FF4000]\cite[/color] or [color=#FF4000]\citep[/color]? The latter is defined by the natbib package, see the manual.
Post Reply