15

I created a .bib file using BibDesk, which contains the following reference:

@article{Farrell:2005aa,
    Author = {Farrell, Jay and Sharma, Manu and Polycarpou, Marios},
    Cited-By = {113},
    Date-Added = {2014-03-11 16:36:51 +0000},
    Date-Modified = {2014-03-11 16:38:05 +0000},
    Journal = {Journal of Guidance, Control, and Dynamics},
    Number = {6},
    Pages = {1089-1102},
    Title = {Backstepping-based flight control with adaptive function approximation},
    Volume = {28},
    Year = {2005},
}

When I generate a TeX Preview in BibDesk this entry looks as follows:

ex

In my LaTeX document I use the following code to insert the references:

\bibliographystyle{plain}
\bibliography{MyBibFile}

With the following result:

ex2

Now I would like the reference in my report to look like as in the first example, that is with only the initials of the first names.

1
  • Usually this is a bad idea, because every author has a unique way of writing their initials in papers, and this is the way they need to be cited (so that they are easily identifiable in searches etc.). Of course use of initials instead of first and middle names etc is ok, but if the author uses their middle initial, it should be preserved in the reference.
    – Boris
    Dec 26, 2020 at 15:29

2 Answers 2

15

You could proceed as follows to direct BibTeX to abbreviate first (and middle) names down to the initials, while using a suitably modified version of the plain bibliography style:

  • Find the file plain.bst in your TeX distribution. (One way to find this file is to issue the command kpsewhich plain.bst at a command prompt.) Copy this file to, say myplain.bst. (Don't edit directly a file provided as part of your TeX distribution.)

  • Open the file myplain.bst in your favorite text editor -- the one you use to edit your .tex files will do -- and search for the function named format.names. (In the version of this file that's in my TeX distribution, the function format.names starts on line 185.)

  • In this function, look for the line

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

    Change this line to

    { s nameptr "{f. }{vv~}{ll}{, jj}" format.name$ 't :=
    
  • Save the file myplain.bst either to the directory that contains your main .tex file or to a directory that's searched by your BibTeX distribution. (If you choose the second option, depending on your TeX distribution, you may also have to refresh the filename database of the TeX distribution.)

  • Start using the modified bibliography style file by issuing the command \bibliographystyle{myplain}, and be sure to run LaTeX, BibTeX, and LaTeX twice more on the main .tex file to propagate all changes.

Here's how the entry in question will be typeset with myplain as the bibliography style:

enter image description here

\RequirePackage{filecontents}
\documentclass{article}
\begin{filecontents*}{\jobname.bib}
@article{Farrell:2005aa,
    Author = {Farrell, Jay and Sharma, Manu and Polycarpou, Marios},
    Cited-By = {113},
    Date-Added = {2014-03-11 16:36:51 +0000},
    Date-Modified = {2014-03-11 16:38:05 +0000},
    Journal = {Journal of Guidance, Control, and Dynamics},
    Number = {6},
    Pages = {1089-1102},
    Title = {Backstepping-based flight control with adaptive 
            function approximation},
    Volume = {28},
    Year = {2005},
}
\end{filecontents*}
\bibliographystyle{myplain} % note: 'myplain' rather than 'plain'
\begin{document}
\nocite{*}
\bibliography{\jobname}
\end{document}
11

You can use biblatex with convenient options. Write:

\usepackage[style=numeric, giveinits]{biblatex}
\addbibresource{MyBibfile.bib}

\begin{document}
% text + references
\printbibliography
\end{document}

This makes both citation and bibliography styles numeric. But you can choose citation style and bibliography style independently. Take a look at §3.3 of the biblatex documentation for a description of the standard syles available. Moreover, in case you use natbib, you can load biblatex with the natbib option, that emulates natbib functionalities.

Updated (3/9/2017)

The old syntax for first names initials was [firstinits], now it is [giveinits], though.

2
  • Not explicitly, but the example shows numeric labels, and he/she says he/she uses the plain style. Doesn't the plain style produce numeric labels?
    – Bernard
    Mar 31, 2014 at 18:31
  • You're right. I'll mention that citation and bibliography styles can be chosen independently, and there exists a compatibility module for natbib.
    – Bernard
    Mar 31, 2014 at 18:46

You must log in to answer this question.

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