0

My references (article type for sure but perhaps other types too) are not displaying all fields. I use natbib, chapterbib and have a 'custom' bib style, Vancouver which I downloaded from GitHub. My editor is Overleaf.

The issue seems to be related to the order in which entry fields appear in the bib file. This depends on how references are exported from Zotero with better BibTeX. The example entry below shows how Zotero exports an entry.

My understanding was that the order of fields in an entry contained in the bib file is not important as long as the required fields are present. However, the only way I can make all reference fields appear in the bibliography is if I manually alter the their order to match - what I think - is that in the .bst file. i.e, I make sure the order of the fields in a reference entry is author, title, journal, vol, numb, pages, year and note.

I have lots of references so re-ordering fields manually is not a viable option. I tried to modify how Zotero exports unsuccessfully. Only a few days ago references were showing fine (all fields displayed) so I know that the order of entry fields in the bib file are not the issue.

This is how an article type shows in my bst file (Vancouver.bst)

FUNCTION {article}
{ output.bibitem
  format.authors "author" output.check
  organization empty$
    'skip$
    { author empty$
        {
          format.organizations "organization" output.check
    }
    {
      "; " *
      no.blank.or.punct
          format.organizations "organization" output.check
    }
      if$
    }
  if$
  new.block
  format.title "title" output.check
  type missing$
    { skip$ }
    { format.type "type" output.check }
  if$
  new.block
  journal
  remove.dots
  "journal" bibinfo.check
  "journal" output.check
  format.journal.date "year" output.check
  add.semicolon
  format.vol.num.pages output
  new.block
  format.note output
  output.web.refs  % urlbst
  fin.entry
}

This is an example entry in my bib file (references2.bib)

@article{susilarini_estimated_2018,
  title = {Estimated Incidence of Influenza-Associated Severe Acute Respiratory Infections in {{Indonesia}}, 2013-2016},
  volume = {12},
  issn = {1750-2659},
  note = "\doi{10.1111/irv.12496}",
  language = {eng},
  journal = {Influenza and Other Respiratory Viruses},
  author = {Susilarini, Ni K. and Haryanto, Edy and Praptiningsih, Catharina Y. and Mangiri, Amalya and Kipuw, Natalie and Tarya, Irmawati and Rusli, Roselinda and Sumardi, Gestafiana and Widuri, Endang and Sembiring, Masri M. and Noviyanti, Widya and Widaningrum, Christina and Lafond, Kathryn E. and Samaan, Gina and Setiawaty, Vivi},
  year = {2018},
  keywords = {surveillance,influenza,severe acute respiratory infection,disease burden,Indonesia},
  pages = {81-87},
  pmid = {29205865}
}

and this is how it displays in the tex file

Estimated Incidence of Influenza-Associated Severe Acute Respiratory Infections in Indonesia, 2013-2016;12.

As you can see, authors, journal, numb, pages, year and doi are missing.

I created this MWE is but it does not reproduce the problem. So if the problem is somewhere else, where should I start looking?

\documentclass{report}
\usepackage[round, numbers, semicolon, sectionbib]{natbib}
\usepackage{doi}
\usepackage{chapterbib}

\begin{document}
\renewcommand{\bibname}{References}
\makeatletter 
\renewcommand\@biblabel[1]{#1} 
\makeatother

Here i cite \cite{susilarini_estimated_2018}

\bibliographystyle{vancouver.bst} 
\bibliography{references2.bib}

\end{document}
  • 1
    In a well-formed .bib entry the order of fields does not matter. If the entry has syntax errors BibTeX might ignore certain fields. As you say in the question the MWE does not show the issue. (I should mention, though, that both \bibliographystyle and \bibliography take their argument without file extension, some systems are more forgiving than others in that regard, but I got an error with \bibliographystyle{vancouver.bst} because vancouver.bst.bst was not found). ... – moewe Oct 14 '18 at 6:02
  • 1
    I should mention that the vancouver.bst I tested this with is from CTAN: ctan.org/pkg/vancouver. If your version of vancouver.bst from GitHub is different, it would be helpful if you could link it in the question. – moewe Oct 14 '18 at 6:07
  • 1
    I appreciate that it is very time consuming to come up with an MWE in this case, especially, but not only, when you are new to LaTeX. But all I can say without one is that things should work, the order of fields is not relevant. You can check the .blg file (BibTeX's log) for hints and to be absolutely sure also check the (LaTeX) .log for errors or warnings, but that's about it. – moewe Oct 14 '18 at 6:34
  • 2
    Ah yes that would explain it. The contents of a field must be wrapped in quotation marks or curly braces (unless they are purely numeric). note = \doi{10.1111/irv.12496}, will not parse correctly and can mean that the field and all following fields are ignored. In such a case of a malformed entry the order of the field can appear to matter. What I'm wondering is that you say that Better BibTeX exported this. Since the export is automatic syntax errors like this should not happen. – moewe Oct 14 '18 at 8:50
  • 1
    if you want to add it automatically, a postscript such as "if (Translator.BetterBibTeX && item.DOI) { this.add({ name: 'note', value: '<pre>\\doi{' + item.DOI + '}</pre>'}) }" should do it. – retorquere Oct 15 '18 at 9:43
1

From the comments I see you're trying to add a clickable DOI in your BibTeX exports; if you're using Zotero BetterBibTeX (and it looks like you do), you can achieve this by adding this postscript to the BBT preferences:

if (Translator.BetterBibTeX && item.DOI) {
  this.add({ name: 'note', bibtex: `{\\doi{${this.enc_verbatim(item.DOI)}}}` })
}

the postscripts are written in javascript, and you have to know the internal ZBBT API to use it, but generally people just request postscripts and I write them for them; the above means

  • If and only if the reference is being exported as BibTeX and has a DOI field, then
  • add a field 'note', with contents literal bibtex contents {\doi{...}},
  • with ... being the DOI, escaped where necessary according to the bibtex verbatim rules

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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