[Tex/LaTex] bibliography style: merging the alpha style with the style of abbrv for author information

bibliographiesbibtex

I like alphanumerical citations written as in alpha.bst style, with initials of authors and years, but I would like that the information of authors name be as in abbrv style.

In alpha style I will get:

[ML12] Eva Monclús and Eva Lahoya. …….

In abbrv style I will get:

[1] E. Monclús and E. Lahoya ……..

The style I am looking for would get:

[ML12] E. Monclús and E. Lahoya ……..

Best Answer

This is what you can do.

Open alpha.bst and save a copy in your document directory as myalpha.bst.

Locate the lines:

FUNCTION {format.names}
{ 's :=
  #1 'nameptr :=
  s num.names$ 'numnames :=
  numnames 'namesleft :=
    { namesleft #0 > }
    { s nameptr "{ff~}{vv~}{ll}{, jj}" format.name$ 't :=
      nameptr #1 >
    { namesleft #1 >
        { ", " * t * }
        { numnames #2 >
        { "," * }
        'skip$
          if$
          t "others" =
        { " et~al." * }
        { " and " * t * }
          if$
        }
      if$
    }
    't
      if$
      nameptr #1 + 'nameptr :=
      namesleft #1 - 'namesleft :=
    }
  while$
}

Substitute ff~ with f.~ and save the file.

At this point use myalpha as your bibliography style, as in the following example:

\documentclass{article}
\usepackage[utf8]{inputenc}

\usepackage{filecontents}
\begin{filecontents*}{\jobname.bib}
@article{auth00a,
  author = {Monclús, Eva and Lahoya, Eva},
  journal = {Journal},
  title = {MyBook},
  year = {2000}
}
\end{filecontents*}


\begin{document}
\nocite{*}
\bibliographystyle{myalpha}
\bibliography{\jobname}
\end{document} 

Output:

enter image description here