Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I just found the hard way that it matters.

For example,

\cite{aref, bref}

is different from

\cite{aref,bref}

Notice the space after the comma in first one. If it does matter, this looks real silly to me.

I just need to verify if this is the case.

Just to add, I am using Miktex and Texmaker

This is how it's looking now:

\cite{jiang2006research,datta2006distributed,bandyopadhyay2006clustering}

Before it was:

\cite{jiang2006research, datta2006distributed, bandyopadhyay2006clustering}

Here is a full example of code which fails:

\documentclass[twoside,11pt]{article}

\usepackage{jair, theapa, rawfonts}

\begin{document}

\begin{abstract}
Abstracts will go here.

\end{abstract}

\section{Introduction}
\label{Introduction}

\subsection{Thesis Background}

As expected, most of the work involved combination of the disciplines of \textit{Data Mining} and \textit{Computer Networks} \cite{jiang2006research, datta2006distributed, bandyopadhyay2006clustering}.

\vskip 0.2in
\bibliographystyle{theapa}
\bibliography{refs}


\end{document}

refs.bib looks as follows:

@article{bandyopadhyay2006clustering,
  title={Clustering distributed data streams in peer-to-peer environments},
  author={Bandyopadhyay, S. and Giannella, C. and Maulik, U. and Kargupta, H. and Liu, K. and Datta, S.},
  journal={Information Sciences},
  volume={176},
  number={14},
  pages={1952--1985},
  year={2006},
  publisher={Elsevier}
}


@article{datta2006distributed,
  title={Distributed data mining in peer-to-peer networks},
  author={Datta, S. and Bhaduri, K. and Giannella, C. and Wolff, R. and Kargupta, H.},
  journal={Internet Computing, IEEE},
  volume={10},
  number={4},
  pages={18--26},
  year={2006},
  publisher={IEEE}
}

@article{jiang2006research,
  title={Research issues in data stream association rule mining},
  author={Jiang, N. and Gruenwald, L.},
  journal={ACM Sigmod Record},
  volume={35},
  number={1},
  pages={14--19},
  year={2006},
  publisher={ACM}
}


@book{datta2008probabilistic,
  title={Probabilistic approximate algorithms for distributed data mining in peer-to-peer networks},
  author={Datta, S.},
  year={2008},
  publisher={ProQuest}
}
share|improve this question
3  
Can you please give the code that you found the hard way ? –  Harish Kumar Oct 28 '12 at 23:51
1  
Oh!. This won't help. Can you please give a code from \doumentclass...\end{document} like I gave in the answer? Also include those packages which are suspects!. If they are not standard packages (i.e., not found on CTAN), you may give their link also. –  Harish Kumar Oct 28 '12 at 23:58
1  
Dear @Shamim Hafiz, where can we find jair and theapa? They don't look standard. –  Harish Kumar Oct 29 '12 at 8:14
1  
@ShamimHafiz You are using a very old package theapa.sty that redefines \cite in a wrong way. There are more recent packages that provide APA citation style. –  egreg Oct 29 '12 at 8:44
1  
@ShamimHafiz I don't know about JAIR; but the file they provide is from 1993 and is written in ugly LaTeX. However it's not responsible for the failure of \cite with spaces in its argument. –  egreg Oct 29 '12 at 22:50

1 Answer 1

up vote 5 down vote accepted

Trust your own eyes ;-)

\documentclass[
    12pt,a4paper]{scrartcl}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}

@ARTICLE{mwe2012,
  author = {Smith, A. and Johnson, B. and Willians, C.},
  title = {The three most common surnames in the United States of America},
  journal = {Review of Useless Knowledge},
  year = {2012},
  volume = {8},
  number = {1},
  pages = {290--290}
}

