I think maybe I can answer my own question now.
The key to this problem is to generate a custom bibliography style bst file.
There are two ways to do it
- use makebst tool in package custom-bib
- use java based software bib-it
makebst
is a command-line tool to generate a custom .bst file after you answering a series of around 70 questions related to the format of the reference style you want. For me it is not so friendly, you can learn how to use it step by step by reading this article LaTeX, bibliography management and styles.
On the other hand, I found to use bib-it
is much easier (Thanks to the author of bib-it
). It has a Bibtex style generator
, which is graphical. Now I will show how to use bib-it
to generate a JAP style .bst file in just a few minutes.
Opening bib-it
, click "tools-->style generator". you will see an graphical interface titled Bibtex style generator
. What you have to do is a 3 steps setting shown in the following picture:
- article
- book
- author
Finally, you just press "generate and save", you got your custom bst file.
The appearance of the generated reference is like
and the .bbl file generated automatically is quite clear
\begin{thebibliography}{}
\bibitem{10.1103/PhysRevLett.101.057003}
I.~I. Mazin, D.~J. Singh, M.~D. Johannes and M.~H. Du, {Phys. Rev. Lett.}
\textbf{{101}}, 057003 (2008).
\bibitem{10.1038/nature08914}
I.~I. Mazin, {Nature} \textbf{{464}}, 183--186 (2010).
\end{thebibliography}
The only fault is the "pages", JAP only need start page. This can be fixed with a single substitution operation using regular expression.
The problem lies in your bibtex
file field names, which are incorrect if you are using bibtex
to process your bibliography (which you are). As you note in the comments, you had been using the bibliography manager included in TeXStudio, which allows you to choose between biblatex
and bibtex
.
biblatex
supports a much richer data model than traditional bibtex
and so if you use those fields you are basically stuck with using biblatex
. On the other hand biblatex
supports all the legacy bibtex
fields, so unless you absolutely require the power that biblatex
provides it's more practical to keep with the bibtex
fields since they are usable with both biblatex/biber
and natbib/bibtex
. See the following questions for more details:
If you do need the power of biblatex
but you also need to use the standard format as well, biber
can be used in tool
mode to convert from one format to another. See:
Since you are using the LLNCS class, you cannot use biblatex
fields, but you must use standard bibtex
fields:
The correct field name for the date is "Year".
The correct field name for the publisher location is "Address"
And book entries have "Publisher" as a required field.
And if you look at the warnings that bibtex
shows when you compile this you can see the issues clearly:
This is BibTeX, Version 0.99d (TeX Live 2015)
The top-level auxiliary file: llncs-bib.aux
The style file: splncs03.bst
Database file #1: bibfilename.bib
Warning--can't use both author and editor fields in badref
Warning--missing publisher in badref
Warning--empty year in badref
(There were 3 warnings)
Best Answer
The correct syntax is
\bibliography{testbib}
(without the.bib
ending).