2
\documentclass{UnimasThesis}
\usepackage{graphicx}
\usepackage[labelfont=bf]{caption}
\captionsetup{labelfont=bf}
\usepackage{pdflscape}
\usepackage{adjustbox}
\usepackage{dcolumn}
\usepackage{booktabs}
\usepackage{amsmath}
\usepackage{cases}
\usepackage[os=win]{menukeys}
\usepackage[paper=a4paper]{geometry}
\usepackage{multirow}
%\usepackage{enumerate}


\usepackage{listings}
\lstset{language=[LaTeX]TeX,columns=fullflexible,
basicstyle=\ttfamily,texcsstyle=*\bfseries\color{NavyBlue},
commentstyle=\itshape\color{PaleVioletRed4},
frame=single,framesep=6pt,
framexleftmargin=6pt,framexrightmargin=6pt,
xleftmargin=12pt,xrightmargin=12pt,
breaklines=true,breakatwhitespace=true}


\title{AUTOMATIC SEGMENTATION OF CARDIAC MAGNETIC RESONANCE IMAGES FOR OEDEMA ASSESSMENT}
\author{Amajd Khan}
\faculty{Faculty of Computer Science and Information Technology }
\facultyColour{6c7a8c} %% 6-digit RGB hexadecimal code 
\submissionyear{2017}
\degreetype{Doctor of Philosophy\\(Computer Science)}

% If using APA bibliography style

\usepackage[natbibapa]{apacite}
\bibliographystyle{plainnat}
%\usepackage{natbib}
%\bibliographystyle{apalike}

\makeatother

\begin{document}
\maketitle

\frontmatter



\mainmatter
% Each chapter from a separate file
\input{chap1-Introduction}

% references are listed in refs.bib
\bibliography{refs}

\end{document}

%%%refrence

@article{rao:2014,
    title={Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report},
    author={Rao, Dinesh., and Sood, Divya., and Pathak, P., and Dongre, Sudhir, D},
    journal={Journal  of Emergency-An Academic Emergency Medicine},
    volume={2},
    number={1},
    pages={12-17},
    year={2014}
}

