Missing fields in reference [natbib, custom bib style, better bibtex export]
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}
bibtex natbib
|
show 8 more comments
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}
bibtex natbib
1
In a well-formed.bibentry 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 bothbibliographystyleandbibliographytake their argument without file extension, some systems are more forgiving than others in that regard, but I got an error withbibliographystyle{vancouver.bst}becausevancouver.bst.bstwas not found). ...
– moewe
Oct 14 '18 at 6:02
1
I should mention that thevancouver.bstI tested this with is from CTAN: ctan.org/pkg/vancouver. If your version ofvancouver.bstfrom 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.blgfile (BibTeX's log) for hints and to be absolutely sure also check the (LaTeX).logfor 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
|
show 8 more comments
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}
bibtex natbib
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}
bibtex natbib
bibtex natbib
edited Oct 14 '18 at 6:05
moewe
86.7k9110333
86.7k9110333
asked Oct 14 '18 at 5:30
epdnm
375
375
1
In a well-formed.bibentry 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 bothbibliographystyleandbibliographytake their argument without file extension, some systems are more forgiving than others in that regard, but I got an error withbibliographystyle{vancouver.bst}becausevancouver.bst.bstwas not found). ...
– moewe
Oct 14 '18 at 6:02
1
I should mention that thevancouver.bstI tested this with is from CTAN: ctan.org/pkg/vancouver. If your version ofvancouver.bstfrom 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.blgfile (BibTeX's log) for hints and to be absolutely sure also check the (LaTeX).logfor 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
|
show 8 more comments
1
In a well-formed.bibentry 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 bothbibliographystyleandbibliographytake their argument without file extension, some systems are more forgiving than others in that regard, but I got an error withbibliographystyle{vancouver.bst}becausevancouver.bst.bstwas not found). ...
– moewe
Oct 14 '18 at 6:02
1
I should mention that thevancouver.bstI tested this with is from CTAN: ctan.org/pkg/vancouver. If your version ofvancouver.bstfrom 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.blgfile (BibTeX's log) for hints and to be absolutely sure also check the (LaTeX).logfor 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
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
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
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
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
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
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
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
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
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
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
|
show 8 more comments
1 Answer
1
active
oldest
votes
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
DOIfield, then - add a field 'note', with contents literal bibtex contents
{doi{...}}, - with
...being theDOI, escaped where necessary according to the bibtexverbatimrules
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455107%2fmissing-fields-in-reference-natbib-custom-bib-style-better-bibtex-export%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
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
DOIfield, then - add a field 'note', with contents literal bibtex contents
{doi{...}}, - with
...being theDOI, escaped where necessary according to the bibtexverbatimrules
add a comment |
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
DOIfield, then - add a field 'note', with contents literal bibtex contents
{doi{...}}, - with
...being theDOI, escaped where necessary according to the bibtexverbatimrules
add a comment |
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
DOIfield, then - add a field 'note', with contents literal bibtex contents
{doi{...}}, - with
...being theDOI, escaped where necessary according to the bibtexverbatimrules
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
DOIfield, then - add a field 'note', with contents literal bibtex contents
{doi{...}}, - with
...being theDOI, escaped where necessary according to the bibtexverbatimrules
edited Oct 15 '18 at 15:39
answered Oct 15 '18 at 15:34
retorquere
635613
635613
add a comment |
add a comment |
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f455107%2fmissing-fields-in-reference-natbib-custom-bib-style-better-bibtex-export%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
In a well-formed
.bibentry 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 bothbibliographystyleandbibliographytake their argument without file extension, some systems are more forgiving than others in that regard, but I got an error withbibliographystyle{vancouver.bst}becausevancouver.bst.bstwas not found). ...– moewe
Oct 14 '18 at 6:02
1
I should mention that the
vancouver.bstI tested this with is from CTAN: ctan.org/pkg/vancouver. If your version ofvancouver.bstfrom 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
.blgfile (BibTeX's log) for hints and to be absolutely sure also check the (LaTeX).logfor 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