Unwanted commas in formatted bibliographic entries











up vote
2
down vote

favorite












I'm quite new to latex and related stuff but I cannot get one thing to work for me.



Consider the following bib entry:



@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}


I'm getting output in bibliography with (to me) irritating commas after surnames:



[2] Goossens, M., Mittelbach, F., and Samarin, A. The LaTeX Companion.
Addison-Wesley, Reading, Massachusetts, 1993.


By any possibility is it some popular error, or would I have to dive into bst files to fix this? In this particular example I replaced the bst provided ( yes, i replaced style in .cls too) and it happened with .bst from folder I've found in Bibtex (acm.bst).



Any help would be appreciated. Thanks in advance.










share|improve this question









New contributor




kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcomer to TeX SX! Could you consider using biblatex?
    – Bernard
    Nov 14 at 0:05












  • First, teh commas you get between a person's last name and first name can be removed by changing the reference style. Second, the and in between two person's names would automatically become a comma. You would probably be fine after taking care of those.
    – zyy
    Nov 14 at 0:22






  • 1




    @Andrew This will have no effect. For simple FirstName LastName .bib entries, either order in the .bib file will be fine. The issue is with the .bst file. The comma is not an error, it is simply a common way to format names. So the OP needs to find a style that suits them.
    – Alan Munn
    Nov 14 at 2:55










  • Please tell us how you would like the names to be formatted. Is it just the comma between the surname and the initial(s), or are there other stylistic issues you'd like to fix? Please also confirm that you're employing the acm bibliography style at present.
    – Mico
    Nov 14 at 8:14






  • 1




    The only issue for me is comma between name and surname, separated authors are fine for me.
    – kolboc
    Nov 14 at 8:57















up vote
2
down vote

favorite












I'm quite new to latex and related stuff but I cannot get one thing to work for me.



Consider the following bib entry:



@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}


I'm getting output in bibliography with (to me) irritating commas after surnames:



[2] Goossens, M., Mittelbach, F., and Samarin, A. The LaTeX Companion.
Addison-Wesley, Reading, Massachusetts, 1993.


By any possibility is it some popular error, or would I have to dive into bst files to fix this? In this particular example I replaced the bst provided ( yes, i replaced style in .cls too) and it happened with .bst from folder I've found in Bibtex (acm.bst).



Any help would be appreciated. Thanks in advance.










share|improve this question









New contributor




kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Welcomer to TeX SX! Could you consider using biblatex?
    – Bernard
    Nov 14 at 0:05












  • First, teh commas you get between a person's last name and first name can be removed by changing the reference style. Second, the and in between two person's names would automatically become a comma. You would probably be fine after taking care of those.
    – zyy
    Nov 14 at 0:22






  • 1




    @Andrew This will have no effect. For simple FirstName LastName .bib entries, either order in the .bib file will be fine. The issue is with the .bst file. The comma is not an error, it is simply a common way to format names. So the OP needs to find a style that suits them.
    – Alan Munn
    Nov 14 at 2:55










  • Please tell us how you would like the names to be formatted. Is it just the comma between the surname and the initial(s), or are there other stylistic issues you'd like to fix? Please also confirm that you're employing the acm bibliography style at present.
    – Mico
    Nov 14 at 8:14






  • 1




    The only issue for me is comma between name and surname, separated authors are fine for me.
    – kolboc
    Nov 14 at 8:57













up vote
2
down vote

favorite









up vote
2
down vote

favorite











I'm quite new to latex and related stuff but I cannot get one thing to work for me.



Consider the following bib entry:



@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}


I'm getting output in bibliography with (to me) irritating commas after surnames:



[2] Goossens, M., Mittelbach, F., and Samarin, A. The LaTeX Companion.
Addison-Wesley, Reading, Massachusetts, 1993.


By any possibility is it some popular error, or would I have to dive into bst files to fix this? In this particular example I replaced the bst provided ( yes, i replaced style in .cls too) and it happened with .bst from folder I've found in Bibtex (acm.bst).



Any help would be appreciated. Thanks in advance.










share|improve this question









New contributor




kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm quite new to latex and related stuff but I cannot get one thing to work for me.



Consider the following bib entry:



@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX Companion",
year = "1993",
publisher = "Addison-Wesley",
address = "Reading, Massachusetts"
}


