Bibtex is inverting two reference from same author in the same year











up vote
1
down vote

favorite












The following is the relevant lines from the the main tex file:



usepackage[round]{natbib}

begin{document}
bibliography{References/references}
bibliographystyle{apa}
end{document}


And I have two references inside the bibtex file, from the same author and published in the same year:



@article{Author2011a,
author = {Author},
title = {{Title}}
year = {2011}
}

@article{Author2011b,
author = {Author},
title = {{Title}}
year = {2011}
}


The problem is when generating the *.bbl file with the bibtex command, the place in the document referencing citep{Author2011a} shows (Author2011b), and vice versa for the other reference. Same thing inside the *.bbl file.



Anybody knows what can cause this kind of problems?










share|improve this question


















  • 2




    The key which you give to your bib entry is arbitrary (as long as unique). BibTeX will then sort the entries by it's internal criteria, according to the style you use, then output the "extradate" information.
    – gusbrs
    Nov 28 at 19:23










  • How can I differentiate between them, if not with the key? It doesn't make sense when the reference is shown as Author2011a but points to Author2011b when clicked on. I tried the solution found here, with adding an invisible command to the title, but it didn't fix it.
    – Hakim
    Nov 28 at 19:38








  • 1




    The key identifies each entry, and they must be different. The "a"/"b" part on the label date is generated by the style, usually by some secondary sorting criterium (e.g. the title). But the style does associate each entry with a single label as output: the citation "Author (2011a)" will correspond to the entry "Author (2011a)" in your bibliography, even when the entry key in your bib file is "Author2011b".
    – gusbrs
    Nov 28 at 20:00










  • I see. So swapping the keys will fix this. I was confused because I was expecting bibtex to respect the order of referencing as it would do in an IEEE paper.
    – Hakim
    Nov 28 at 20:58






  • 1




    No, the message is that the key you put in your bib file is only important to correctly identify it in the citation. It doesn't matter whether the "a" in your bib file matches the "a" in the citation output. As long as you use a key and are consistent in it's use, the output by the style will be consistent too. In other words, there's really nothing to fix.
    – gusbrs
    Nov 28 at 21:05

















up vote
1
down vote

favorite












The following is the relevant lines from the the main tex file:



usepackage[round]{natbib}

begin{document}
bibliography{References/references}
bibliographystyle{apa}
end{document}


And I have two references inside the bibtex file, from the same author and published in the same year:



@article{Author2011a,
author = {Author},
title = {{Title}}
year = {2011}
}

@article{Author2011b,
author = {Author},
title = {{Title}}
year = {2011}
}


The problem is when generating the *.bbl file with the bibtex command, the place in the document referencing citep{Author2011a} shows (Author2011b), and vice versa for the other reference. Same thing inside the *.bbl file.



Anybody knows what can cause this kind of problems?










share|improve this question


















  • 2




    The key which you give to your bib entry is arbitrary (as long as unique). BibTeX will then sort the entries by it's internal criteria, according to the style you use, then output the "extradate" information.
    – gusbrs
    Nov 28 at 19:23










  • How can I differentiate between them, if not with the key? It doesn't make sense when the reference is shown as Author2011a but points to Author2011b when clicked on. I tried the solution found here, with adding an invisible command to the title, but it didn't fix it.
    – Hakim
    Nov 28 at 19:38








  • 1




    The key identifies each entry, and they must be different. The "a"/"b" part on the label date is generated by the style, usually by some secondary sorting criterium (e.g. the title). But the style does associate each entry with a single label as output: the citation "Author (2011a)" will correspond to the entry "Author (2011a)" in your bibliography, even when the entry key in your bib file is "Author2011b".
    – gusbrs
    Nov 28 at 20:00










  • I see. So swapping the keys will fix this. I was confused because I was expecting bibtex to respect the order of referencing as it would do in an IEEE paper.
    – Hakim
    Nov 28 at 20:58






  • 1




    No, the message is that the key you put in your bib file is only important to correctly identify it in the citation. It doesn't matter whether the "a" in your bib file matches the "a" in the citation output. As long as you use a key and are consistent in it's use, the output by the style will be consistent too. In other words, there's really nothing to fix.
    – gusbrs
    Nov 28 at 21:05















up vote
1
down vote

favorite









up vote
1
down vote

favorite











The following is the relevant lines from the the main tex file:



usepackage[round]{natbib}

begin{document}
bibliography{References/references}
bibliographystyle{apa}
end{document}


And I have two references inside the bibtex file, from the same author and published in the same year:



@article{Author2011a,
author = {Author},
title = {{Title}}
year = {2011}
}