%%%i use the chapter 1 file (Example

this is my citation Rao et al.,(2014). (need to show like this

MWiesner
  • 225
amjad
  • 79
  • Welcome to TeX.SX! Please help us (and also you) and add a minimal working example with bibliography (MWEB), that illustrates your problem. Reproducing the problem and finding out what the issue is will be much easier when we see compilable code, starting with \documentclass and ending with \end{document}. – Bobyandbob Jul 17 '17 at 09:36
  • You create your MWEB with this answer: https://tex.stackexchange.com/a/227055/124842 – Bobyandbob Jul 17 '17 at 09:43
  • This the text: were death cases because of the autopsy Rao, Sood, Pathak, and Dongre (2014). (Need to show Rao et al.,(2014)). Refrences: @article{rao:2014, title={Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report}, author={Rao, Dinesh., and Sood, Divya., and Pathak, P., and Dongre, Sudhir, D}, journal={Journal of Emergency-An Academic Emergency Medicine}, volume={2}, number={1}, pages={12-17}, year={2014} } – amjad Jul 17 '17 at 10:21
  • 2
    Please provide compilable code! Read the given links carefully. You can edit your question and add a MWEB(see link above). – Bobyandbob Jul 17 '17 at 11:26
  • @amjad Unless you have a very good spam filter you may want to remove your e-mail address from the question. – samcarter_is_at_topanswers.xyz Jul 17 '17 at 14:04
  • @ samcarter can plz help me in this problem... if you want then i upload the file or send on yahoomail also – amjad Jul 17 '17 at 14:26
  • Check this: https://tex.stackexchange.com/questions/42696/citep-is-not-working – s.k Jul 17 '17 at 14:29
  • author={Rao, Dinesh., and Sood, Divya., and Pathak, P., and Dongre, Sudhir, D}, is quite wrong. It should be author={Rao, Dinesh. and Sood, Divya. and Pathak, P. and Dongre, Sudhir D},. – Mico Jul 17 '17 at 16:40
  • @Mico i change the author name but still can't reduces the numbers of author in text file same it show to me all the authors name. – amjad Jul 17 '17 at 16:51
  • 1
    @amjad Just to understand your question, why not use the \usepackage{natbib} \bibliographystyle{apalike} which is currently commented in your code? This will give you Rao et al. (2014) in the text. – samcarter_is_at_topanswers.xyz Jul 17 '17 at 16:53
  • @samcarter i used before but it was not working so i don't understand what to do – amjad Jul 17 '17 at 16:59
  • @amjad Can you please try this document: https://pastebin.com/myYsaY3Z – samcarter_is_at_topanswers.xyz Jul 17 '17 at 17:01
  • @samcarter i check first then inform you... thanks – amjad Jul 17 '17 at 17:07
  • @samcarter plz send me your email i send to you plz you can check... thanks – amjad Jul 17 '17 at 17:09
  • 2
    @amjad Sorry, but email this is not how this site works. Show the output/error messages of my short example in your question and I will try to help you but private communication is not part of this site. – samcarter_is_at_topanswers.xyz Jul 17 '17 at 17:12
  • @samcarter i am new i don't know the rule regulation... i SAY sorry to this site – amjad Jul 17 '17 at 17:14
  • @samcarter Thanks the problem is solved.... Thanks This cite and all of those who helped... Wish if again i have any problem you will help – amjad Jul 17 '17 at 17:20
  • Attention plz: I got this problem again can any help for this \bibcite{xu:2000}{{102}{2000}{{Xu et~al.}}{{}}} \bibcite{xu:1998}{{103}{1998}{{Xu and Prince}}{{}}} \bibcite{yang:2014}{{104}{2014}{{Yang et~al.}}{{}}} \bibcite{zambal:2006}{{105}{2006}{{Zambal et~al.}}{{}}} \bibcite{zhang:2014}{{106}{2014}{{Zhang et~al.}}{{}}} \bibcite{zhuang:2008}{{107}{2008}{{Zhuang et~al.}}{{}}} \providecommand\NAT@force@numbers{}\NAT@force@numbers \memsetcounter{lastsheet}{150} \memsetcounter{lastpage}{130} – amjad Jul 18 '17 at 05:56
  • Hi any one can help in this problem – amjad Jul 28 '17 at 08:59
  • You probably want to rephrase this with an actual question. Plus your doc contains stuff that we do not have access to, so redo it with something that is selfcontained. – daleif Jul 28 '17 at 09:38
  • @daleif how can upload the one chapter for sample here then you will be able to run this... Thanks – amjad Jul 28 '17 at 09:53
  • Drop the includes, make it a single file. But the important thing is that you write a description of your problem. Probably also a good idea to mention where others can get that thesis class. It is not one I recognize. Remove stuff from the mwe that are not relevant to your problem. – daleif Jul 28 '17 at 09:56
  • @daleif plz check now – amjad Jul 28 '17 at 10:05
  • Don't write your question in the title! Give it an appropriate title and write your question in the text. Tip: indent all lines on your mwe by 4 spaces (highlight and hit ctrl-k), then you get a good code formatting. – daleif Jul 28 '17 at 10:07
  • Again, the mwe is useless, it has to be compilable as a single doc. Have you even tried it? We do not have access to your files, so you need to help us help you. We cannot with inadequate information. – daleif Jul 28 '17 at 10:09
  • I am not good in this how make it good... – amjad Jul 28 '17 at 10:14
  • 1
    As annoying as it is, it is an important large debugging skil. You need to make a doc, that shows your problem. For instance you have no citations in your mwe, so others testing your mwe, would have to add that. You load many packages in the preamble the t are not relevant to bibliographies, remove them to reduce the mwe. Perhaps even test if the problem exist if you switch to the book class, again reducing the mwe to something others have direct access to. You don't need frontmatter mainmatter and maketitle. – daleif Jul 28 '17 at 10:19
  • @samcarter this my error: Undefined control sequence. ... to diabetes and overweight~\citep{gu:2005} – amjad Jul 29 '17 at 02:10
  • 1
    @amjad So if it is solved, why arent't the answers to both questions not upvoted by you? Why did you ask the same question two times? This is not how this site works. We are not a do it for me for free help desk, we invest our personal time to help people like you. – Johannes_B Jul 30 '17 at 06:25
  • @Johannes_B actually i am new in this site and i don't know the good use... and you can check i already mention that the problem solved.. – amjad Jul 30 '17 at 06:46
  • 1
  • Tex.sax starter guide i will study this also.. but now i used \shortcites its very nice for me at the time – amjad Jul 30 '17 at 06:52

3 Answers3

6

The apacite package implements a proper APA style bibliography which requires full citations on first mention for author lists up to 7 authors. Since you are loading the package with the [natbibapa] option, you can specify in the preamble a list of bib keys that you want to appear as "short citations". So schematically you can do the following:

\documentclass{article}
\usepackage[natbibapa]{apacite}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{Chandra:81,
    author = {Ashok K. Chandra and Dexter C. Kozen and Larry J. Stockmeyer},
    year = "1981",
    title = {Alternation},
    journal = {Journal of the Association for Computing Machinery},
    volume = "28",
    number = "1",
    pages = "114--133"
}


@article{rao:2014,
    title={Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report},
    author={Rao, Dinesh and Sood, Divya and Pathak, P. and Dongre, Sudhir, D},
    journal={Journal  of Emergency-An Academic Emergency Medicine},
    volume={2},
    number={1},
    pages={12-17},
    year={2014}
}
\end{filecontents*}
\shortcites{rao:2014} % list all the entries you want to have short cites
\begin{document}
\citet{Chandra:81} will show up long on first mention and short in subsequent mention: \citet{Chandra:81} but \citet{rao:2014} will show up short even on first mention because it was listed in the \verb|\shortcites| command.

\bibliographystyle{apacite}
\bibliography{\jobname}

\end{document}

output of code

Alan Munn
  • 218,180
  • Do you have a solution for the situation in which I want to force the short cite in some part of the paper (e.g., in a table), but have the proper full apacite citation in others (e.g, in-text)? – jmb Oct 22 '20 at 10:55
  • 2
    @jmb if you're using the natbibapa option, there's not a direct way to do this. If you're using the apaciteclassic option (which has a different set of citation commands) you can use \shortcite or related commands. See http://texdoc.org/pkg/apacite for details. You might be able to do this with the natbib \citealias command. See http://texdoc.org/pkg/natbib for details. – Alan Munn Oct 22 '20 at 18:09
  • 1
    The solution with \citealias is a bit inelegant, but it works. Thanks a lot! – jmb Oct 23 '20 at 19:10
3

Because you've loaded the apacite citation management package, you're getting exactly the behavior it's been programmed to do: It generates a citation call-out with a list of all authors (up to 7, that is) the first time a given entry is cited, and it truncates the list (to first-author et al) from the second time on.

If you do not want this behavior, don't load the apacite package. Instead -- especially in view of the fact that you seem to like the plainnat bibliography style -- you should be loading the natbib package. And, of course, you absolutely must purge the surplus commas from the entry's author field.

enter image description here

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@article{rao:2014,
    title   = {Causes of Sudden Cardiac Death on Autopsy Findings; a Four-Year Report},
    author  = {Rao, Dinesh and Sood, Divya and Pathak, P. and Dongre, Sudhir.D},
    journal = {Emergency},
    volume  = {2},
    number  = {1},
    pages   = {12-17},
    year    = {2014}
}
\end{filecontents}

\documentclass{article}
\usepackage[paper=a4paper]{geometry}
\usepackage[authoryear,round]{natbib}
\bibliographystyle{plainnat}

\begin{document}
\citet{rao:2014}, \citep{rao:2014}
\bibliography{mybib}
\end{document}
Mico
  • 506,678
-1

The best way you can manually copy the references and paste into \shortcites, e.g. \shortcites{rao:2014}

TeXnician
  • 33,589
amjad
  • 79