I'm getting output in bibliography with (to me) irritating commas after surnames:



[2] Goossens, M., Mittelbach, F., and Samarin, A. The LaTeX Companion.
Addison-Wesley, Reading, Massachusetts, 1993.


By any possibility is it some popular error, or would I have to dive into bst files to fix this? In this particular example I replaced the bst provided ( yes, i replaced style in .cls too) and it happened with .bst from folder I've found in Bibtex (acm.bst).



Any help would be appreciated. Thanks in advance.







bibliographies bibtex






share|improve this question









New contributor




kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Nov 14 at 10:59









Mico

269k30364749




269k30364749






New contributor




kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Nov 14 at 0:02









kolboc

132




132




New contributor




kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






kolboc is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












  • Welcomer to TeX SX! Could you consider using biblatex?
    – Bernard
    Nov 14 at 0:05












  • First, teh commas you get between a person's last name and first name can be removed by changing the reference style. Second, the and in between two person's names would automatically become a comma. You would probably be fine after taking care of those.
    – zyy
    Nov 14 at 0:22






  • 1




    @Andrew This will have no effect. For simple FirstName LastName .bib entries, either order in the .bib file will be fine. The issue is with the .bst file. The comma is not an error, it is simply a common way to format names. So the OP needs to find a style that suits them.
    – Alan Munn
    Nov 14 at 2:55










  • Please tell us how you would like the names to be formatted. Is it just the comma between the surname and the initial(s), or are there other stylistic issues you'd like to fix? Please also confirm that you're employing the acm bibliography style at present.
    – Mico
    Nov 14 at 8:14






  • 1




    The only issue for me is comma between name and surname, separated authors are fine for me.
    – kolboc
    Nov 14 at 8:57


















  • Welcomer to TeX SX! Could you consider using biblatex?
    – Bernard
    Nov 14 at 0:05












  • First, teh commas you get between a person's last name and first name can be removed by changing the reference style. Second, the and in between two person's names would automatically become a comma. You would probably be fine after taking care of those.
    – zyy
    Nov 14 at 0:22






  • 1




    @Andrew This will have no effect. For simple FirstName LastName .bib entries, either order in the .bib file will be fine. The issue is with the .bst file. The comma is not an error, it is simply a common way to format names. So the OP needs to find a style that suits them.
    – Alan Munn
    Nov 14 at 2:55










  • Please tell us how you would like the names to be formatted. Is it just the comma between the surname and the initial(s), or are there other stylistic issues you'd like to fix? Please also confirm that you're employing the acm bibliography style at present.
    – Mico
    Nov 14 at 8:14






  • 1




    The only issue for me is comma between name and surname, separated authors are fine for me.
    – kolboc
    Nov 14 at 8:57
















Welcomer to TeX SX! Could you consider using biblatex?
– Bernard
Nov 14 at 0:05






Welcomer to TeX SX! Could you consider using biblatex?
– Bernard
Nov 14 at 0:05














First, teh commas you get between a person's last name and first name can be removed by changing the reference style. Second, the and in between two person's names would automatically become a comma. You would probably be fine after taking care of those.
– zyy
Nov 14 at 0:22




First, teh commas you get between a person's last name and first name can be removed by changing the reference style. Second, the and in between two person's names would automatically become a comma. You would probably be fine after taking care of those.
– zyy
Nov 14 at 0:22




1




1




@Andrew This will have no effect. For simple FirstName LastName .bib entries, either order in the .bib file will be fine. The issue is with the .bst file. The comma is not an error, it is simply a common way to format names. So the OP needs to find a style that suits them.
– Alan Munn
Nov 14 at 2:55




@Andrew This will have no effect. For simple FirstName LastName .bib entries, either order in the .bib file will be fine. The issue is with the .bst file. The comma is not an error, it is simply a common way to format names. So the OP needs to find a style that suits them.
– Alan Munn
Nov 14 at 2:55












Please tell us how you would like the names to be formatted. Is it just the comma between the surname and the initial(s), or are there other stylistic issues you'd like to fix? Please also confirm that you're employing the acm bibliography style at present.
– Mico
Nov 14 at 8:14