@article{Author2011b,
author = {Author},
title = {{Title}}
year = {2011}
}


The problem is when generating the *.bbl file with the bibtex command, the place in the document referencing citep{Author2011a} shows (Author2011b), and vice versa for the other reference. Same thing inside the *.bbl file.



Anybody knows what can cause this kind of problems?










share|improve this question













The following is the relevant lines from the the main tex file:



usepackage[round]{natbib}

begin{document}
bibliography{References/references}
bibliographystyle{apa}
end{document}


And I have two references inside the bibtex file, from the same author and published in the same year:



@article{Author2011a,
author = {Author},
title = {{Title}}
year = {2011}
}

@article{Author2011b,
author = {Author},
title = {{Title}}
year = {2011}
}


The problem is when generating the *.bbl file with the bibtex command, the place in the document referencing citep{Author2011a} shows (Author2011b), and vice versa for the other reference. Same thing inside the *.bbl file.



Anybody knows what can cause this kind of problems?







bibtex






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 28 at 19:21









Hakim

17318




17318








  • 2




    The key which you give to your bib entry is arbitrary (as long as unique). BibTeX will then sort the entries by it's internal criteria, according to the style you use, then output the "extradate" information.
    – gusbrs
    Nov 28 at 19:23










  • How can I differentiate between them, if not with the key? It doesn't make sense when the reference is shown as Author2011a but points to Author2011b when clicked on. I tried the solution found here, with adding an invisible command to the title, but it didn't fix it.
    – Hakim
    Nov 28 at 19:38








  • 1




    The key identifies each entry, and they must be different. The "a"/"b" part on the label date is generated by the style, usually by some secondary sorting criterium (e.g. the title). But the style does associate each entry with a single label as output: the citation "Author (2011a)" will correspond to the entry "Author (2011a)" in your bibliography, even when the entry key in your bib file is "Author2011b".
    – gusbrs
    Nov 28 at 20:00










  • I see. So swapping the keys will fix this. I was confused because I was expecting bibtex to respect the order of referencing as it would do in an IEEE paper.
    – Hakim
    Nov 28 at 20:58






  • 1




    No, the message is that the key you put in your bib file is only important to correctly identify it in the citation. It doesn't matter whether the "a" in your bib file matches the "a" in the citation output. As long as you use a key and are consistent in it's use, the output by the style will be consistent too. In other words, there's really nothing to fix.
    – gusbrs
    Nov 28 at 21:05
















  • 2




    The key which you give to your bib entry is arbitrary (as long as unique). BibTeX will then sort the entries by it's internal criteria, according to the style you use, then output the "extradate" information.
    – gusbrs
    Nov 28 at 19:23










  • How can I differentiate between them, if not with the key? It doesn't make sense when the reference is shown as Author2011a but points to Author2011b when clicked on. I tried the solution found here, with adding an invisible command to the title, but it didn't fix it.
    – Hakim
    Nov 28 at 19:38








  • 1




    The key identifies each entry, and they must be different. The "a"/"b" part on the label date is generated by the style, usually by some secondary sorting criterium (e.g. the title). But the style does associate each entry with a single label as output: the citation "Author (2011a)" will correspond to the entry "Author (2011a)" in your bibliography, even when the entry key in your bib file is "Author2011b".
    – gusbrs
    Nov 28 at 20:00










  • I see. So swapping the keys will fix this. I was confused because I was expecting bibtex to respect the order of referencing as it would do in an IEEE paper.
    – Hakim
    Nov 28 at 20:58






  • 1




    No, the message is that the key you put in your bib file is only important to correctly identify it in the citation. It doesn't matter whether the "a" in your bib file matches the "a" in the citation output. As long as you use a key and are consistent in it's use, the output by the style will be consistent too. In other words, there's really nothing to fix.
    – gusbrs
    Nov 28 at 21:05










2




2




The key which you give to your bib entry is arbitrary (as long as unique). BibTeX will then sort the entries by it's internal criteria, according to the style you use, then output the "extradate" information.
– gusbrs
Nov 28 at 19:23




The key which you give to your bib entry is arbitrary (as long as unique). BibTeX will then sort the entries by it's internal criteria, according to the style you use, then output the "extradate" information.
– gusbrs
Nov 28 at 19:23












How can I differentiate between them, if not with the key? It doesn't make sense when the reference is shown as Author2011a but points to Author2011b when clicked on. I tried the solution found here, with adding an invisible command to the title, but it didn't fix it.
– Hakim
Nov 28 at 19:38






How can I differentiate between them, if not with the key? It doesn't make sense when the reference is shown as Author2011a but points to Author2011b when clicked on. I tried the solution found here, with adding an invisible command to the title, but it didn't fix it.
– Hakim
Nov 28 at 19:38






