Author's initials in longbibliography for revtex4-1 aps style

The simple solution is to modify the title field in the bib file. Change "Recent advances in physics" to "J. Smith, Recent advances in physics", and so on for each citation.

If you want a fix for the general case, you'll need to modify revtex4's .bst file to change the formatting of the output. On my system, Debian Linux with Tex Live, the location of the file is /usr/local/texlive/2014/texmf-dist/bibtex/bst/revtex4/apsrev.bst. The original format.title function is:

FUNCTION {format.title}
{ title
  duplicate$ empty$ 'skip$ { "t" change.case$ } if$
  duplicate$ "title" bibinfo.check swap$
  duplicate$ empty$ 'pop$
    {
      punctuation.yes 'punctuation.state :=
      string.enquote
      select.language
    }
  if$
}

Modify it to be:

FUNCTION {format.title}
{ author #1 "{f. }{ll}" format.name$ ", " * title *
  %duplicate$ empty$ 'skip$ { "t" change.case$ } if$
  duplicate$ "title" bibinfo.check swap$
  duplicate$ empty$ 'pop$
    {
      punctuation.yes 'punctuation.state :=
      string.enquote
      select.language
    }
  if$
}

You can play with the format string for format.string$ to handle all your author names as you like. For a great reference on editing .bst files, see Tame the BeaST. I'm sure there's also a more elegant way to deal with the capitalization of the last name than clobbering the 2nd line, but this should be sufficient for now.

Edit: Here's a related approach applicable to the formatting you updated with: Only author's initials in BibTeX natbib using named style


Add

\bibliographystyle{abbrv}

before

\bibliography{testbiblio}

full code. I modified little bit. :)

\begin{filecontents}{testbiblio.bib}
   @ARTICLE{one,
   author = {John Smith},
   title = {Recent advances in physics},
   journal = {Phys. Rev. D}, 
   year = {2015},
   volume = {10},
   pages = {123456},
   number = {5}
   }
\end{filecontents}


\documentclass[aps,prd,twocolumn,longbibliography]{revtex4-1}

\begin{document}
vxdvsdsdf\cite{one}
sdfsdf
sdfs
df
sdf

\bibliographystyle{abbrv}

\bibliography{testbiblio}

\end{document}

Result

enter image description here


Using the 'aps' option for a revtex4-1 documentclass, the following solution allows to keep all other particularities of the aps bibliographic style unchanged. Notably, it is possible to use a modified version of apsrev4-1.bst but this will probably affect the other behaviours. Here we will simply overwrite the parameters passed to apsrev4-1.bst style file.

Originally, the output of the RevTex package without 'longbibliography' will be

Original output

Now when you add the 'longbibliography' option you get this

Output with 'longbibliography' with the awful mix of initials and full first names.

Actually the parameters for building the bibliography are stored in an extension of the .bib file called [Your file]Notes.bib of your document folder. To overwrite its output, add into your preamble, after the calls to packages,

\AtBeginDocument{%
    \newwrite\bibnotes
    \def\bibnotesext{Notes.bib}
    \immediate\openout\bibnotes=\jobname\bibnotesext
    \immediate\write\bibnotes{@CONTROL{REVTEX41Control}}
    \immediate\write\bibnotes{@CONTROL{%
    apsrev41Control,author="08",editor="1",pages="1",title="0",year="1"}}
     \if@filesw
     \immediate\write\@auxout{\string\citation{apsrev41Control}}%
    \fi
}%

This will replace the text generated at the time of building the file. You can set manually all parameters in these lines of code. Here author="08" stands for "initials for authors". The integer value used for authors is actually encoded in a sum of powers of two, each one corresponding to a different parameter. title="0" allows the production of the article titles. Your output now looks like this

Output with overwritten Notes.bib

Note that the use of 'longbibliography' option is now ineffective but replaced by the manual values.

Beyond just initials, here is the list of all authors parameters as found in apsrev4-1.bst

  'control.author.jnrlst   swap$ duplicate$ #64 control.decode
  'control.author.dotless  swap$ duplicate$ #32 control.decode
  'control.author.nospace  swap$ duplicate$ #16 control.decode
  'control.author.initials swap$ duplicate$  #8 control.decode
  'control.author.nocomma  swap$ duplicate$  #4 control.decode
  'control.author.first    swap$ duplicate$  #2 control.decode
  'control.author.reversed swap$ duplicate$  #1 control.decode

so for example use 16+8+1=25 to reverse order without spaces and use of initials. You need to set editor="0" to allow full control over author format. The parameter entered for author="HH" is actually an hexdecimal value. This means that for the previous example you have to set author="19"

Tags:

Bibtex

Revtex