Please tell us how you would like the names to be formatted. Is it just the comma between the surname and the initial(s), or are there other stylistic issues you'd like to fix? Please also confirm that you're employing the acm bibliography style at present.
– Mico
Nov 14 at 8:14




1




1




The only issue for me is comma between name and surname, separated authors are fine for me.
– kolboc
Nov 14 at 8:57




The only issue for me is comma between name and surname, separated authors are fine for me.
– kolboc
Nov 14 at 8:57










1 Answer
1






active

oldest

votes

















up vote
2
down vote



accepted










As @AlanMunn has already pointed out in a comment, the presence of a comma between an author's formatted surname and the initials of his/her given name(s) is not an error. Instead, it is actually a fairly common stylistic choice for displaying authors' names.



The preamble of the file acm.bst contains the following information:




% ACM Transactions bibliography style (8-Dec-10 version)



% A lot like abbrv.bst, but names come out "Last, initials", and in sc.



% Some dates are parenthesized.




Note that the comma feature and the fact that names are typeset in small-caps are mentioned explicitly.



Have you tried using the unsrt bib style yet? Aside: If you employ the natbib citation management package, you may want to use unsrtnat instead of unsrt. It's a reimplementation of the much older unsrt bib style, but with the ability to (a) process fields such as url, issn, and isbn and (b) produce authoryear-style citation callouts as well as the basic numeric-style call-outs.





Assuming that you wish to continue using the acm bibliography style and simply desire to have no commas between surnames and initials, I suggest you proceed as follows.




  • Find a copy of the file acm.bst in your TeX distribution.


  • Make a copy of this file and name the copy, say, acm-nocommas.bst. Do not edit an original file of the TeX distribution directly.


  • Open the file acm-nocommas.bst in a text editor. The editor you use to edit your tex files will do fine.


  • In this file, locate the function called format.names. (In my copy of this file, the function starts of line 190.)



  • In this function, locate the line



        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=


    In case you're curious: vv, ll, and jj refer to the (unabbreviated) von, lastname (or surname), and junior components of a person's full name, while f. refers to the abbreviated given (or first) name component.




  • Change this line to



        { s nameptr "{vv~}{ll}{ f.}{, jj}" format.name$ 't :=


    Observe that two changes have been applied: (i) there's no longer a comma immediately before f. and (ii) the "junior component" is now placed last, still offset with a comma from the rest of the name. I think it's essential to set off any "junior component" in this manner.



  • Save the file acm-mod.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your text distribution suitably.


  • In your main tex file, change the instruction bibliographystyle{acm} to bibliographystyle{acm-mod}. Next, perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.



Happy BibTeXing!





A full MWE and its output:



enter image description here



RequirePackage{filecontents}
begin{filecontents}{mybib.bib}
@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX{} Companion",
year = 1993,
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
}
@article{lucas-rapping:1969,
author = "Lucas, Jr., Robert E. and Leonard A. Rapping",
title = "Real Wages, Employment, and Inflation",
journal = "Journal of Political Economy",
year = 1969,
volume = 77,
number = 5,
pages = "721--754",
}
end{filecontents}

documentclass{article}
bibliographystyle{acm-mod}

begin{document}
cite{latexcompanion}, cite{lucas-rapping:1969}
bibliography{mybib}
end{document}





share|improve this answer























  • one more question, what is a recommended program to edit such files, I tried it yesterday and thought it was my fault but again changing only that function lead to "can't start a style-file command---line 1 " and "Sorry, but "MiKTeX Compiler Driver" did not succeed."
    – kolboc
    Nov 14 at 10:10












  • I tried and it seems that as soon as I open file with notepad it became corrupted.
    – kolboc
    Nov 14 at 10:14










  • ok nvm. SublimeText have no problems with proper formatting that one. Thanks!
    – kolboc
    Nov 14 at 10:16










  • @kolboc - Please see the posting LaTeX Editors/IDEs for choices for TeX-aware editing software. For what it's worth, in my opinion notepad is singularly unsuited for work with TeX and LaTeX. Do yourself a huge favor and start using a real editor.
    – Mico
    Nov 14 at 10:55













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


}
});






kolboc is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459867%2funwanted-commas-in-formatted-bibliographic-entries%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








up vote
2
down vote



accepted