1




1




The key identifies each entry, and they must be different. The "a"/"b" part on the label date is generated by the style, usually by some secondary sorting criterium (e.g. the title). But the style does associate each entry with a single label as output: the citation "Author (2011a)" will correspond to the entry "Author (2011a)" in your bibliography, even when the entry key in your bib file is "Author2011b".
– gusbrs
Nov 28 at 20:00




The key identifies each entry, and they must be different. The "a"/"b" part on the label date is generated by the style, usually by some secondary sorting criterium (e.g. the title). But the style does associate each entry with a single label as output: the citation "Author (2011a)" will correspond to the entry "Author (2011a)" in your bibliography, even when the entry key in your bib file is "Author2011b".
– gusbrs
Nov 28 at 20:00












I see. So swapping the keys will fix this. I was confused because I was expecting bibtex to respect the order of referencing as it would do in an IEEE paper.
– Hakim
Nov 28 at 20:58




I see. So swapping the keys will fix this. I was confused because I was expecting bibtex to respect the order of referencing as it would do in an IEEE paper.
– Hakim
Nov 28 at 20:58




1




1




No, the message is that the key you put in your bib file is only important to correctly identify it in the citation. It doesn't matter whether the "a" in your bib file matches the "a" in the citation output. As long as you use a key and are consistent in it's use, the output by the style will be consistent too. In other words, there's really nothing to fix.
– gusbrs
Nov 28 at 21:05






No, the message is that the key you put in your bib file is only important to correctly identify it in the citation. It doesn't matter whether the "a" in your bib file matches the "a" in the citation output. As long as you use a key and are consistent in it's use, the output by the style will be consistent too. In other words, there's really nothing to fix.
– gusbrs
Nov 28 at 21:05












2 Answers
2






active

oldest

votes

















up vote
1
down vote













Well, first there are some missing comas in your bib file and some missing journals too ... In the following MWE I added both ...



Second I changed your used keys in the bib file to Author2011one and Author2011two.



Now you can see that the printed (2011a) and (2011b) in the bibliography are created independent from your given keys in the bib file. If you have two same entrys the bibliography needs to change the printed reference to "used year" + "a" or "used year" + "b" depending on the number of same titles ...



The following MWE



RequirePackage{filecontents}
begin{filecontents}{jobname.bib}
@article{Author2011one,
author = {Author},
title = {{Title}},
journal = {missing},
year = {2011},
}
@article{Author2011two,
author = {Author},
title = {{Title}},
journal = {missing},
year = {2011},
}
end{filecontents}


documentclass[letterpaper, 10pt]{article}

usepackage[round]{natbib}
usepackage{lipsum}

begin{document}

lipsum[1-3] citep{Author2011two}
nocite{*}

bibliographystyle{apa}
bibliography{jobname}

end{document}


gives you:



resulting bibliography






share|improve this answer





















  • As mentioned in the comments I only had to swap the two keys to make them consistent with those generated by bibtex. Your solution looks valid as well.
    – Hakim
    Nov 29 at 12:11


















up vote
0
down vote



accepted










Swapping the two keys fixed that problem. The resulting reference is consistent with what was generated by bibtex.