@ARTICLE{mwe2011,
  author = {Miller, J. and Brown, D.},
  title = {Most used surnames in fake passports},
  journal = {Journal of Nosense Ranks},
  year = {2011},
  volume = {5},
  number = {3},
  pages = {1--130},
  pmid = {1234567},
  url = {http://www.mwe.com/mwe2011},
  doi = {http://dx.doi.org/10.1016/jnr.2011.01.01},
}
\end{filecontents*}
%----------------------------------------------------------------------

\begin{document}


\section{First section}
nonumy eirmod tempor invidunt~\cite{mwe2011,mwe2012}.

\noindent nonumy eirmod tempor invidunt~\cite{mwe2011,   mwe2012}.


\bibliographystyle{unsrt}
\bibliography{\jobname}

\end{document}

enter image description here

Update:

From the comments above, it seems you want to use APA style citations. The following code illustrates the solution (where I used apacite package)

\documentclass{article}
\usepackage[a4paper,margin=2cm]{geometry}
\usepackage{apacite} %% for APA style
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{bandyopadhyay2006clustering,
  title={Clustering distributed data streams in peer-to-peer environments},
  author={Bandyopadhyay, S. and Giannella, C. and Maulik, U. and Kargupta, H. and Liu, K. and Datta, S.},
  journal={Information Sciences},
  volume={176},
  number={14},
  pages={1952--1985},
  year={2006},
  publisher={Elsevier}
}


@article{datta2006distributed,
  title={Distributed data mining in peer-to-peer networks},
  author={Datta, S. and Bhaduri, K. and Giannella, C. and Wolff, R. and Kargupta, H.},
  journal={Internet Computing, IEEE},
  volume={10},
  number={4},
  pages={18--26},
  year={2006},
  publisher={IEEE}
}

@article{jiang2006research,
  title={Research issues in data stream association rule mining},
  author={Jiang, N. and Gruenwald, L.},
  journal={ACM Sigmod Record},
  volume={35},
  number={1},
  pages={14--19},
  year={2006},
  publisher={ACM}
}


@book{datta2008probabilistic,
  title={Probabilistic approximate algorithms for distributed data mining in peer-to-peer networks},
  author={Datta, S.},
  year={2008},
  publisher={ProQuest}
}
\end{filecontents*}
%----------------------------------------------------------------------

\begin{document}


\section{First section}
tempor invidunt~\cite{jiang2006research,datta2008probabilistic}.

\noindent 
tempor invidunt~\cite{jiang2006research,   datta2006distributed}.


\bibliographystyle{apacite}
\bibliography{\jobname}

\end{document}

enter image description here

And your code (with apacite) will be

\documentclass{article}
\usepackage{apacite} %% for APA style
\usepackage{jair,rawfonts}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{bandyopadhyay2006clustering,
  title={Clustering distributed data streams in peer-to-peer environments},
  author={Bandyopadhyay, S. and Giannella, C. and Maulik, U. and Kargupta, H. and Liu, K. and Datta, S.},
  journal={Information Sciences},
  volume={176},
  number={14},
  pages={1952--1985},
  year={2006},
  publisher={Elsevier}
}


@article{datta2006distributed,
  title={Distributed data mining in peer-to-peer networks},
  author={Datta, S. and Bhaduri, K. and Giannella, C. and Wolff, R. and Kargupta, H.},
  journal={Internet Computing, IEEE},
  volume={10},
  number={4},
  pages={18--26},
  year={2006},
  publisher={IEEE}
}

@article{jiang2006research,
  title={Research issues in data stream association rule mining},
  author={Jiang, N. and Gruenwald, L.},
  journal={ACM Sigmod Record},
  volume={35},
  number={1},
  pages={14--19},
  year={2006},
  publisher={ACM}
}


@book{datta2008probabilistic,
  title={Probabilistic approximate algorithms for distributed data mining in peer-to-peer networks},
  author={Datta, S.},
  year={2008},
  publisher={ProQuest}
}
\end{filecontents*}
%---------------------------------------------------------------------- 
\begin{document}

\begin{abstract}
Abstracts will go here.

\end{abstract}

\section{Introduction}
\label{Introduction}

\subsection{Thesis Background}

As expected, most of the work involved combination of the disciplines of \textit{Data Mining} and \textit{Computer Networks} \cite{jiang2006research,         datta2006distributed,                                          bandyopadhyay2006clustering}.

\vskip 0.2in

\bibliographystyle{apacite}
\bibliography{\jobname}

\end{document}

Compile and see for yourself. Don't use theapa.bst and theapa.sty They are old. Instead use apacite.

share|improve this answer
1  
Hey, I want to read these journals regularly !!!11 ;-D –  Speravir Oct 29 '12 at 0:21
1  
@Speravir: :-). I picked up[ those in this site only. Liked them very much and using them ;-) –  Harish Kumar Oct 29 '12 at 0:26
    
Thanks for the code update. Here is the link that you requested: "www.cs.cmu.edu/afs/cs/project/jair/pub/information/.../jair.sty " You would need to actually google it and it's not a raw link which would open up straightway. –  Shamim Hafiz Oct 29 '12 at 17:21
1  
@ShamimHafiz: See the update. Don't use theapa. –  Harish Kumar Oct 29 '12 at 22:47
    
@HarishKumar: Thanks for the update and advice. egreg mentioned that, jair.sty is too old. Do you have any suggestion for it's alternative. As for a bit of humor, if I try to Google jair style, I get an alternate suggestion for hairstyle :P. The concerning part is, the phrase jair style might be outdated. –  Shamim Hafiz Oct 29 '12 at 23:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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