As @AlanMunn has already pointed out in a comment, the presence of a comma between an author's formatted surname and the initials of his/her given name(s) is not an error. Instead, it is actually a fairly common stylistic choice for displaying authors' names.



The preamble of the file acm.bst contains the following information:




% ACM Transactions bibliography style (8-Dec-10 version)



% A lot like abbrv.bst, but names come out "Last, initials", and in sc.



% Some dates are parenthesized.




Note that the comma feature and the fact that names are typeset in small-caps are mentioned explicitly.



Have you tried using the unsrt bib style yet? Aside: If you employ the natbib citation management package, you may want to use unsrtnat instead of unsrt. It's a reimplementation of the much older unsrt bib style, but with the ability to (a) process fields such as url, issn, and isbn and (b) produce authoryear-style citation callouts as well as the basic numeric-style call-outs.





Assuming that you wish to continue using the acm bibliography style and simply desire to have no commas between surnames and initials, I suggest you proceed as follows.




  • Find a copy of the file acm.bst in your TeX distribution.


  • Make a copy of this file and name the copy, say, acm-nocommas.bst. Do not edit an original file of the TeX distribution directly.


  • Open the file acm-nocommas.bst in a text editor. The editor you use to edit your tex files will do fine.


  • In this file, locate the function called format.names. (In my copy of this file, the function starts of line 190.)



  • In this function, locate the line



        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=


    In case you're curious: vv, ll, and jj refer to the (unabbreviated) von, lastname (or surname), and junior components of a person's full name, while f. refers to the abbreviated given (or first) name component.




  • Change this line to



        { s nameptr "{vv~}{ll}{ f.}{, jj}" format.name$ 't :=


    Observe that two changes have been applied: (i) there's no longer a comma immediately before f. and (ii) the "junior component" is now placed last, still offset with a comma from the rest of the name. I think it's essential to set off any "junior component" in this manner.



  • Save the file acm-mod.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your text distribution suitably.


  • In your main tex file, change the instruction bibliographystyle{acm} to bibliographystyle{acm-mod}. Next, perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.



Happy BibTeXing!





A full MWE and its output:



enter image description here



RequirePackage{filecontents}
begin{filecontents}{mybib.bib}
@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX{} Companion",
year = 1993,
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
}
@article{lucas-rapping:1969,
author = "Lucas, Jr., Robert E. and Leonard A. Rapping",
title = "Real Wages, Employment, and Inflation",
journal = "Journal of Political Economy",
year = 1969,
volume = 77,
number = 5,
pages = "721--754",
}
end{filecontents}

documentclass{article}
bibliographystyle{acm-mod}

begin{document}
cite{latexcompanion}, cite{lucas-rapping:1969}
bibliography{mybib}
end{document}





share|improve this answer























  • one more question, what is a recommended program to edit such files, I tried it yesterday and thought it was my fault but again changing only that function lead to "can't start a style-file command---line 1 " and "Sorry, but "MiKTeX Compiler Driver" did not succeed."
    – kolboc
    Nov 14 at 10:10












  • I tried and it seems that as soon as I open file with notepad it became corrupted.
    – kolboc
    Nov 14 at 10:14










  • ok nvm. SublimeText have no problems with proper formatting that one. Thanks!
    – kolboc
    Nov 14 at 10:16










  • @kolboc - Please see the posting LaTeX Editors/IDEs for choices for TeX-aware editing software. For what it's worth, in my opinion notepad is singularly unsuited for work with TeX and LaTeX. Do yourself a huge favor and start using a real editor.
    – Mico
    Nov 14 at 10:55

















up vote
2
down vote



accepted










As @AlanMunn has already pointed out in a comment, the presence of a comma between an author's formatted surname and the initials of his/her given name(s) is not an error. Instead, it is actually a fairly common stylistic choice for displaying authors' names.



The preamble of the file acm.bst contains the following information:




% ACM Transactions bibliography style (8-Dec-10 version)



% A lot like abbrv.bst, but names come out "Last, initials", and in sc.



% Some dates are parenthesized.




Note that the comma feature and the fact that names are typeset in small-caps are mentioned explicitly.



