2

I need to create a bibliography with the author name with last name followed by initial without comma and dots.

MWE:

\RequirePackage{filecontents}
\begin{filecontents}{mybib.bib}
@article{SARDAR2020,
    title = "A New Lossless Secret Color Image Sharing Scheme with Small Shadow Size",
    journal = "Journal of Visual Communication and Image Representation",
    pages = "102768",
    year = "2020",
    issn = "1047-3203",
    doi = "https://doi.org/10.1016/j.jvcir.2020.102768",
    url = "http://www.sciencedirect.com/science/article/pii/S1047320320300183",
    author = "Md Kutubuddin Sardar and Avishek Adhikari",
}
\end{filecontents}

\documentclass{article}
\usepackage[numbers,sort&compress]{natbib}
\begin{document}
 \nocite{*}
\bibliographystyle{apa}
\bibliography{mybib}
\end{document}

It produces :

enter image description here

But I would like to remove the comma and dots between the last name and the initial of the first name as follows:

enter image description here

1 Answer 1

0

If anybody wants to write the bibliography (with natbib) removing the dots (".", periods) after the initials of the firtsnames, and removing also the commas (",") after the lastname, you can modify the following in the .bst file that you are using.

Open the .bst file and find the FUNCTION {format.names}. In this function the style specifies how to show the authors names. Firstname = f; lastname = l; von-name = v; and jr name = j. The order are specify by the braces ("{" and "}"). If the letters are simple, the name is writed completed. If the letters are double, the name is writed using initials.

Nowing this, all you have to do is find the "{, f}" part of the fuction and replace it with "{ f{}}". By removing the comma, the initials will follow the lastname without the comma. By adding the inner empty "{}" you are telling to natbib to delete the automatic period that it creates after the initials.

The final fuction will be like this:

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{vv }{ll}{, jj}{ f{}}" format.name$ 't :=   % this is the part you have to modify 
      nameptr #1 >
        { namesleft #1 >
            { ", " * t * }
            { numnames #2 >
                { "" * }
                'skip$
              if$
              t "others" =
                { " \textit{et al.}" * }
                { t #1 text.prefix$ "I" =
                    { " e " * t * }
                    { " y " * t * }
                } if$
              if$
            }
          if$
        }
        't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .