1

I'm stuck on writing references in my main text. Can anybody please help out with the code? If I go to PDF for the same, I'm unable to get anything out of it.

\documentclass{article}

\usepackage[backend=bibtex,style=verbose-trad2]{biblatex}
\bibliography{references} 

\begin{document}

Random citation \autocite[1]{1} embedded in text. This is for my second reference \autocite[2]{2}. This one for third \autocite[3]{3}.

\newpage

\printbibliography

\end{document}

This is my reference.bib file.

@article{1,
author = {Antúlio N. Bomfim & Francis X. Diebold},
title = {Bounded Rationality and Strategic Complementarity in a Macroeconomic Model: Policy Effects, Persistence and Multipliers},
journaltitle = {The Economic Journal, Volume 107, Issue 444, 1 September 1997, Pages 1358–1374},
date = {27 January 2012},
}

@article{2,
author = {Saang Joon Baak},
title = {Tests for bounded rationality with a linear dynamic model distorted by heterogeneous expectations},
journaltitle = {Journal of Economic Dynamics & Control 23 (1999) 1517}1543},
date = {20 November 1998},
}

@article{3,
author = {Luca Anderlini & David Canning},
title = {Structural Stability Implies Robustness to Bounded Rationality},
journaltitle = {Journal of Economic Theory 101, 395422 (2001)},
date = {17 August 2001},
}

I'm attaching a screenshot for the same. LaTeX

Mico
  • 506,678
Henam
  • 323
  • 2
    There is one fatal BibTeX-error in the .bib file. The journaltitle of 2 has journaltitle = {Journal of Economic Dynamics \& Control 23 (1999) 1517}1543},, i.e. the curly braces are closed twice. You probably want journaltitle = {Journal of Economic Dynamics & Control 23 (1999) 1517–1543}, in line with 1. It also contains another issue: Multiple names must be separated with and not with a &. The & will lead to a LaTeX error. The & in Journal of Economic Dynamics & Control must be escaped to Journal of Economic Dynamics \& Control. ... – moewe May 26 '19 at 10:54
  • After running LaTeX, did you run – Mico May 26 '19 at 10:54
  • ... The correct format for dates in the date field is YYYY-MM-DD (regardless of the expected output): So date = {27 January 2012}, should be date = {2012-01-27},. Lastly, the journaltile field should only contain the journal title. Volume and issue number, date and page numbers should be given in the appropriate fields. – moewe May 26 '19 at 10:55
  • You should also consider using more informative names for your entries than just 1, 2 and 3. Those keys do not appear in the bibliography and citations and are purely internal. There is no correspondence with sorting or the numbering of footnotes. – moewe May 26 '19 at 10:57
  • @moewe I did all of that, thanks a lot. But still unable to run it. If I again go to the PDF of the untitled.tex document, unable to fetch anything. Can anyone please help? – Henam May 26 '19 at 11:10
  • @Mico Can you provide it's coding so that I can get my result? – Henam May 26 '19 at 11:11
  • Have not check tested moewe s comments but expect they should work when you select Correct compile pldlatex+Bib... option from tools not just run defauilt quick build what are any residual errors –  May 26 '19 at 11:14

1 Answers1

0

There are several issues with the shown .bib file. Some of them are fatal.

  • The journaltitle of 2 has two closing curly braces. It reads

    journaltitle = {Journal of Economic Dynamics & Control 23 (1999) 1517}1543},
    

    but was probably intended to be (this is still not correct, see the next point)

    journaltitle = {Journal of Economic Dynamics & Control 23 (1999) 1517-1543},
    

    This error is fatal and will stop BibTeX from processing your file.

  • The journaltitle of 2 contains an unescaped & sign. & is special for LaTeX and must be escaped to \& if you want to typeset it. See Escape character in LaTeX.

    journaltitle = {Journal of Economic Dynamics \& Control 23 (1999) 1517-1543},
    

    This error is not fatal for BibTeX, but when the data comes to LaTeX it will cause a fatal error.

  • Multiple names must be separated with and regardless of the desired output. & is incorrect here. How to properly write multiple authors in bibtex file?. So

    author = {Antúlio N. Bomfim & Francis X. Diebold},
    

    is incorrect. You'd need

    author = {Antúlio N. Bomfim and Francis X. Diebold},
    

    Similar to the last issue, this problem will not cause BibTeX to fail, but LaTeX will throw an error when it gets the data.

  • biblatex's date fields must be filled in the ISO 8601/EDTF format YYYY-MM-DD regardless of the expected output.

    date = {20 November 1998},
    

    is wrong, you need

    date = {1998-11-20},
    
  • The journaltitle field should only contain the journal title. All other info like volume, issue number, pages and date should go into the respective fields.

  • The entry keys should ideally be more informative and useful than just 1, 2, 3. You could use more memorable identifiers such as the name of the authors, a year or important bits of the title. Note that normally the entry key is a purely internal identifier, it does not affect sorting, does not correspond to anything in the output and is generally independent of all biblatex features.