Have you tried using the unsrt bib style yet? Aside: If you employ the natbib citation management package, you may want to use unsrtnat instead of unsrt. It's a reimplementation of the much older unsrt bib style, but with the ability to (a) process fields such as url, issn, and isbn and (b) produce authoryear-style citation callouts as well as the basic numeric-style call-outs.





Assuming that you wish to continue using the acm bibliography style and simply desire to have no commas between surnames and initials, I suggest you proceed as follows.




  • Find a copy of the file acm.bst in your TeX distribution.


  • Make a copy of this file and name the copy, say, acm-nocommas.bst. Do not edit an original file of the TeX distribution directly.


  • Open the file acm-nocommas.bst in a text editor. The editor you use to edit your tex files will do fine.


  • In this file, locate the function called format.names. (In my copy of this file, the function starts of line 190.)



  • In this function, locate the line



        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=


    In case you're curious: vv, ll, and jj refer to the (unabbreviated) von, lastname (or surname), and junior components of a person's full name, while f. refers to the abbreviated given (or first) name component.




  • Change this line to



        { s nameptr "{vv~}{ll}{ f.}{, jj}" format.name$ 't :=


    Observe that two changes have been applied: (i) there's no longer a comma immediately before f. and (ii) the "junior component" is now placed last, still offset with a comma from the rest of the name. I think it's essential to set off any "junior component" in this manner.



  • Save the file acm-mod.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your text distribution suitably.


  • In your main tex file, change the instruction bibliographystyle{acm} to bibliographystyle{acm-mod}. Next, perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.



Happy BibTeXing!





A full MWE and its output:



enter image description here



RequirePackage{filecontents}
begin{filecontents}{mybib.bib}
@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX{} Companion",
year = 1993,
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
}
@article{lucas-rapping:1969,
author = "Lucas, Jr., Robert E. and Leonard A. Rapping",
title = "Real Wages, Employment, and Inflation",
journal = "Journal of Political Economy",
year = 1969,
volume = 77,
number = 5,
pages = "721--754",
}
end{filecontents}

documentclass{article}
bibliographystyle{acm-mod}

begin{document}
cite{latexcompanion}, cite{lucas-rapping:1969}
bibliography{mybib}
end{document}





share|improve this answer























  • one more question, what is a recommended program to edit such files, I tried it yesterday and thought it was my fault but again changing only that function lead to "can't start a style-file command---line 1 " and "Sorry, but "MiKTeX Compiler Driver" did not succeed."
    – kolboc
    Nov 14 at 10:10












  • I tried and it seems that as soon as I open file with notepad it became corrupted.
    – kolboc
    Nov 14 at 10:14










  • ok nvm. SublimeText have no problems with proper formatting that one. Thanks!
    – kolboc
    Nov 14 at 10:16










  • @kolboc - Please see the posting LaTeX Editors/IDEs for choices for TeX-aware editing software. For what it's worth, in my opinion notepad is singularly unsuited for work with TeX and LaTeX. Do yourself a huge favor and start using a real editor.
    – Mico
    Nov 14 at 10:55















up vote
2
down vote



accepted







up vote
2
down vote



accepted






As @AlanMunn has already pointed out in a comment, the presence of a comma between an author's formatted surname and the initials of his/her given name(s) is not an error. Instead, it is actually a fairly common stylistic choice for displaying authors' names.



The preamble of the file acm.bst contains the following information:




% ACM Transactions bibliography style (8-Dec-10 version)



% A lot like abbrv.bst, but names come out "Last, initials", and in sc.



% Some dates are parenthesized.




Note that the comma feature and the fact that names are typeset in small-caps are mentioned explicitly.



Have you tried using the unsrt bib style yet? Aside: If you employ the natbib citation management package, you may want to use unsrtnat instead of unsrt. It's a reimplementation of the much older unsrt bib style, but with the ability to (a) process fields such as url, issn, and isbn and (b) produce authoryear-style citation callouts as well as the basic numeric-style call-outs.





