LaTeX forum ⇒ BibTeX, biblatex and biberReferences in Text replaced by Question Mark

Information and discussion about BiBTeX - the bibliography tool for LaTeX documents.
amiruw
Posts: 7
Joined: Wed Mar 17, 2010 8:59 pm

References in Text replaced by Question Mark

Postby amiruw » Sun May 26, 2013 9:40 am

Hello,

I have a bib file (References.bib) with elsarticle-harv style:

  1. \bibliographystyle{elsarticle-harv}
  2. \bibliography{References}


With elsarticle document class, that is:

  1. \documentclass[authoryear,review,12pt]{elsarticle}


all the references in the body of my paper is nicely shown but with "report" document class, that is:

  1. \documentclass[12pt]{report}


I run into many problems. Thus, some of the references are shown properly but for some of them I just see "?". For example, the following reference is shown in the body of the document:

  1. @BOOK{lable1,
  2. title = {book name A},
  3. publisher = {AAA},
  4. year = {1991},
  5. author = {FamilyName1, T. M. and FamilyName2, A. P. and FamilyName3, D. S. and others},
  6. }


(however, I don't get space between "T." and "M." or "A." and "P." in my reference list)

but the following is just cited with "?":

  1. @article{label2,
  2. title={Paper name},
  3. author={FamilyName3, A. B.},
  4. journal={Journal name B},
  5. volume={23},
  6. number={12},
  7. pages={76--79},
  8. year={1990},
  9. }


I noticed that the problem gets down to the author's name; for example, if I replace "FamilyName3, A. B." with only one letter "G", it will be shown in the body of the document but with a little bit more sophisticated name, I just get "?". I spent hours on this and tried tons of approaches but all ended with failure. I am just wondering if there is a way out of this problem. Your help is greatly appreciated. I also included the tex file I run.

Many thanks in advance.

  1. \documentclass[12pt]{report}
  2. \listfiles
  3. \usepackage[dvips]{graphicx}
  4. \usepackage{graphics}
  5. \usepackage{epsfig}
  6. \usepackage{subfigure}
  7. \usepackage{amsmath}
  8. \usepackage{amssymb}
  9. \usepackage{amsfonts}
  10. \usepackage{amsbsy}
  11. \usepackage{natbib}
  12. \usepackage[dvips=true,bookmarks=true,breaklinks=true]{hyperref}
  13. \usepackage{cite}
  14. \usepackage{multirow}
  15. \usepackage{setspace} \doublespacing
  16. \usepackage{latexsym}
  17. \usepackage{xtab}
  18. \usepackage[ansinew]{inputenc}
  19. \usepackage{srcltx}
  20. \usepackage{fancyhdr}
  21. \usepackage[hang,small,bf]{caption} \setlength{\captionmargin}{30pt}
  22. \usepackage{longtable}
  23. \usepackage{color}
  24. \usepackage{makeidx}
  25. \usepackage{array}
  26. \usepackage{url}
  27. \usepackage{breakurl}
  28. \allowdisplaybreaks[1]
  29. \usepackage[T1]{wasysym}
  30.  
  31. \makeindex
  32.  
  33. % Margins and text width
  34. .
  35. .
  36. .
  37.  
  38. \setlength{\parskip}{\medskipamount}
  39. \renewcommand{\baselinestretch}{1.3}
  40.  
  41. \pagestyle{fancy}
  42. \fancyhead{}
  43. \fancyhead[L]{\textsc \leftmark}
  44. \fancyhead[R]{\thepage}
  45. \fancyfoot{}
  46. \renewcommand{\headrulewidth}{0pt}
  47. \renewcommand{\footrulewidth}{0pt}
  48. \renewcommand{\chaptermark}[1]{%
  49. \markboth{\chaptername\ \thechapter.\ #1}{}}
  50.  
  51. \newtheorem{theorem}{Theorem}[section]
  52. \newtheorem{lemma}[theorem]{Lemma}
  53. \newtheorem{proposition}[theorem]{Proposition}
  54. \newtheorem{corollary}[theorem]{Corollary}
  55.  
  56. \newenvironment{proof}[1][Proof]{\begin{trivlist}
  57. \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
  58. \newenvironment{definition}[1][Definition]{\begin{trivlist}
  59. \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
  60. \newenvironment{example}[1][Example]{\begin{trivlist}
  61. \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
  62. \newenvironment{remark}[1][Remark]{\begin{trivlist}
  63. \item[\hskip \labelsep {\bfseries #1}]}{\end{trivlist}}
  64.  
  65. \newcommand{\qed}{\nobreak \ifvmode \relax \else
  66. \ifdim\lastskip<1.5em \hskip-\lastskip
  67. \hskip1.5em plus0em minus0.5em \fi \nobreak
  68. \vrule height0.75em width0.5em depth0.25em\fi}
  69.  
  70. \\renewcommand{\topfraction}{0.9}
  71. \renewcommand{\bottomfraction}{0.8}
  72.  
  73. \setcounter{topnumber}{2}
  74. \setcounter{bottomnumber}{2}
  75. \setcounter{totalnumber}{2}
  76. \setcounter{dbltopnumber}{2}
  77. \setcounter{secnumdepth}{5}
  78. \renewcommand{\dbltopfraction}{0.9}
  79. \renewcommand{\textfraction}{0.07}
  80.  
  81. \renewcommand{\floatpagefraction}{0.7}
  82.  
  83. \renewcommand{\dblfloatpagefraction}{0.7}
  84.  
  85. % I also added the following based on a suggested solution I found on the web but it didn't fix the problem:
  86.  
  87. \newcommand\bibsection{%
  88. \section*{\bibname\markright{\MakeUppercase{\bibname}}}}
  89.  
  90. \usepackage{rotating}
  91.  
  92. \begin{document}
  93. \include{Chap1}
  94. \include{Chap2}
  95. \include{Chap3}
  96. \appendix
  97. \renewcommand{\chaptermark}[1]{%
  98. \markboth{Appendix\ \thechapter.%
  99. \ #1}{}}
  100.  
  101. \bibliographystyle{elsarticle-harv}
  102. \bibliography{References}
  103.  
  104. \end{document}
Last edited by cgnieder on Sun May 26, 2013 11:30 am, edited 1 time in total.

Tags:

amiruw
Posts: 7
Joined: Wed Mar 17, 2010 8:59 pm

Postby amiruw » Mon May 27, 2013 12:13 am

I just want to let those who may run into similar problem know that the problem gets fixed by replacing the bibliography style from "elsarticle-harv" to "elsarticle-num-names". The citations in the body of the document are the same; however, the format of the references in the end of the document is somewhat different. For example, based on "elsarticle-harv" we get:

Family Name, First Name, Year. Title Vol (Number), Pages.

While "elsarticle-num-names" results in:

First Name, Family Name, Title Vol (Number), (Year) Pages.

How to make documentclass "report" work with "elsarticle-harv" style is still an open question, and I appreciate those who find a solution share it here.

Thanks,

amiruw


Return to “BibTeX, biblatex and biber”

Who is online

Users browsing this forum: No registered users and 2 guests