You need to compile your document with LaTeX, BibTeX, LaTeX, LaTeX. See Question mark or bold citation key instead of citation number. But if you use biblatex it is much better to use Biber instead of BibTeX. See bibtex vs. biber and biblatex vs. natbib as well as Biblatex with Biber: Configuring my editor to avoid undefined citations.

Please have a look at one of the many biblatex tutorials out there. biblatex in a nutshell (for beginners) is a great starting point.

Since your files contained so many errors, you probably need to clear out all temporary files (.aux, .bbl, .bcf, ...) after you have fixed the errors before you can recompile.

Here is what I would do (note that I use Biber and compile with LaTeX, Biber, LaTeX, LaTeX. If you want to use BibTeX change backend=biber to backend=bibtex and compile with BibTeX instead of Biber.)

Note The MWE uses filecontents to produce the contents of the .bib file. The document will overwrite an exiting .bib file with the same name. In your real-world document you would paste the contents of the filecontents environment for \jobname.bib into your .bib file and would not need filecontents at all.

\documentclass{article}

\usepackage[backend=biber, style=verbose-trad2]{biblatex}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
@article{bomfim,
  author       = {Antúlio N. Bomfim and Francis X. Diebold},
  title        = {Bounded Rationality and Strategic Complementarity
                  in a Macroeconomic Model: Policy Effects,
                  Persistence and Multipliers},
  journaltitle = {The Economic Journal},
  volume       = {107},
  number       = {444},
  pages        = {1358-1374},
  date         = {1997-09},
  eprint       = {2957740},
  eprinttype   = {jstor},
}
@article{baak,
  author       = {Saang Joon Baak},
  title        = {Tests for bounded rationality with a linear dynamic
                  model distorted by heterogeneous expectations},
  journaltitle = {Journal of Economic Dynamics \& Control},
  volume       = {23},
  number       = {9-10},
  pages        = {1517-1543},
  date         = {1999-09},
  doi          = {10.1016/S0165-1889(98)00082-7},
}
@article{anderlini,
  author       = {Luca Anderlini and David Canning},
  title        = {Structural Stability Implies Robustness to
                  Bounded Rationality},
  journaltitle = {Journal of Economic Theory},
  volume       = {101},
  number       = {2},
  pages        = {395-422},
  date         = {2001-12},
  doi          = {10.1006/jeth.2000.2784},
}
\end{filecontents}

\addbibresource{\jobname.bib}

\begin{document}

Random citation \autocite[1359]{bomfim} embedded in text.
This is for my second reference \autocite[1520-1522]{baak}.
This one for third \autocite[395]{anderlini}.

\printbibliography
\end{document}

Verbose citations and bibliography of the three example entries.

moewe
  • 175,683
  • Yeah, I got it. Thanks a lot for such a detailed answer! Really appreciating your help. – Henam May 26 '19 at 16:26
  • I've just one followup question, in references, I'm getting only the first one as a reference and not the rest of the two? Is there any specific problem with that? – Henam May 26 '19 at 16:33
  • @Henam Sorry, I don't quite get what you mean. Can you please ask a new question explaining what you have so far, what you are doing, what you see and what you would like to see instead? – moewe May 26 '19 at 20:18
  • Okay sure, will do that! Thanks a ton for the help! – Henam May 27 '19 at 04:16
  • I got what you're showing, was committing an error. Thanks – Henam May 27 '19 at 04:28