Assuming that you wish to continue using the acm bibliography style and simply desire to have no commas between surnames and initials, I suggest you proceed as follows.




  • Find a copy of the file acm.bst in your TeX distribution.


  • Make a copy of this file and name the copy, say, acm-nocommas.bst. Do not edit an original file of the TeX distribution directly.


  • Open the file acm-nocommas.bst in a text editor. The editor you use to edit your tex files will do fine.


  • In this file, locate the function called format.names. (In my copy of this file, the function starts of line 190.)



  • In this function, locate the line



        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=


    In case you're curious: vv, ll, and jj refer to the (unabbreviated) von, lastname (or surname), and junior components of a person's full name, while f. refers to the abbreviated given (or first) name component.




  • Change this line to



        { s nameptr "{vv~}{ll}{ f.}{, jj}" format.name$ 't :=


    Observe that two changes have been applied: (i) there's no longer a comma immediately before f. and (ii) the "junior component" is now placed last, still offset with a comma from the rest of the name. I think it's essential to set off any "junior component" in this manner.



  • Save the file acm-mod.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your text distribution suitably.


  • In your main tex file, change the instruction bibliographystyle{acm} to bibliographystyle{acm-mod}. Next, perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.



Happy BibTeXing!





A full MWE and its output:



enter image description here



RequirePackage{filecontents}
begin{filecontents}{mybib.bib}
@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX{} Companion",
year = 1993,
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
}
@article{lucas-rapping:1969,
author = "Lucas, Jr., Robert E. and Leonard A. Rapping",
title = "Real Wages, Employment, and Inflation",
journal = "Journal of Political Economy",
year = 1969,
volume = 77,
number = 5,
pages = "721--754",
}
end{filecontents}

documentclass{article}
bibliographystyle{acm-mod}

begin{document}
cite{latexcompanion}, cite{lucas-rapping:1969}
bibliography{mybib}
end{document}





share|improve this answer














As @AlanMunn has already pointed out in a comment, the presence of a comma between an author's formatted surname and the initials of his/her given name(s) is not an error. Instead, it is actually a fairly common stylistic choice for displaying authors' names.



The preamble of the file acm.bst contains the following information:




% ACM Transactions bibliography style (8-Dec-10 version)



% A lot like abbrv.bst, but names come out "Last, initials", and in sc.



% Some dates are parenthesized.




Note that the comma feature and the fact that names are typeset in small-caps are mentioned explicitly.



Have you tried using the unsrt bib style yet? Aside: If you employ the natbib citation management package, you may want to use unsrtnat instead of unsrt. It's a reimplementation of the much older unsrt bib style, but with the ability to (a) process fields such as url, issn, and isbn and (b) produce authoryear-style citation callouts as well as the basic numeric-style call-outs.