share|improve this answer





















    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',
    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462234%2fbibtex-is-inverting-two-reference-from-same-author-in-the-same-year%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    1
    down vote













    Well, first there are some missing comas in your bib file and some missing journals too ... In the following MWE I added both ...



    Second I changed your used keys in the bib file to Author2011one and Author2011two.



    Now you can see that the printed (2011a) and (2011b) in the bibliography are created independent from your given keys in the bib file. If you have two same entrys the bibliography needs to change the printed reference to "used year" + "a" or "used year" + "b" depending on the number of same titles ...



    The following MWE



    RequirePackage{filecontents}
    begin{filecontents}{jobname.bib}
    @article{Author2011one,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    @article{Author2011two,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    end{filecontents}


    documentclass[letterpaper, 10pt]{article}

    usepackage[round]{natbib}
    usepackage{lipsum}

    begin{document}

    lipsum[1-3] citep{Author2011two}
    nocite{*}

    bibliographystyle{apa}
    bibliography{jobname}

    end{document}


    gives you:



    resulting bibliography






    share|improve this answer





















    • As mentioned in the comments I only had to swap the two keys to make them consistent with those generated by bibtex. Your solution looks valid as well.
      – Hakim
      Nov 29 at 12:11















    up vote
    1
    down vote













    Well, first there are some missing comas in your bib file and some missing journals too ... In the following MWE I added both ...



    Second I changed your used keys in the bib file to Author2011one and Author2011two.



    Now you can see that the printed (2011a) and (2011b) in the bibliography are created independent from your given keys in the bib file. If you have two same entrys the bibliography needs to change the printed reference to "used year" + "a" or "used year" + "b" depending on the number of same titles ...



    The following MWE



    RequirePackage{filecontents}
    begin{filecontents}{jobname.bib}
    @article{Author2011one,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    @article{Author2011two,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    end{filecontents}


    documentclass[letterpaper, 10pt]{article}

    usepackage[round]{natbib}
    usepackage{lipsum}

    begin{document}

    lipsum[1-3] citep{Author2011two}
    nocite{*}

    bibliographystyle{apa}
    bibliography{jobname}

    end{document}


    gives you:



    resulting bibliography






    share|improve this answer





















    • As mentioned in the comments I only had to swap the two keys to make them consistent with those generated by bibtex. Your solution looks valid as well.
      – Hakim
      Nov 29 at 12:11













    up vote
    1
    down vote










    up vote
    1
    down vote









    Well, first there are some missing comas in your bib file and some missing journals too ... In the following MWE I added both ...



    Second I changed your used keys in the bib file to Author2011one and Author2011two.



    Now you can see that the printed (2011a) and (2011b) in the bibliography are created independent from your given keys in the bib file. If you have two same entrys the bibliography needs to change the printed reference to "used year" + "a" or "used year" + "b" depending on the number of same titles ...



    The following MWE



    RequirePackage{filecontents}
    begin{filecontents}{jobname.bib}
    @article{Author2011one,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    @article{Author2011two,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    end{filecontents}


    documentclass[letterpaper, 10pt]{article}

    usepackage[round]{natbib}
    usepackage{lipsum}

    begin{document}

    lipsum[1-3] citep{Author2011two}
    nocite{*}

    bibliographystyle{apa}
    bibliography{jobname}

    end{document}


    gives you:



    resulting bibliography






    share|improve this answer












    Well, first there are some missing comas in your bib file and some missing journals too ... In the following MWE I added both ...



    Second I changed your used keys in the bib file to Author2011one and Author2011two.



    Now you can see that the printed (2011a) and (2011b) in the bibliography are created independent from your given keys in the bib file. If you have two same entrys the bibliography needs to change the printed reference to "used year" + "a" or "used year" + "b" depending on the number of same titles ...



    The following MWE



    RequirePackage{filecontents}
    begin{filecontents}{jobname.bib}
    @article{Author2011one,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    @article{Author2011two,
    author = {Author},
    title = {{Title}},
    journal = {missing},
    year = {2011},
    }
    end{filecontents}


    documentclass[letterpaper, 10pt]{article}

    usepackage[round]{natbib}
    usepackage{lipsum}

    begin{document}

    lipsum[1-3] citep{Author2011two}
    nocite{*}

    bibliographystyle{apa}
    bibliography{jobname}

    end{document}


    gives you:



    resulting bibliography







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 28 at 21:49









    Kurt

    34.5k846157




    34.5k846157












    • As mentioned in the comments I only had to swap the two keys to make them consistent with those generated by bibtex. Your solution looks valid as well.
      – Hakim
      Nov 29 at 12:11


















    • As mentioned in the comments I only had to swap the two keys to make them consistent with those generated by bibtex. Your solution looks valid as well.
      – Hakim
      Nov 29 at 12:11
















    As mentioned in the comments I only had to swap the two keys to make them consistent with those generated by bibtex. Your solution looks valid as well.
    – Hakim
    Nov 29 at 12:11




    As mentioned in the comments I only had to swap the two keys to make them consistent with those generated by bibtex. Your solution looks valid as well.
    – Hakim
    Nov 29 at 12:11










    up vote
    0
    down vote



    accepted










    Swapping the two keys fixed that problem. The resulting reference is consistent with what was generated by bibtex.






    share|improve this answer

























      up vote
      0
      down vote



      accepted










      Swapping the two keys fixed that problem. The resulting reference is consistent with what was generated by bibtex.






      share|improve this answer























        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        Swapping the two keys fixed that problem. The resulting reference is consistent with what was generated by bibtex.






        share|improve this answer












        Swapping the two keys fixed that problem. The resulting reference is consistent with what was generated by bibtex.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 29 at 12:12









        Hakim

        17318




        17318






























            draft saved

            draft discarded




















































            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.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f462234%2fbibtex-is-inverting-two-reference-from-same-author-in-the-same-year%23new-answer', 'question_page');
            }
            );

            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







            Popular posts from this blog

            Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

            ComboBox Display Member on multiple fields

            Is it possible to collect Nectar points via Trainline?