# Bibliography for IoP Journals

I am using a bib file for a single column article to be submitted to IoP.

At the end of my tex file

\documentclass[12pt]{iopart}


I have

\section*{References}
\bibliographystyle{iopart-num}
\bibliography{bib_file}


However, I cannot show the items as in

Instead, it is everything black. How can I be sure that the references will show the doi link (light blue)?

Also, the references appear separated by commas: [12,13,14,15] instead of showing [12-15].

• Could you please provide a minimal code example of what you have so far? The cite package could be an option to get cite ranges [12-15].
– luki
Mar 24 '20 at 12:41
• It works for the range of papers! Any ideas about the doi links?
– Kio
Mar 24 '20 at 12:43
• Looking at mirrors.ctan.org/biblio/bibtex/contrib/iopart-num/… I don't see that the style uses the doi field at all.
– luki
Mar 24 '20 at 13:35
• No, it has to be added. I try something similar to this tex.stackexchange.com/questions/3802/… but still it doesn't work completely.
– Kio
Mar 24 '20 at 14:55

You can modify the .bst file to add the DOI links as suggested in this post.

1. Download iopart-num.bst and rename it iopart-num-mod.bst.
2. Add the following function to iopart-num-mod.bst:
FUNCTION {doilink}
{ duplicate$empty$
{ pop$"" } { doi empty$
{ skip$} { "\href{http://dx.doi.org/" doi * "}{" * swap$ * "}" * }
if$} if$
}

3. Call the function right after the part you wish to be the hyperlink. E.g. in the article function right after format.vol.num.pages:
...
...

This will create a hyperlink from the volume and pages.
4. Add doi field in ENTRY.

Here's an MWE the modified bibliography style in combination with the cite and hyperref packages:

\documentclass[12pt]{article}

\usepackage{filecontents}
\begin{filecontents}{bib_file.bib}
@article{Rueda_2014,
author  = {Rueda, A and others},
title   = {Title},
journal = {Optica},
volume  = {3},
pages   = {597},
year    = {2014},
doi     = {123456/798}
}
@article{Rueda_2015,
author  = {Rueda, A and others},
title   = {Title},
journal = {Optica},
volume  = {3},
pages   = {597},
year    = {2015},
doi     = {123456/798}
}
@article{Rueda_2016,
author  = {Rueda, A and others},
title   = {Title},
journal = {Optica},
volume  = {3},
pages   = {597},
year    = {2016},
doi     = {123456/798}
}
\end{filecontents}

\usepackage{cite}
\usepackage[colorlinks, citecolor = blue, urlcolor = blue]{hyperref}
\bibliographystyle{iopart-num-mod}
\begin{document}
\cite{Rueda_2014, Rueda_2015, Rueda_2016}
\bibliography{bib_file}
\end{document}