Assuming that you wish to continue using the acm bibliography style and simply desire to have no commas between surnames and initials, I suggest you proceed as follows.




  • Find a copy of the file acm.bst in your TeX distribution.


  • Make a copy of this file and name the copy, say, acm-nocommas.bst. Do not edit an original file of the TeX distribution directly.


  • Open the file acm-nocommas.bst in a text editor. The editor you use to edit your tex files will do fine.


  • In this file, locate the function called format.names. (In my copy of this file, the function starts of line 190.)



  • In this function, locate the line



        { s nameptr "{vv~}{ll}{, jj}{, f.}" format.name$ 't :=


    In case you're curious: vv, ll, and jj refer to the (unabbreviated) von, lastname (or surname), and junior components of a person's full name, while f. refers to the abbreviated given (or first) name component.




  • Change this line to



        { s nameptr "{vv~}{ll}{ f.}{, jj}" format.name$ 't :=


    Observe that two changes have been applied: (i) there's no longer a comma immediately before f. and (ii) the "junior component" is now placed last, still offset with a comma from the rest of the name. I think it's essential to set off any "junior component" in this manner.



  • Save the file acm-mod.bst either in the directory where your main tex file is located or in a directory that's searched by BibTeX. If you choose the latter option, be sure to update the filename database of your text distribution suitably.


  • In your main tex file, change the instruction bibliographystyle{acm} to bibliographystyle{acm-mod}. Next, perform a full recompile cycle: LaTeX, BibTeX, and LaTeX twice more.



Happy BibTeXing!





A full MWE and its output:



enter image description here



RequirePackage{filecontents}
begin{filecontents}{mybib.bib}
@book{latexcompanion,
author = "Michel Goossens and Frank Mittelbach and Alexander Samarin",
title = "The LaTeX{} Companion",
year = 1993,
publisher = "Addison-Wesley",
address = "Reading, Massachusetts",
}
@article{lucas-rapping:1969,
author = "Lucas, Jr., Robert E. and Leonard A. Rapping",
title = "Real Wages, Employment, and Inflation",
journal = "Journal of Political Economy",
year = 1969,
volume = 77,
number = 5,
pages = "721--754",
}
end{filecontents}

documentclass{article}
bibliographystyle{acm-mod}

begin{document}
cite{latexcompanion}, cite{lucas-rapping:1969}
bibliography{mybib}
end{document}






share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 14 at 10:56

























answered Nov 14 at 9:23









Mico

269k30364749




269k30364749












  • one more question, what is a recommended program to edit such files, I tried it yesterday and thought it was my fault but again changing only that function lead to "can't start a style-file command---line 1 " and "Sorry, but "MiKTeX Compiler Driver" did not succeed."
    – kolboc
    Nov 14 at 10:10












  • I tried and it seems that as soon as I open file with notepad it became corrupted.
    – kolboc
    Nov 14 at 10:14










  • ok nvm. SublimeText have no problems with proper formatting that one. Thanks!
    – kolboc
    Nov 14 at 10:16










  • @kolboc - Please see the posting LaTeX Editors/IDEs for choices for TeX-aware editing software. For what it's worth, in my opinion notepad is singularly unsuited for work with TeX and LaTeX. Do yourself a huge favor and start using a real editor.
    – Mico
    Nov 14 at 10:55




















  • one more question, what is a recommended program to edit such files, I tried it yesterday and thought it was my fault but again changing only that function lead to "can't start a style-file command---line 1 " and "Sorry, but "MiKTeX Compiler Driver" did not succeed."
    – kolboc
    Nov 14 at 10:10












  • I tried and it seems that as soon as I open file with notepad it became corrupted.
    – kolboc
    Nov 14 at 10:14










  • ok nvm. SublimeText have no problems with proper formatting that one. Thanks!
    – kolboc
    Nov 14 at 10:16










  • @kolboc - Please see the posting LaTeX Editors/IDEs for choices for TeX-aware editing software. For what it's worth, in my opinion notepad is singularly unsuited for work with TeX and LaTeX. Do yourself a huge favor and start using a real editor.
    – Mico
    Nov 14 at 10:55


















one more question, what is a recommended program to edit such files, I tried it yesterday and thought it was my fault but again changing only that function lead to "can't start a style-file command---line 1 " and "Sorry, but "MiKTeX Compiler Driver" did not succeed."
– kolboc
Nov 14 at 10:10






one more question, what is a recommended program to edit such files, I tried it yesterday and thought it was my fault but again changing only that function lead to "can't start a style-file command---line 1 " and "Sorry, but "MiKTeX Compiler Driver" did not succeed."
– kolboc
Nov 14 at 10:10














I tried and it seems that as soon as I open file with notepad it became corrupted.
– kolboc
Nov 14 at 10:14




I tried and it seems that as soon as I open file with notepad it became corrupted.
– kolboc
Nov 14 at 10:14












ok nvm. SublimeText have no problems with proper formatting that one. Thanks!
– kolboc
Nov 14 at 10:16




ok nvm. SublimeText have no problems with proper formatting that one. Thanks!
– kolboc
Nov 14 at 10:16












@kolboc - Please see the posting LaTeX Editors/IDEs for choices for TeX-aware editing software. For what it's worth, in my opinion notepad is singularly unsuited for work with TeX and LaTeX. Do yourself a huge favor and start using a real editor.
– Mico
Nov 14 at 10:55






@kolboc - Please see the posting LaTeX Editors/IDEs for choices for TeX-aware editing software. For what it's worth, in my opinion notepad is singularly unsuited for work with TeX and LaTeX. Do yourself a huge favor and start using a real editor.
– Mico
Nov 14 at 10:55












kolboc is a new contributor. Be nice, and check out our Code of Conduct.










 

draft saved


draft discarded


















kolboc is a new contributor. Be nice, and check out our Code of Conduct.













kolboc is a new contributor. Be nice, and check out our Code of Conduct.












kolboc is a new contributor. Be nice, and check out our Code of Conduct.















 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f459867%2funwanted-commas-in-formatted-bibliographic-entries%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

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?